All of lore.kernel.org
 help / color / mirror / Atom feed
* dev_* output functions and ASoC codecs
@ 2009-10-06  0:18 Mike Frysinger
  2009-10-06 10:20 ` Mark Brown
  0 siblings, 1 reply; 12+ messages in thread
From: Mike Frysinger @ 2009-10-06  0:18 UTC (permalink / raw)
  To: Mark Brown; +Cc: Cai, Cliff, Barry Song, alsa-devel

am i doing something wrong or are the dev_* output functions kind of
useless with ASoC codecs ?  it seems like the error output is prefixed
by the generic "soc-audio" but no info related to the exact codec is
included.

as an example, the typical behavior is for the machine driver to call
platform_device_alloc("soc-audio", -1).  this struct device is then
passed down to the relevant subsystem driver register/probe
(i2c/spi/etc...) to the codec driver.  these functions typically then
set the snd_soc_codec's dev member to the allocated platform device.
which means the snd_soc_codec's name member isnt included in decoding.
 so now any dev_* output in the codec driver looks like:
soc-audio soc-audio: some message

if there are multiple codecs, things obviously fall apart quickly.
the question is how to address this.  werent there snd_* output funcs
before ?  or are those now deprecated/dead ?  or perhaps we should
encourage people to stop doing platform_device_alloc("soc-audio") and
start doing platform_device_alloc(snd_soc_card.name) ?

also, there seems to be a semi-common bug in the codec/machine drivers
where they dont actually initialize the dev member.  perhaps it's time
to upgrade the snd_soc_register_codec() check from a KERN_WARNING to a
BUG_ON() ?  clearly the current warning isnt getting its message
through ...
-mike

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

end of thread, other threads:[~2009-10-20  9:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-06  0:18 dev_* output functions and ASoC codecs Mike Frysinger
2009-10-06 10:20 ` Mark Brown
2009-10-12  2:26   ` Barry Song
2009-10-12  9:36     ` Mark Brown
2009-10-12 10:34       ` Barry Song
2009-10-12 10:48         ` Mark Brown
2009-10-12 13:20           ` Barry Song
2009-10-12 14:20             ` Mark Brown
2009-10-13 10:09               ` Barry Song
2009-10-13 10:14                 ` Mark Brown
2009-10-20  5:27                   ` Barry Song
2009-10-20  9:52                     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.