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

Vinod Koul vinod.koul at intel.com
Wed Aug 31 18:05:31 CEST 2016


On Wed, Aug 31, 2016 at 03:18:47PM +0100, Charles Keepax wrote:
> On Wed, Aug 31, 2016 at 03:24:31PM +0200, Clemens Ladisch wrote:
> > Charles Keepax wrote:
> > > On Wed, Aug 31, 2016 at 01:54:37PM +0200, Clemens Ladisch wrote:
> > >> Anyway, the separate length value could be useful only for drivers (like
> > >> soc-wm-adsp) that use a binary stream where TLV data should have been
> > >> used.  But the software that writes these coefficients to the WM ADSP
> > >> driver is very hardware specific anyway, and it presumably already works
> > >> without knowing the returned length value.  So there is no case where
> > >> this patchset _actually_ improves the interface.
> > >
> > > The software that writes these coefficients to wm_adsp is
> > > not hardware specific at all its just regular amixer and
> > > tinymix.
> > 
> > As far as I can see, neither amixer nor tinymix support writing
> > or "command"ing TLV data.  Do you mean alsactl or alsaucm?
> > 
> > (And I notice that when alsa-lib's UCM loads TLV data from a file,
> > it does check that the second word contains the correct size.  Is
> > this value also correct when reading TLV from these controls?)
> > 
> 
> Certainly tinyalsa does:
> 
> https://github.com/tinyalsa/tinyalsa/commit/45b2d047b8c2f4d9d1d87244f7f981db8234c906
> 
> I thought the Intel guys added support to amixer as well although
> I may have been mistaken about that. I will try to find some time
> to look at that a little more closely. I guess my main concern
> here was the "very hardware specific" the intention is not to
> require hardware specific user-space code to use these controls.

Note yet, unfortunately :(

I have been trying to do that for amixer. I should be able to complete at
least before our uConf :)

> 
> > > These TLV controls are just like any other ALSA control
> > 
> > You're treating it like one, but actually TLV is not a control type but
> > metadata attached to a control.
> > 
> 
> Yes but that metadata is just being used to transfer the actual
> data for the control in this case. Personally I would just expect
> that control to function the same way as any other binary control
> for the user, just it is >512 bytes. Different things happen on
> the back end but it would be nice if it felt the same to the
> person using it. Which is mostly the case though tinyalsa at the
> moment.
> 
> Thanks,
> Charles

-- 
~Vinod


More information about the Alsa-devel mailing list