Skip to contentSkip to conversation

ALSA: hda/hdmi: ELD procfs - print the codec NIDs

PATCH Applied Jaroslav Kysela 2 participants 2 messages Sep 21, 2022 Sound

lore
Share & tools
lore

Jaroslav Kysela

author maintainer
#0 lore raw

PATCH 1/1 ALSA: hda/hdmi: ELD procfs - print the codec NIDs

It is useful for the debugging to print also the used HDA codec NIDs used for the given HDMI device. With the dynamic converter assignment the converter NID is changed dynamically.

---
 sound/pci/hda/hda_eld.c    | 6 +++++-
 sound/pci/hda/hda_local.h  | 3 ++-
 sound/pci/hda/patch_hdmi.c | 3 ++-
 3 files changed, 9 insertions(+), 3 deletions(-)
sound/pci/hda/hda_eld.c +5 -1
index 9e97443795f8..1d108ed5c6f2 100644
@@ -440,7 +440,8 @@ static void hdmi_print_sad_info(int i, struct cea_sad *a,
 }
 
 void snd_hdmi_print_eld_info(struct hdmi_eld *eld,
-			     struct snd_info_buffer *buffer)
+			     struct snd_info_buffer *buffer,
+			     hda_nid_t pin_nid, int dev_id, hda_nid_t cvt_nid)
 {
 	struct parsed_hdmi_eld *e = &eld->info;
 	char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE];
@@ -462,6 +463,9 @@ void snd_hdmi_print_eld_info(struct hdmi_eld *eld,
 
 	snd_iprintf(buffer, "monitor_present\t\t%d\n", eld->monitor_present);
 	snd_iprintf(buffer, "eld_valid\t\t%d\n", eld->eld_valid);
+	snd_iprintf(buffer, "codec_pin_nid\t\t0x%x\n", pin_nid);
+	snd_iprintf(buffer, "codec_dev_id\t\t0x%x\n", dev_id);
+	snd_iprintf(buffer, "codec_cvt_nid\t\t0x%x\n", cvt_nid);
 	if (!eld->eld_valid)
 		return;
 	snd_iprintf(buffer, "monitor_name\t\t%s\n", e->monitor_name);
sound/pci/hda/hda_local.h +2 -1
index 682dca2057db..53a5a62b78fa 100644
@@ -712,7 +712,8 @@ int snd_hdmi_get_eld_ati(struct hda_codec *codec, hda_nid_t nid,
 
 #ifdef CONFIG_SND_PROC_FS
 void snd_hdmi_print_eld_info(struct hdmi_eld *eld,
-			     struct snd_info_buffer *buffer);
+			     struct snd_info_buffer *buffer,
+			     hda_nid_t pin_nid, int dev_id, hda_nid_t cvt_nid);
 void snd_hdmi_write_eld_info(struct hdmi_eld *eld,
 			     struct snd_info_buffer *buffer);
 #endif
sound/pci/hda/patch_hdmi.c +2 -1
index e20e0ed759f6..f27a4ee810e3 100644
@@ -494,7 +494,8 @@ static void print_eld_info(struct snd_info_entry *entry,
 	struct hdmi_spec_per_pin *per_pin = entry->private_data;
 
 	mutex_lock(&per_pin->lock);
-	snd_hdmi_print_eld_info(&per_pin->sink_eld, buffer);
+	snd_hdmi_print_eld_info(&per_pin->sink_eld, buffer, per_pin->pin_nid,
+				per_pin->dev_id, per_pin->cvt_nid);
 	mutex_unlock(&per_pin->lock);
 }
 
Signature · 1 line
2.35.3
Applied
#1 lore raw
Quoted 6 lines · Jaroslav Kysela

It is useful for the debugging to print also the used HDA codec NIDs used for the given HDMI device. With the dynamic converter assignment the converter NID is changed dynamically.

Thanks, applied now.

Takashi