Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56186
b: refs/heads/master
c: bccad14
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed May 11, 2007
1 parent d66b4fc commit 649ce50
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: baba8ee9d12d17cac1042a5c816aef7d6610a6c3
refs/heads/master: bccad14e9a931027b72f20fe7caba68fea760e7b
11 changes: 7 additions & 4 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ static unsigned int azx_max_codecs[] __devinitdata = {
static int __devinit azx_codec_create(struct azx *chip, const char *model)
{
struct hda_bus_template bus_temp;
int c, codecs, err;
int c, codecs, audio_codecs, err;

memset(&bus_temp, 0, sizeof(bus_temp));
bus_temp.private_data = chip;
Expand All @@ -991,16 +991,19 @@ static int __devinit azx_codec_create(struct azx *chip, const char *model)
if ((err = snd_hda_bus_new(chip->card, &bus_temp, &chip->bus)) < 0)
return err;

codecs = 0;
codecs = audio_codecs = 0;
for (c = 0; c < AZX_MAX_CODECS; c++) {
if ((chip->codec_mask & (1 << c)) & probe_mask) {
err = snd_hda_codec_new(chip->bus, c, NULL);
struct hda_codec *codec;
err = snd_hda_codec_new(chip->bus, c, &codec);
if (err < 0)
continue;
codecs++;
if (codec->afg)
audio_codecs++;
}
}
if (!codecs) {
if (!audio_codecs) {
/* probe additional slots if no codec is found */
for (; c < azx_max_codecs[chip->driver_type]; c++) {
if ((chip->codec_mask & (1 << c)) & probe_mask) {
Expand Down

0 comments on commit 649ce50

Please sign in to comment.