linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Device trees and audio codecs
@ 2007-10-20 15:33 Jon Smirl
  2007-10-21 13:33 ` Timur Tabi
  2007-10-21 19:14 ` Segher Boessenkool
  0 siblings, 2 replies; 15+ messages in thread
From: Jon Smirl @ 2007-10-20 15:33 UTC (permalink / raw)
  To: PowerPC dev list

I'm working on ALSA ASoC support for a codec chip on my mpc5200 based
target hardware. How should the codec be represented in the device
tree?

Under ASoC the device drivers for the codec chips are platform
independent.  In the current ASoC model there are three device
drivers: i2s (or spi, etc), the generic codec, and a platform specific
'fabric' driver.  Some codecs are linked to both i2c and i2s.

The fabric driver corresponds to the 'layout-id' in the Apple model.
It tells how to configure the generic codec driver for the specific
configuration needed by the actual platform hardware.

For development purposes I'm using an Efika as a target platform. It
is easy enough to load the i2s driver using the device tree. I can add
entries to the i2s node to trigger loading of the generic sta9766
codec driver. How do I trigger loading the Efika specific fabric
driver?

My target hardware has a codec that is linked to both i2s and i2c. How
should it be represented?

Apple has three entries. One for i2s, one for the codec, and one for
soundchip. What is the soundchip entry, does it correspond to real
hardware?

/proc/device-tree/pci@f2000000/mac-io@17/i2s@0/i2s-a@10000:
name             "i2s-a"
device_type      "soundbus"
compatible       "i2sbus"
built-in
reg              00010000 00001000 00008000 00000100 00008100 00000100
interrupts       0000001e 00000001 00000001 00000000 00000002 00000000
interrupt-parent ff981a38
platform-headphone-mute ff9828a0
platform-amp-mute ff9829f8
platform-hw-reset ff982b48
platform-linein-detect ff982c98
platform-headphone-detect ff982e58
platform-get-enable ff97c3b0
platform-enable  ff97c3b0
platform-disable ff97c3b0
platform-get-clock-enable ff97c3b0
platform-clock-enable ff97c3b0
platform-clock-disable ff97c3b0
platform-get-sw-reset ff97c3b0
platform-clear-sw-reset ff97c3b0
platform-sw-reset ff97c3b0
platform-get-cell-enable ff97c3b0
platform-cell-enable ff97c3b0
platform-cell-disable ff97c3b0
linux,phandle    ff985b88

/proc/device-tree/pci@f2000000/mac-io@17/i2s@0/i2s-a@10000/sound:
name             "sound"
device_type      "soundchip"
compatible       "AOAbase"
built-in
layout-id        00000046 (70)
object-model-version 00000002
vendor-id        0000106b (4203)
platform-tas-codec-ref ff98cba8
linux,phandle    ff985d48

/proc/device-tree/pci@f2000000/mac-io@17/i2c@18000/i2c-bus@0/codec@6a:
name             "codec"
device_type      "codec"
compatible       "tas3004"
                 "codec"
                 ""
reg              0000006a (106)
built-in
platform-do-tas-codec-ref ff985d48 08000000 00000027
linux,phandle    ff98cba8


-- 
Jon Smirl
jonsmirl@gmail.com

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

end of thread, other threads:[~2007-10-23 19:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-20 15:33 Device trees and audio codecs Jon Smirl
2007-10-21 13:33 ` Timur Tabi
2007-10-21 14:01   ` Jon Smirl
2007-10-22 13:07     ` Timur Tabi
2007-10-23 19:12       ` Scott Wood
2007-10-21 19:14 ` Segher Boessenkool
2007-10-21 21:33   ` Jon Smirl
2007-10-21 22:06     ` Benjamin Herrenschmidt
2007-10-21 22:12       ` Jon Smirl
2007-10-21 22:19         ` Benjamin Herrenschmidt
2007-10-21 23:33     ` Segher Boessenkool
2007-10-22  0:29       ` Jon Smirl
2007-10-22 15:40         ` Timur Tabi
2007-10-22 18:43         ` Segher Boessenkool
2007-10-23  3:24         ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).