Skip to contentSkip to conversation

Decibel range / value from snd_hctl_elem_t

DISCUSSION Sebastian H. 2 participants 3 messages Apr 28, 2011 – Apr 29, 2011

lore
Share & tools
lore
#0 lore raw

Hello list

I'm stuck with the hctl interface. What is the best way to get
1. the decibel range from a snd_hctl_elem_t
2. the decibel value from a snd_hctl_elem_t

In the "Simple Mixer Interface" there are snd_mixer_selem_get_playback_dB, snd_mixer_selem_get_capture_dB, snd_mixer_selem_get_playback_dB_range and snd_mixer_selem_get_capture_dB_range

But I can't find anything like that in the "High level Control Interface".

Possibly related: What does TLV stand for?
http://de.wikipedia.org/wiki/Type-Length-Value ?

Sebastian H.

#1 lore raw
Quoted 4 lines · Sebastian H.

I'm stuck with the hctl interface. What is the best way to get
1. the decibel range from a snd_hctl_elem_t
2. the decibel value from a snd_hctl_elem_t

The hctl stuff is just a thin wrapper over the ctl stuff, so call snd_hctl_ctl and snd_hctl_elem_get_id, then snd_ctl_*dB*.

Quoted 2 lines

Possibly related: What does TLV stand for?
http://de.wikipedia.org/wiki/Type-Length-Value ?

Yes; but you should let alsa-lib parse it.

Regards,
Clemens

#2 lore raw

Am 29.04.2011 08:15, schrieb Clemens Ladisch:

Quoted 8 lines
Quoted 4 lines · Sebastian H.

I'm stuck with the hctl interface. What is the best way to get
1. the decibel range from a snd_hctl_elem_t
2. the decibel value from a snd_hctl_elem_t

The hctl stuff is just a thin wrapper over the ctl stuff, so call snd_hctl_ctl and snd_hctl_elem_get_id, then snd_ctl_*dB*.

Ok, that works.
Thank you Clemens.