Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 56138
b: refs/heads/master
c: 19a982b
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed May 11, 2007
1 parent bacbf7d commit ba9c8c8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 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: 4505179c73197c39272e8e66a172ab788009e07e
refs/heads/master: 19a982b69442d39b3bb6e710677320182480576b
16 changes: 14 additions & 2 deletions trunk/sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
#define RIRB_INT_MASK 0x05

/* STATESTS int mask: SD2,SD1,SD0 */
#define AZX_MAX_CODECS 3
#define STATESTS_INT_MASK 0x07

/* SD_CTL bits */
Expand Down Expand Up @@ -991,15 +992,26 @@ static int __devinit azx_codec_create(struct azx *chip, const char *model)
return err;

codecs = 0;
for (c = 0; c < azx_max_codecs[chip->driver_type]; c++) {
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);
if (err < 0)
continue;
codecs++;
}
}
if (! codecs) {
if (!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) {
err = snd_hda_codec_new(chip->bus, c, NULL);
if (err < 0)
continue;
codecs++;
}
}
}
if (!codecs) {
snd_printk(KERN_ERR SFX "no codecs initialized\n");
return -ENXIO;
}
Expand Down

0 comments on commit ba9c8c8

Please sign in to comment.