[alsa-devel] [PATCH] ALSA: HDA: Add jack detection for HDMI

Takashi Iwai tiwai at suse.de
Wed May 18 17:49:46 CEST 2011

At Wed, 18 May 2011 10:43:36 -0500,
pl bossart wrote:
> >> > A simple approach would be adding a control element containing
> >> > byte-array of ELD/EDID.
> >>
> >> Are there any examples of such controls? Or are we talking about a new
> >> kind of control?
> >
> > Look for SNDRV_CTL_ELEM_TYPE_BYTES.  Some codecs provide these.
> I started doing some work on this, adding a persistent 256-byte buffer
> to store the ELD data instead of dynamically allocating and freeing
> the buffer. I am kind of lost with the controls though, never looked
> at this part of ALSA before.
> In all the HDA code, all controls have an IFACE_MIXER type, while all
> the code that uses ELEM_TYPE_BYTES the type is IFACE_PCM. Does this
> matter at all?

Not much.  It's fine to keep it in IFACE_MIXER.
But, IFACE_PCM might be a better choice since ELD is actually bound
with codec-port, i.e. a PCM stream, and all mixer apps look at these
unparseable IFACE_MIXER elements.

> Likewise, there's a 'generic_hdmi_build_controls' routine in which I
> could add the ELD control, but it uses cvt structures. I think it
> would make more sense to relate ELD controls to pins, as done with the
> proc information.

Yeah, it'd make more sense.  Currently it's a bit messy there, as we
handle cvt and pin in mixture somehow.


More information about the Alsa-devel mailing list