[alsa-devel] snd_ctl_add_enumerated_elem_set and TLV

Clemens Ladisch clemens at ladisch.de
Sun Jul 30 16:49:22 CEST 2017


Fulup Ar Foll wrote:
> I'm using snd_ctl_add_enumerated_elem_set to create user controls, I
> do not understand why it set "TLV readable" option at true by default.

As far as I can see, the library API has no mechanism to set or clear
this access right, so it's set by default to allow TLVs for controls
where it makes sense.

(In theory, the code could be changed to clear the readable flag when
there is no TLV.)

> I have a simple enumeration without TLV. I use snd_ctl_elem_write but
> do not call snd_ctl_elem_tlv_write. I do no understand how to prevent
> snd_ctl_elem_info_is_tlv_readable to return true for this control,

This is not possible at the moment.

> obviously even if TLV is set as readable, it is empty and reading fail.

You'll have to write a fake TLV (an empty container).


Regards,
Clemens


More information about the Alsa-devel mailing list