From: Timur Tabi <timur@freescale•com>
To: Jon Smirl <jonsmirl@gmail•com>
Cc: PowerPC dev list <Linuxppc-dev@ozlabs•org>
Subject: Re: Device trees and audio codecs
Date: Sun, 21 Oct 2007 08:33:03 -0500 [thread overview]
Message-ID: <471B550F.3090907@freescale.com> (raw)
In-Reply-To: <9e4733910710200833x5d1c55b5l2cd400f77c13ec87@mail.gmail.com>
Jon Smirl wrote:
> 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?
I'm also working on an ASoC driver, but for the 8610. I have a similar problem.
> 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.
Annoying, isn't it? :-)
You can use phandles to cross-reference nodes. I suggest putting the codec
node under the i2s node (and containing I2S-specific information), and then
putting another codec node under the i2c node (this is a new layout proposed
by Scott Wood), and use a phandle to let the i2s-codec node point to the
i2c-codec node.
> 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?
You don't need a device tree entry to trigger loading a driver. You can just
load the driver and initialize it in its __init function.
However, in this case, you might want to do what I'm doing -- putting a probe
function in the fabric driver for the i2s device (which gets its own node
under the SOC node), and then in that probe function search for all the other
nodes that you need.
> 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?
Since the Apple audio drivers are not ASoC drivers, I suggest we don't pay
attention to what they do.
--
Timur Tabi
Linux Kernel Developer @ Freescale
next prev parent reply other threads:[~2007-10-21 13:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-20 15:33 Device trees and audio codecs Jon Smirl
2007-10-21 13:33 ` Timur Tabi [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=471B550F.3090907@freescale.com \
--to=timur@freescale$(echo .)com \
--cc=Linuxppc-dev@ozlabs$(echo .)org \
--cc=jonsmirl@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox