[alsa-devel] [PATCH 04/14] ASoC: Allow codecs to override register display

Jon Smirl jonsmirl at gmail.com
Fri Aug 1 19:37:09 CEST 2008

On 8/1/08, Mark Brown <broonie at opensource.wolfsonmicro.com> wrote:
> On Fri, Aug 01, 2008 at 06:35:57PM +0200, Takashi Iwai wrote:
>  > Hm, is display_register already used in asoc tree by any drivers?
>  > If so, then it's a step backward, and I understand your statement.
> No, there are no users.  It was added purely due to Jon's request.
>  > OTOH, showing lots of meaningless registers is bad, too.
> I agree - as I say, I do think supporting suppression of the display of
>  irrelevant/nonexistant registers would be a win.
>  > Looking back soc-core.c again, the primary problem is that
>  > codec_reg_show() assumes that the continuous register table beginning
>  > from 0.  It'd be much easier if the driver provides a complete show
>  > method by itself for non-standard cases, e.g. sparse registers
>  > (i.e. just pass buf and let fill the whole page).
> There are two issues:
>   - I don't like pushing the entire file format into the codec driver;
>    it feels wrong since it increases the amount of non-shared code.
>   - Doing that prevents reuse of any part of the information elsewhere.
>    For example, if we were to display a register value anywhere else a
>    different interface would be required to allow codecs to override the
>    display there.

But you are stuck with the override. You don't know how to display or
even read the 256 bit registers present on the TI chips.

There are more fundamental issues, struct snd_kcontrol doesn't have a
field for storing the register address, it is being carried around in
the private_value data.

>  I know there are people who'd love to see things like more detailed
>  register/control mapping information.
> _______________________________________________
>  Alsa-devel mailing list
>  Alsa-devel at alsa-project.org
>  http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Jon Smirl
jonsmirl at gmail.com

More information about the Alsa-devel mailing list