diff options
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 693dd14d9ec1..834c5980fe5d 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -5291,7 +5291,6 @@ static int patch_stac92hd83xxx(struct hda_codec *codec) | |||
5291 | hda_nid_t conn[STAC92HD83_DAC_COUNT + 1]; | 5291 | hda_nid_t conn[STAC92HD83_DAC_COUNT + 1]; |
5292 | int err; | 5292 | int err; |
5293 | int num_dacs; | 5293 | int num_dacs; |
5294 | hda_nid_t nid; | ||
5295 | 5294 | ||
5296 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); | 5295 | spec = kzalloc(sizeof(*spec), GFP_KERNEL); |
5297 | if (spec == NULL) | 5296 | if (spec == NULL) |
@@ -5387,24 +5386,21 @@ again: | |||
5387 | return err; | 5386 | return err; |
5388 | } | 5387 | } |
5389 | 5388 | ||
5390 | switch (spec->board_config) { | 5389 | /* docking output support */ |
5391 | case STAC_DELL_S14: | 5390 | num_dacs = snd_hda_get_connections(codec, 0xF, |
5392 | nid = 0xf; | ||
5393 | break; | ||
5394 | default: | ||
5395 | nid = 0xe; | ||
5396 | break; | ||
5397 | } | ||
5398 | |||
5399 | num_dacs = snd_hda_get_connections(codec, nid, | ||
5400 | conn, STAC92HD83_DAC_COUNT + 1) - 1; | 5391 | conn, STAC92HD83_DAC_COUNT + 1) - 1; |
5401 | if (num_dacs < 0) | 5392 | /* skip non-DAC connections */ |
5402 | num_dacs = STAC92HD83_DAC_COUNT; | 5393 | while (num_dacs >= 0 && |
5403 | 5394 | (get_wcaps_type(get_wcaps(codec, conn[num_dacs])) | |
5404 | /* set port X to select the last DAC | 5395 | != AC_WID_AUD_OUT)) |
5405 | */ | 5396 | num_dacs--; |
5406 | snd_hda_codec_write_cache(codec, nid, 0, | 5397 | /* set port E and F to select the last DAC */ |
5398 | if (num_dacs >= 0) { | ||
5399 | snd_hda_codec_write_cache(codec, 0xE, 0, | ||
5400 | AC_VERB_SET_CONNECT_SEL, num_dacs); | ||
5401 | snd_hda_codec_write_cache(codec, 0xF, 0, | ||
5407 | AC_VERB_SET_CONNECT_SEL, num_dacs); | 5402 | AC_VERB_SET_CONNECT_SEL, num_dacs); |
5403 | } | ||
5408 | 5404 | ||
5409 | codec->proc_widget_hook = stac92hd_proc_hook; | 5405 | codec->proc_widget_hook = stac92hd_proc_hook; |
5410 | 5406 | ||