[alsa-devel] ASoC Peek individual register debugfs

Mark Brown broonie at opensource.wolfsonmicro.com
Sat Jul 23 08:44:13 CEST 2011

On Fri, Jul 22, 2011 at 11:52:44AM -0700, Patrick Lai wrote:
> On 7/22/2011 2:07 AM, Mark Brown wrote:

> >codec_reg.  This is the sort of question that can easily be answered by
> >looking at the code, or a running system.

> I checked soc-core.c on Linux next and I do not believe there is
> such debugfs interface. Here is the interface proposal.

> By default, cat codec_reg prints entire register dump
> If someone echo "<register_addr>" > codec_reg before running
> cat codec_reg, only register address and value of given register
> would be printed. Afterward, state gets reset. Entire register dump
> gets printed if user cat codec_reg again

No, that's bad as it means you can rely on the behaviour of the existing
file.  Just use codec_reg, it already does what you need - if you look
at the code you'll see that it only displays the registers you actually
read from it and since the registers are displayed in a fixed length
format they'll always appear at a consistent place in the file.

More information about the Alsa-devel mailing list