Re: [alsa-devel] Adding ELD control to alsa-lib hdmi device

On 09/23/2011 08:46 PM, Pierre-Louis Bossart wrote:
Hi, Now that I almost done with exposing a read-only ELD control for HDA/HDMI outputs, I was wondering how to read it from user-land. PulseAudio and others rely on the 'hdmi' device, and apparently I can't access this new ELD control, I have to use the 'hw:x,y' details.
The hdmi:x(,y) device is only used for pcm. For opening the mixer, hw:x (never hw:x,y - that's pcm only as well) is used as the device string.
I really don't understand much to alsa-lib... Can I expose this new control through the ALSA configuration files where the hdmi device is defined? Or is there a way to infer the card and device number actually used by an alsa-lib plugin? Or do I have to add code to propagate the information from hardware-level to higher-level plugins? Thanks for your feedback!
I'm not the expert here, but if I were you, I would run
amixer -D hw:x contents amixer -D hw:x scontents
To see if your controls show up there. If it shows up in scontents, that would be the "simple" mixer interface that PulseAudio uses. If not, using the control api (as being done by "contents") should work.
Anyway, reading the source code to amixer would then be the first step towards understanding how to enumerate and read mixer controls.

I'm not the expert here, but if I were you, I would run
amixer -D hw:x contents amixer -D hw:x scontents
To see if your controls show up there. If it shows up in scontents, that would be the "simple" mixer interface that PulseAudio uses. If not, using the control api (as being done by "contents") should work.
Anyway, reading the source code to amixer would then be the first step towards understanding how to enumerate and read mixer controls.
That part was done already. I was looking at PulseAudio integration. By looking at additional source code, I found out I could retrieve the card and device number with snd_pcm_info_get_card() and snd_pcm_info_get_device(). I can now read the ELD control from PulseAudio, all I need is to add the ELD parsing and set the codecs supported by the receiver accordingly. -Pierre
participants (2)
-
David Henningsson
-
Pierre-Louis Bossart