Lines Matching refs:codec

148 static unsigned int hdmi_get_eld_data(struct hda_codec *codec, hda_nid_t nid,  in hdmi_get_eld_data()  argument
153 val = snd_hda_codec_read(codec, nid, 0, in hdmi_get_eld_data()
156 codec_info(codec, "HDMI: ELD data byte %d: 0x%x\n", byte_index, val); in hdmi_get_eld_data()
170 static void hdmi_update_short_audio_desc(struct hda_codec *codec, in hdmi_update_short_audio_desc() argument
192 codec_info(codec, "HDMI: audio coding type 0 not expected\n"); in hdmi_update_short_audio_desc()
236 codec_info(codec, in hdmi_update_short_audio_desc()
250 int snd_hdmi_parse_eld(struct hda_codec *codec, struct parsed_hdmi_eld *e, in snd_hdmi_parse_eld() argument
259 codec_info(codec, "HDMI: Unknown ELD version %d\n", e->eld_ver); in snd_hdmi_parse_eld()
282 codec_info(codec, "HDMI: MNL is reserved value %d\n", mnl); in snd_hdmi_parse_eld()
285 codec_info(codec, "HDMI: out of range MNL %d\n", mnl); in snd_hdmi_parse_eld()
292 codec_info(codec, "HDMI: out of range SAD %d\n", i); in snd_hdmi_parse_eld()
295 hdmi_update_short_audio_desc(codec, e->sad + i, in snd_hdmi_parse_eld()
313 int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid) in snd_hdmi_get_eld_size() argument
315 return snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_HDMI_DIP_SIZE, in snd_hdmi_get_eld_size()
319 int snd_hdmi_get_eld(struct hda_codec *codec, hda_nid_t nid, in snd_hdmi_get_eld() argument
331 size = snd_hdmi_get_eld_size(codec, nid); in snd_hdmi_get_eld()
334 codec_info(codec, "HDMI: ELD buf size is 0, force 128\n"); in snd_hdmi_get_eld()
338 codec_info(codec, "HDMI: invalid ELD buf size %d\n", size); in snd_hdmi_get_eld()
344 unsigned int val = hdmi_get_eld_data(codec, nid, i); in snd_hdmi_get_eld()
350 codec_info(codec, "HDMI: invalid ELD data byte %d\n", i); in snd_hdmi_get_eld()
362 codec_dbg(codec, "HDMI: 0 ELD data\n"); in snd_hdmi_get_eld()
396 static void hdmi_show_short_audio_desc(struct hda_codec *codec, in hdmi_show_short_audio_desc() argument
415 codec_dbg(codec, in hdmi_show_short_audio_desc()
433 void snd_hdmi_show_eld(struct hda_codec *codec, struct parsed_hdmi_eld *e) in snd_hdmi_show_eld() argument
437 codec_dbg(codec, "HDMI: detected monitor %s at connection type %s\n", in snd_hdmi_show_eld()
444 codec_dbg(codec, "HDMI: available speakers:%s\n", buf); in snd_hdmi_show_eld()
448 hdmi_show_short_audio_desc(codec, e->sad + i); in snd_hdmi_show_eld()
669 int snd_hdmi_get_eld_ati(struct hda_codec *codec, hda_nid_t nid, in snd_hdmi_get_eld_ati() argument
678 spkalloc = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SPEAKER_ALLOCATION, 0); in snd_hdmi_get_eld_ati()
681 codec_info(codec, "HDMI ATI/AMD: no speaker allocation for ELD\n"); in snd_hdmi_get_eld_ati()
702 snd_hda_codec_write(codec, nid, 0, ATI_VERB_SET_SINK_INFO_INDEX, ATI_INFO_IDX_PORT_ID_LOW); in snd_hdmi_get_eld_ati()
703 sink_info = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SINK_INFO_DATA, 0); in snd_hdmi_get_eld_ati()
706 snd_hda_codec_write(codec, nid, 0, ATI_VERB_SET_SINK_INFO_INDEX, ATI_INFO_IDX_PORT_ID_HIGH); in snd_hdmi_get_eld_ati()
707 sink_info = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SINK_INFO_DATA, 0); in snd_hdmi_get_eld_ati()
710 snd_hda_codec_write(codec, nid, 0, ATI_VERB_SET_SINK_INFO_INDEX, ATI_INFO_IDX_MANUFACTURER_ID); in snd_hdmi_get_eld_ati()
711 sink_info = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SINK_INFO_DATA, 0); in snd_hdmi_get_eld_ati()
714 snd_hda_codec_write(codec, nid, 0, ATI_VERB_SET_SINK_INFO_INDEX, ATI_INFO_IDX_PRODUCT_ID); in snd_hdmi_get_eld_ati()
715 sink_info = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SINK_INFO_DATA, 0); in snd_hdmi_get_eld_ati()
718 snd_hda_codec_write(codec, nid, 0, ATI_VERB_SET_SINK_INFO_INDEX, ATI_INFO_IDX_SINK_DESC_LEN); in snd_hdmi_get_eld_ati()
719 sink_desc_len = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SINK_INFO_DATA, 0); in snd_hdmi_get_eld_ati()
722 codec_info(codec, "HDMI ATI/AMD: Truncating HDMI sink description with length %d\n", in snd_hdmi_get_eld_ati()
730 …snd_hda_codec_write(codec, nid, 0, ATI_VERB_SET_SINK_INFO_INDEX, ATI_INFO_IDX_SINK_DESC_FIRST + i); in snd_hdmi_get_eld_ati()
731 buf[pos++] = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SINK_INFO_DATA, 0); in snd_hdmi_get_eld_ati()
739 snd_hda_codec_write(codec, nid, 0, ATI_VERB_SET_AUDIO_DESCRIPTOR, i << 3); in snd_hdmi_get_eld_ati()
740 ati_sad = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_AUDIO_DESCRIPTOR, 0); in snd_hdmi_get_eld_ati()
764 codec_info(codec, "HDMI ATI/AMD: no audio descriptors for ELD\n"); in snd_hdmi_get_eld_ati()
781 aud_synch = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_AUDIO_VIDEO_DELAY, 0); in snd_hdmi_get_eld_ati()