[alsa-devel] [PATCH 1/4] ALSA: control: return payload length for TLV operation

Takashi Iwai tiwai at suse.de
Tue Aug 30 07:29:28 CEST 2016


On Tue, 30 Aug 2016 01:44:42 +0200,
Takashi Sakamoto wrote:
> 
> TLV feature of control interface is originally introduced at
> commit 42750b04c5ba ("[ALSA] Control API - TLV implementation for
> additional information like dB scale") and commit 8aa9b586e420 ("[ALSA]
> Control API - more robust TLV implementation"). In this time,
> snd_kcontrol_tlv_rw_t is for generating and transferring information about
> threshold level for applications.
> 
> This feature can transfer arbitrary data in a shape of an array with
> members of unsigned int type, therefore it can be used to deliver quite
> large arbitrary data from user space to in-kernel drivers via ALSA control
> character device. Focusing on this nature, commit 7523a271682f ("ASoC:
> core: add a helper for extended byte controls using TLV") introduced
> snd_soc_bytes_tlv_callback() just for I/O operations.
> 
> In this case, typically, APIs return operated length, while TLV feature
> can't. This is inconvenient to applications.

The ASoC TLV (ab)usage still takes / receives the length field of
TLV.  What's missing there?


Takashi


More information about the Alsa-devel mailing list