[alsa-devel] ASoC - Support for multiple components

Timur Tabi timur at freescale.com
Thu Apr 22 00:13:00 CEST 2010


On Wed, Apr 21, 2010 at 4:07 PM, Timur Tabi <timur at freescale.com> wrote:

> Cirrus Logic CS4270 ALSA SoC Codec Driver
> cs4270 0-004f: found device at i2c address 4F
> cs4270 0-004f: hardware revision 3
> cs4270 0-004f: codec register CS4270 79
> cs4270 0-004f: dai register cs4270 0
> Registered DAI 'cs4270.0'
> Registered codec 'CS4270.79'
> ...
>
> soc-audio soc-audio: CODEC CS4270 not registered
>
> Does this mean that my fabric driver should be looking for "CS4270.79"
> instead of just "CS4270"?

Ok, I figured out the solution.  I need to add this to mpc8610_hpcd_probe():

+       iprop = of_get_property(codec_np, "reg", NULL);
+       if (!iprop) {
+               dev_err(&ofdev->dev, "codec node is missing 'reg' property\n");
+               goto error;
+       }
+       machine_data->dai.codec_id = *iprop;

So I have another question.  Currently, I need to do this:

	machine_data->dai.codec_dai_drv = &cs4270_dai; /* The codec_dai we want */

In other words, I still need to have a global variable in my codec
driver called "cs4270_dai" that the fabric driver has to access.  This
is a real problem because it means that my fabric driver has to be
hard-coded with the information on the codec that's attached to the
SSI.  However, I already have that information in the device tree, I
can extract all the information I need from the device tree.  If I can
get rid of the assignment of "cs4270_dai", I can make my machine
driver completely codec-independent.

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the Alsa-devel mailing list