diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-07-02 13:18:00 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-07-20 05:11:39 -0400 |
commit | df802952b723cdb08f2f8a3cba396c357290850b (patch) | |
tree | 6a9ef5522b4269b7ba45634edf10f68fe3cb1795 | |
parent | d10ad1a26da03fe089c02846a95fa5938c3ca3ce (diff) |
[ALSA] hda-codec - Fix the error in DAC assignment of STAC codec
The STAC codec support code has the automatic recognition of
additional side-output pins, and this may result in an error when
the assigned pin has no corresponding DAC connection.
The patch fixes the problem -- it corrects the line_outs again
without such additional pins.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 270539a2bbc9..e89180c6aaa2 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1228,7 +1228,7 @@ static int is_in_dac_nids(struct sigmatel_spec *spec, hda_nid_t nid) | |||
1228 | * and 9202/925x. For those, dac_nids[] must be hard-coded. | 1228 | * and 9202/925x. For those, dac_nids[] must be hard-coded. |
1229 | */ | 1229 | */ |
1230 | static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, | 1230 | static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, |
1231 | const struct auto_pin_cfg *cfg) | 1231 | struct auto_pin_cfg *cfg) |
1232 | { | 1232 | { |
1233 | struct sigmatel_spec *spec = codec->spec; | 1233 | struct sigmatel_spec *spec = codec->spec; |
1234 | int i, j, conn_len = 0; | 1234 | int i, j, conn_len = 0; |
@@ -1253,6 +1253,13 @@ static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, | |||
1253 | } | 1253 | } |
1254 | 1254 | ||
1255 | if (j == conn_len) { | 1255 | if (j == conn_len) { |
1256 | if (spec->multiout.num_dacs > 0) { | ||
1257 | /* we have already working output pins, | ||
1258 | * so let's drop the broken ones again | ||
1259 | */ | ||
1260 | cfg->line_outs = spec->multiout.num_dacs; | ||
1261 | break; | ||
1262 | } | ||
1256 | /* error out, no available DAC found */ | 1263 | /* error out, no available DAC found */ |
1257 | snd_printk(KERN_ERR | 1264 | snd_printk(KERN_ERR |
1258 | "%s: No available DAC for pin 0x%x\n", | 1265 | "%s: No available DAC for pin 0x%x\n", |