ALSA: hda - Fix docking output for IDT 92HD8xx codecs
This patch fixes docking output support for IDT 92HD81/83/88 family codecs. Typically one of ports 0xE or 0xF is used for docking output, while only port 0xF is common on all the three codec families. We don't want the pin to select the analog mixer here. Signed-off-by: Charles Chin <Charles.Chin@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
a9694faa28
commit
04b5efe5fa
|
@ -5291,7 +5291,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec)
|
||||||
hda_nid_t conn[STAC92HD83_DAC_COUNT + 1];
|
hda_nid_t conn[STAC92HD83_DAC_COUNT + 1];
|
||||||
int err;
|
int err;
|
||||||
int num_dacs;
|
int num_dacs;
|
||||||
hda_nid_t nid;
|
|
||||||
|
|
||||||
spec = kzalloc(sizeof(*spec), GFP_KERNEL);
|
spec = kzalloc(sizeof(*spec), GFP_KERNEL);
|
||||||
if (spec == NULL)
|
if (spec == NULL)
|
||||||
|
@ -5387,24 +5386,21 @@ again:
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (spec->board_config) {
|
/* docking output support */
|
||||||
case STAC_DELL_S14:
|
num_dacs = snd_hda_get_connections(codec, 0xF,
|
||||||
nid = 0xf;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
nid = 0xe;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
num_dacs = snd_hda_get_connections(codec, nid,
|
|
||||||
conn, STAC92HD83_DAC_COUNT + 1) - 1;
|
conn, STAC92HD83_DAC_COUNT + 1) - 1;
|
||||||
if (num_dacs < 0)
|
/* skip non-DAC connections */
|
||||||
num_dacs = STAC92HD83_DAC_COUNT;
|
while (num_dacs >= 0 &&
|
||||||
|
(get_wcaps_type(get_wcaps(codec, conn[num_dacs]))
|
||||||
/* set port X to select the last DAC
|
!= AC_WID_AUD_OUT))
|
||||||
*/
|
num_dacs--;
|
||||||
snd_hda_codec_write_cache(codec, nid, 0,
|
/* set port E and F to select the last DAC */
|
||||||
|
if (num_dacs >= 0) {
|
||||||
|
snd_hda_codec_write_cache(codec, 0xE, 0,
|
||||||
AC_VERB_SET_CONNECT_SEL, num_dacs);
|
AC_VERB_SET_CONNECT_SEL, num_dacs);
|
||||||
|
snd_hda_codec_write_cache(codec, 0xF, 0,
|
||||||
|
AC_VERB_SET_CONNECT_SEL, num_dacs);
|
||||||
|
}
|
||||||
|
|
||||||
codec->proc_widget_hook = stac92hd_proc_hook;
|
codec->proc_widget_hook = stac92hd_proc_hook;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue