Skip to content

Commit

Permalink
[ALSA] hda-codec - Fix the error in DAC assignment of STAC codec
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jul 20, 2007
1 parent d10ad1a commit df80295
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ static int is_in_dac_nids(struct sigmatel_spec *spec, hda_nid_t nid)
* and 9202/925x. For those, dac_nids[] must be hard-coded.
*/
static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec,
const struct auto_pin_cfg *cfg)
struct auto_pin_cfg *cfg)
{
struct sigmatel_spec *spec = codec->spec;
int i, j, conn_len = 0;
Expand All @@ -1253,6 +1253,13 @@ static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec,
}

if (j == conn_len) {
if (spec->multiout.num_dacs > 0) {
/* we have already working output pins,
* so let's drop the broken ones again
*/
cfg->line_outs = spec->multiout.num_dacs;
break;
}
/* error out, no available DAC found */
snd_printk(KERN_ERR
"%s: No available DAC for pin 0x%x\n",
Expand Down

0 comments on commit df80295

Please sign in to comment.