[alsa-devel] How to create a proc entry for an ASoc codec?
Hi,
How to create a proc entry for an ASoc codec under the sound card?
We hope to create an proc entry for an I2S codec under /proc/asound/cardx, to debug the codec status at runtime.
So after the machine driver calls snd_soc_register_card(&soc_card), I calls snd_card_proc_new(soc_card .snd_card, ....) But no codec entry is created although dmesg shows this function succeeds.
How ASoC creates the proc entries such as 'id' for the sound card?
Thanks Mengdong
On Fri, 2014-04-11 at 10:16 +0100, Lin, Mengdong wrote:
Hi,
How to create a proc entry for an ASoc codec under the sound card?
We hope to create an proc entry for an I2S codec under /proc/asound/cardx, to debug the codec status at runtime.
So after the machine driver calls snd_soc_register_card(&soc_card), I calls snd_card_proc_new(soc_card .snd_card, ….)
But no codec entry is created although dmesg shows this function succeeds.
How ASoC creates the proc entries such as ‘id’ for the sound card?
You should see this :-
cat /proc/asound/card0/id broadwellrt286
ASoC exposes sound card specific data under the sysfs entry for the device. e.g.
ls /sys/bus/platform/devices/broadwell-audio/ Capture PCM/ driver/ modalias Offload1/ sound/ System PCM/ Codec/ Loopback PCM/ Offload0/ power/ subsystem/ uevent
Liam
On Fri, Apr 11, 2014 at 09:16:03AM +0000, Lin, Mengdong wrote:
How to create a proc entry for an ASoc codec under the sound card?
We hope to create an proc entry for an I2S codec under /proc/asound/cardx, to debug the codec status at runtime.
So after the machine driver calls snd_soc_register_card(&soc_card), I calls snd_card_proc_new(soc_card .snd_card, ....) But no codec entry is created although dmesg shows this function succeeds.
How ASoC creates the proc entries such as 'id' for the sound card?
In addition to what Liam said it's worth mentioning that due to the deprecation of /proc most of the ASoC diagnostics are exposed via debugfs (and for things using regmap that also has debugfs data too) - you're likely to get much more useful information that way.
participants (3)
-
Liam Girdwood
-
Lin, Mengdong
-
Mark Brown