Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* How to create a proc entry for an ASoc codec?
@ 2014-04-11  9:16 Lin, Mengdong
  2014-04-11  9:28 ` Liam Girdwood
  2014-04-21 22:42 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Lin, Mengdong @ 2014-04-11  9:16 UTC (permalink / raw)
  To: Girdwood, Liam R, alsa-devel@alsa-project.org

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to create a proc entry for an ASoc codec?
  2014-04-11  9:16 How to create a proc entry for an ASoc codec? Lin, Mengdong
@ 2014-04-11  9:28 ` Liam Girdwood
  2014-04-21 22:42 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2014-04-11  9:28 UTC (permalink / raw)
  To: Lin, Mengdong; +Cc: alsa-devel@alsa-project.org

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


_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to create a proc entry for an ASoc codec?
  2014-04-11  9:16 How to create a proc entry for an ASoc codec? Lin, Mengdong
  2014-04-11  9:28 ` Liam Girdwood
@ 2014-04-21 22:42 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-04-21 22:42 UTC (permalink / raw)
  To: Lin, Mengdong; +Cc: alsa-devel@alsa-project.org, Girdwood, Liam R


[-- Attachment #1.1: Type: text/plain, Size: 785 bytes --]

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.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-21 22:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-11  9:16 How to create a proc entry for an ASoc codec? Lin, Mengdong
2014-04-11  9:28 ` Liam Girdwood
2014-04-21 22:42 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox