[alsa-devel] Accessing snd_soc_read/snd_soc_write directly for diagnostics

Hi folks,
I know this is a strange request, however, for diagnostic purposes in our embedded system, we would like to talk directly to the codec registers of our sound chip, bypassing alsa. I have the driver compiled into the kernel (not loaded as a module).
Is it possible to create a program which can talk to the snd_soc_read and snd_soc_write functions directly? I'm not sure if this is an option, but if it is, I'd appreciate a pointer to something similar to use as a guide.
TIA Mike

Hi folks,
Cancel this. Turns out our codec only implemented i2c read for the first 4 bytes (not all registers). However, it is caching the registers in the "/sys/devices/platform/soc-audio/codec_reg" file, which was what we needed to get to.
Thanks Mike
On Fri, Jul 16, 2010 at 9:33 AM, Mike Crowe drmikecrowe@gmail.com wrote:
Hi folks,
I know this is a strange request, however, for diagnostic purposes in our embedded system, we would like to talk directly to the codec registers of our sound chip, bypassing alsa. I have the driver compiled into the kernel (not loaded as a module).
Is it possible to create a program which can talk to the snd_soc_read and snd_soc_write functions directly? I'm not sure if this is an option, but if it is, I'd appreciate a pointer to something similar to use as a guide.
TIA Mike

On Fri, Jul 16, 2010 at 09:33:25AM +0800, Mike Crowe wrote:
I know this is a strange request, however, for diagnostic purposes in our embedded system, we would like to talk directly to the codec registers of our sound chip, bypassing alsa. I have the driver compiled into the kernel (not loaded as a module).
Is it possible to create a program which can talk to the snd_soc_read and snd_soc_write functions directly? I'm not sure if this is an option, but if it is, I'd appreciate a pointer to something similar to use as a guide.
This is provided by the codec_reg file in debugfs - mount debugfs and look in the 'asoc' directory. Note that there is also a codec_reg file in sysfs but this is read only.
When mailing Linux mailing lists please always CC the maintainers for subsystems, this ensures messages don't get lost in the noise on mailing lists.
participants (2)
-
Mark Brown
-
Mike Crowe