[alsa-devel] RFC: reworking ASOC for large registers

Mark Brown broonie at opensource.wolfsonmicro.com
Tue Jul 22 21:09:34 CEST 2008


On Mon, Jul 21, 2008 at 07:25:21PM -0400, Jon Smirl wrote:

>  /* codec IO */
> -#define snd_soc_read(codec, reg) codec->read(codec, reg)
> -#define snd_soc_write(codec, reg, value) codec->write(codec, reg, value)
> +#define snd_soc_read(codec, reg, value, size) codec->read(codec, reg,
> value, size)
> +#define snd_soc_write(codec, reg, value, size) codec->write(codec,
> reg, value, size)

I appreciate that this is just a work in progress but I did want to flag
up the effect that this will have on drivers for CODECs with normally
sized registers.  Given that this is a fairly unusual case it doesn't
seem sensible to cause drivers to have difficulties writing the
equivalent of:

	snd_soc_write(codec, REG_CONTROL, MAKE_IT_WORK);

if we don't have to.

There's two cases where we have a problem currently: one is with
registers up to 32 bits which I think everyone agrees should Just Work
and the other is much bigger registers like these 32 byte registers your
CODEC has which are a bit more tricky :/ .


More information about the Alsa-devel mailing list