Skip to content

Commit

Permalink
[ALSA] hda-codec - Fix max_channels computation for STAC92xx codecs
Browse files Browse the repository at this point in the history
Modules: HDA Codec driver

Fix max_channels computation for STAC92xx codecs in the case only
HP pin without line-out pins is detected in the default pin config.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Feb 1, 2006
1 parent 802c00f commit ad0651f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,13 @@ static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec, const struct aut
AC_VERB_GET_CONNECT_LIST, 0) & 0xff;
}

spec->multiout.num_dacs = cfg->line_outs;
if (cfg->line_outs)
spec->multiout.num_dacs = cfg->line_outs;
else if (cfg->hp_pin) {
spec->multiout.dac_nids[0] = snd_hda_codec_read(codec, cfg->hp_pin, 0,
AC_VERB_GET_CONNECT_LIST, 0) & 0xff;
spec->multiout.num_dacs = 1;
}

return 0;
}
Expand Down

0 comments on commit ad0651f

Please sign in to comment.