diff options
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 0fcfa6f406b8..37dd06dd96be 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -431,9 +431,11 @@ static void hdmi_init_pin(struct hda_codec *codec, hda_nid_t pin_nid) | |||
431 | if (get_wcaps(codec, pin_nid) & AC_WCAP_OUT_AMP) | 431 | if (get_wcaps(codec, pin_nid) & AC_WCAP_OUT_AMP) |
432 | snd_hda_codec_write(codec, pin_nid, 0, | 432 | snd_hda_codec_write(codec, pin_nid, 0, |
433 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); | 433 | AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE); |
434 | /* Disable pin out until stream is active*/ | 434 | /* Enable pin out: some machines with GM965 gets broken output when |
435 | * the pin is disabled or changed while using with HDMI | ||
436 | */ | ||
435 | snd_hda_codec_write(codec, pin_nid, 0, | 437 | snd_hda_codec_write(codec, pin_nid, 0, |
436 | AC_VERB_SET_PIN_WIDGET_CONTROL, 0); | 438 | AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); |
437 | } | 439 | } |
438 | 440 | ||
439 | static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t cvt_nid) | 441 | static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t cvt_nid) |
@@ -1341,7 +1343,6 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
1341 | struct hdmi_spec *spec = codec->spec; | 1343 | struct hdmi_spec *spec = codec->spec; |
1342 | int pin_idx = hinfo_to_pin_index(spec, hinfo); | 1344 | int pin_idx = hinfo_to_pin_index(spec, hinfo); |
1343 | hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid; | 1345 | hda_nid_t pin_nid = spec->pins[pin_idx].pin_nid; |
1344 | int pinctl; | ||
1345 | bool non_pcm; | 1346 | bool non_pcm; |
1346 | 1347 | ||
1347 | non_pcm = check_non_pcm_per_cvt(codec, cvt_nid); | 1348 | non_pcm = check_non_pcm_per_cvt(codec, cvt_nid); |
@@ -1350,11 +1351,6 @@ static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
1350 | 1351 | ||
1351 | hdmi_setup_audio_infoframe(codec, pin_idx, non_pcm, substream); | 1352 | hdmi_setup_audio_infoframe(codec, pin_idx, non_pcm, substream); |
1352 | 1353 | ||
1353 | pinctl = snd_hda_codec_read(codec, pin_nid, 0, | ||
1354 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | ||
1355 | snd_hda_codec_write(codec, pin_nid, 0, | ||
1356 | AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl | PIN_OUT); | ||
1357 | |||
1358 | return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); | 1354 | return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); |
1359 | } | 1355 | } |
1360 | 1356 | ||
@@ -1374,7 +1370,6 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo, | |||
1374 | int cvt_idx, pin_idx; | 1370 | int cvt_idx, pin_idx; |
1375 | struct hdmi_spec_per_cvt *per_cvt; | 1371 | struct hdmi_spec_per_cvt *per_cvt; |
1376 | struct hdmi_spec_per_pin *per_pin; | 1372 | struct hdmi_spec_per_pin *per_pin; |
1377 | int pinctl; | ||
1378 | 1373 | ||
1379 | if (hinfo->nid) { | 1374 | if (hinfo->nid) { |
1380 | cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid); | 1375 | cvt_idx = cvt_nid_to_cvt_index(spec, hinfo->nid); |
@@ -1391,11 +1386,6 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo, | |||
1391 | return -EINVAL; | 1386 | return -EINVAL; |
1392 | per_pin = &spec->pins[pin_idx]; | 1387 | per_pin = &spec->pins[pin_idx]; |
1393 | 1388 | ||
1394 | pinctl = snd_hda_codec_read(codec, per_pin->pin_nid, 0, | ||
1395 | AC_VERB_GET_PIN_WIDGET_CONTROL, 0); | ||
1396 | snd_hda_codec_write(codec, per_pin->pin_nid, 0, | ||
1397 | AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
1398 | pinctl & ~PIN_OUT); | ||
1399 | snd_hda_spdif_ctls_unassign(codec, pin_idx); | 1389 | snd_hda_spdif_ctls_unassign(codec, pin_idx); |
1400 | per_pin->chmap_set = false; | 1390 | per_pin->chmap_set = false; |
1401 | memset(per_pin->chmap, 0, sizeof(per_pin->chmap)); | 1391 | memset(per_pin->chmap, 0, sizeof(per_pin->chmap)); |