[alsa-devel] [PATCH v6] ASoC: add RT286 CODEC driver

Mark Brown broonie at kernel.org
Wed May 7 20:07:05 CEST 2014

On Wed, May 07, 2014 at 07:46:09PM +0200, Lars-Peter Clausen wrote:

> I don't think virtual controls are the right approach here. Virtual controls
> are for controls where the state is completely in software, but here the
> state is still in hardware. It's just that there is no uniform hardware map.
> But there is still some structure. So you'd have controls with custom put
> and get handlers and for DAPM widgets use the event handler.

What you just described is what I'd consider a virtual control - I don't
consider the fact that the put callbacks end up writing to the hardware
particularly substantial, as far as the framework is concerned some
driver specific thing goes off and does something but it could be
setting a variable just as well as writing to hardware.

> But I still think that the best and easiest solution is to have custom
> regmap read/write function that do the translation of logical registers to
> physical read/write operations.

That's the first time this idea has been mentioned that I recall.  I
have to say I'm really not keen on pushing non-physical registers
through regmap, all the drivers that have done that previously have
ended up causing problems though if the registers were *all* fake then
there would be less issue (most of the issues have been due to having
extra registers that don't really exist).  It does still feel like it's
a layering problem though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140507/00fba3a6/attachment-0001.sig>

More information about the Alsa-devel mailing list