Lines Matching defs:pin_nid
260 static void hdmi_get_show_eld(struct hda_codec *codec, hda_nid_t pin_nid,
263 if (!snd_hdmi_get_eld(eld, codec, pin_nid))
268 static void hdmi_get_dip_index(struct hda_codec *codec, hda_nid_t pin_nid,
273 val = snd_hda_codec_read(codec, pin_nid, 0,
281 static void hdmi_set_dip_index(struct hda_codec *codec, hda_nid_t pin_nid,
288 snd_hda_codec_write(codec, pin_nid, 0, AC_VERB_SET_HDMI_DIP_INDEX, val);
291 static void hdmi_write_dip_byte(struct hda_codec *codec, hda_nid_t pin_nid,
294 snd_hda_codec_write(codec, pin_nid, 0, AC_VERB_SET_HDMI_DIP_DATA, val);
297 static void hdmi_enable_output(struct hda_codec *codec, hda_nid_t pin_nid)
300 if (get_wcaps(codec, pin_nid) & AC_WCAP_OUT_AMP)
301 snd_hda_codec_write(codec, pin_nid, 0,
304 snd_hda_codec_write(codec, pin_nid, 0,
413 hda_nid_t pin_nid)
420 slot = snd_hda_codec_read(codec, pin_nid, 0,
430 hda_nid_t pin_nid,
445 err = snd_hda_codec_write(codec, pin_nid, 0,
455 hdmi_debug_channel_mapping(codec, pin_nid);
467 hda_nid_t pin_nid)
469 hdmi_set_dip_index(codec, pin_nid, 0x0, 0x0);
470 snd_hda_codec_write(codec, pin_nid, 0, AC_VERB_SET_HDMI_DIP_XMIT,
478 hda_nid_t pin_nid)
480 hdmi_set_dip_index(codec, pin_nid, 0x0, 0x0);
481 snd_hda_codec_write(codec, pin_nid, 0, AC_VERB_SET_HDMI_DIP_XMIT,
485 static void hdmi_debug_dip_size(struct hda_codec *codec, hda_nid_t pin_nid)
491 size = snd_hdmi_get_eld_size(codec, pin_nid);
495 size = snd_hda_codec_read(codec, pin_nid, 0,
502 static void hdmi_clear_dip_buffers(struct hda_codec *codec, hda_nid_t pin_nid)
509 size = snd_hda_codec_read(codec, pin_nid, 0,
514 hdmi_set_dip_index(codec, pin_nid, i, 0x0);
516 hdmi_write_dip_byte(codec, pin_nid, 0x0);
517 hdmi_get_dip_index(codec, pin_nid, &pi, &bi);
546 hda_nid_t pin_nid,
552 hdmi_debug_dip_size(codec, pin_nid);
553 hdmi_clear_dip_buffers(codec, pin_nid); /* be paranoid */
557 hdmi_set_dip_index(codec, pin_nid, 0x0, 0x0);
559 hdmi_write_dip_byte(codec, pin_nid, bytes[i]);
562 static bool hdmi_infoframe_uptodate(struct hda_codec *codec, hda_nid_t pin_nid,
569 if (snd_hda_codec_read(codec, pin_nid, 0, AC_VERB_GET_HDMI_DIP_XMIT, 0)
573 hdmi_set_dip_index(codec, pin_nid, 0x0, 0x0);
575 val = snd_hda_codec_read(codec, pin_nid, 0,
588 hda_nid_t pin_nid;
605 pin_nid = spec->pin[i];
606 if (!hdmi_infoframe_uptodate(codec, pin_nid, &ai)) {
609 nid, pin_nid,
611 hdmi_setup_channel_mapping(codec, pin_nid, &ai);
612 hdmi_stop_infoframe_trans(codec, pin_nid);
613 hdmi_fill_audio_infoframe(codec, pin_nid, &ai);
614 hdmi_start_infoframe_trans(codec, pin_nid);
624 static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid,
794 static int hdmi_read_pin_conn(struct hda_codec *codec, hda_nid_t pin_nid)
801 if (!(get_wcaps(codec, pin_nid) & AC_WCAP_CONN_LIST)) {
805 pin_nid, get_wcaps(codec, pin_nid));
809 conn_len = snd_hda_get_connections(codec, pin_nid, conn_list,
812 curr = snd_hda_codec_read(codec, pin_nid, 0,
817 index = hda_node_index(spec->pin, pin_nid);
826 static void hdmi_present_sense(struct hda_codec *codec, hda_nid_t pin_nid,
829 int present = snd_hda_pin_sense(codec, pin_nid);
835 hdmi_get_show_eld(codec, pin_nid, eld);
838 static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
844 "HDMI: no space for pin %d\n", pin_nid);
848 hdmi_present_sense(codec, pin_nid, &spec->sink_eld[spec->num_pins]);
850 spec->pin[spec->num_pins] = pin_nid;
857 return hdmi_read_pin_conn(codec, pin_nid);