Lines 431-439
static void hdmi_init_pin(struct hda_codec *codec, hda_nid_t pin_nid)
Link Here
|
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 */ |
435 |
snd_hda_codec_write(codec, pin_nid, 0, |
435 |
snd_hda_codec_write(codec, pin_nid, 0, |
436 |
AC_VERB_SET_PIN_WIDGET_CONTROL, 0); |
436 |
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT); |
437 |
} |
437 |
} |
438 |
|
438 |
|
439 |
static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t cvt_nid) |
439 |
static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t cvt_nid) |
Lines 1350-1359
static int generic_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
Link Here
|
1350 |
|
1350 |
|
1351 |
hdmi_setup_audio_infoframe(codec, pin_idx, non_pcm, substream); |
1351 |
hdmi_setup_audio_infoframe(codec, pin_idx, non_pcm, substream); |
1352 |
|
1352 |
|
|
|
1353 |
#if 0 |
1353 |
pinctl = snd_hda_codec_read(codec, pin_nid, 0, |
1354 |
pinctl = snd_hda_codec_read(codec, pin_nid, 0, |
1354 |
AC_VERB_GET_PIN_WIDGET_CONTROL, 0); |
1355 |
AC_VERB_GET_PIN_WIDGET_CONTROL, 0); |
1355 |
snd_hda_codec_write(codec, pin_nid, 0, |
1356 |
snd_hda_codec_write(codec, pin_nid, 0, |
1356 |
AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl | PIN_OUT); |
1357 |
AC_VERB_SET_PIN_WIDGET_CONTROL, pinctl | PIN_OUT); |
|
|
1358 |
#endif |
1357 |
|
1359 |
|
1358 |
return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); |
1360 |
return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format); |
1359 |
} |
1361 |
} |
Lines 1391-1401
static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
Link Here
|
1391 |
return -EINVAL; |
1393 |
return -EINVAL; |
1392 |
per_pin = &spec->pins[pin_idx]; |
1394 |
per_pin = &spec->pins[pin_idx]; |
1393 |
|
1395 |
|
|
|
1396 |
#if 0 |
1394 |
pinctl = snd_hda_codec_read(codec, per_pin->pin_nid, 0, |
1397 |
pinctl = snd_hda_codec_read(codec, per_pin->pin_nid, 0, |
1395 |
AC_VERB_GET_PIN_WIDGET_CONTROL, 0); |
1398 |
AC_VERB_GET_PIN_WIDGET_CONTROL, 0); |
1396 |
snd_hda_codec_write(codec, per_pin->pin_nid, 0, |
1399 |
snd_hda_codec_write(codec, per_pin->pin_nid, 0, |
1397 |
AC_VERB_SET_PIN_WIDGET_CONTROL, |
1400 |
AC_VERB_SET_PIN_WIDGET_CONTROL, |
1398 |
pinctl & ~PIN_OUT); |
1401 |
pinctl & ~PIN_OUT); |
|
|
1402 |
#endif |
1399 |
snd_hda_spdif_ctls_unassign(codec, pin_idx); |
1403 |
snd_hda_spdif_ctls_unassign(codec, pin_idx); |
1400 |
per_pin->chmap_set = false; |
1404 |
per_pin->chmap_set = false; |
1401 |
memset(per_pin->chmap, 0, sizeof(per_pin->chmap)); |
1405 |
memset(per_pin->chmap, 0, sizeof(per_pin->chmap)); |