[alsa-devel] Multiple codecs on one card (SOC)

Caleb Crome caleb at crome.org
Thu May 19 01:51:56 CEST 2011


Hi again,
   I have a multi-codec board up and running, and need a little guidance.
 I've got 8 I2S codecs connected to a beagleboard.   I have the first codec
up and running, but I don't know how to add more codecs to the same alsa
card.

I have it set for multiple DAI links.  Is that the correct way to have
multiple codecs bound to the same card, and bound to eachother?  The struct
is below.

When I do this, I have the problem, that the codec driver, which registers
its mixer controls using macros like SOC_DOUBLE_R_TLV("PCM Playback Volume,
LDAC_VOL, RDAC_VOL,...), they fail when the 2nd codec is getting probed.

Am I supposed to use multiple snd_soc_dai_link declarations?  How do I end
up with a single 16-channel sound card built from multiple 2 channel
devices?

Do I use subdevices?  Substreams?  multiple dai_links?  How do i instantiate
them?

Any pointers would be greatly appreciated.

Thanks,

  -Caleb


static struct snd_soc_dai_link puppy_dai[] =
{
        {
                .name = "tlv320aic33-se-a",
                .stream_name = "tlv320aic33-se",
                .cpu_dai_name = "omap-mcbsp-dai.2",
                .platform_name = "omap-pcm-audio",
                .codec_dai_name = "tlv320aic3x-se-hifi",
                .codec_name = "tlv320aic3x-se-codec.2-0018",
                .ops = &puppy_ops,
                .symmetric_rates = 1, // I think this requires send and
receive be the same rate.
                .init = puppy_dai_link_init,
        },
        {
                .name = "tlv320aic33-se-b",
                .stream_name = "tlv320aic33-se",
                .cpu_dai_name = "omap-mcbsp-dai.2",
                .platform_name = "omap-pcm-audio",
                .codec_dai_name = "tlv320aic3x-se-hifi",
                .codec_name = "tlv320aic3x-se-codec.2-0019",
                .ops = &puppy_ops,
                .symmetric_rates = 1, // I think this requires send and
receive be the same rate.
                .init = puppy_dai_link_init,
},
};


More information about the Alsa-devel mailing list