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

Mark Brown broonie at opensource.wolfsonmicro.com
Fri Aug 1 19:18:19 CEST 2008

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.

I know there are people who'd love to see things like more detailed
register/control mapping information.

More information about the Alsa-devel mailing list