Pierre-Louis Bossart wrote at Tuesday, September 20, 2011 5:13 PM:
Hi, I've been trying for some time to expose the HDMI ELD information in a new control. The problem I am facing with the HDMI/HDA code is that the ELD is linked to an output pin, and I can't find an elegant way to link this output pin with a PCM device number to be used by my control. For a single output, I could hard-code something but it would probably not work with multiple monitors handled by recent hardware. There is some existing code such as pin_nid_to_pin_index() in patch_hdmi.c, but I can't figure out what this pin_idx is, and how to find the related PCM device number. Any suggestions?
That function simply returns the index into the array spec->pins[] that refers to that pin NID.
Judging by hinfo_to_pin_index() (e.g. used near the start ofhdmi_pcm_open), that same index is valid for spec->pcm_rec[] too, which I assume will give you access to what you want, possibly through the .stream[0] field.