public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Timur Tabi <timur.tabi@gmail.com>
Cc: alsa-devel mailing list <alsa-devel@alsa-project.org>,
	Mark Brown <broonie@sirena.org.uk>
Subject: Re: asoc multi-component: almost there!
Date: Tue, 27 Jul 2010 18:26:30 +0100	[thread overview]
Message-ID: <1280251590.3085.112.camel@odin> (raw)
In-Reply-To: <AANLkTikGhu8EVLozlBWmC6Tuu_gHZX_mkTRImsMo91TE@mail.gmail.com>

On Tue, 2010-07-27 at 10:20 -0500, Timur Tabi wrote:
> On Tue, Jul 27, 2010 at 8:49 AM, Liam Girdwood <lrg@slimlogic.co.uk> wrote:
> 
> > Each machine DAI link now has a sysfs entry so we can inspect its
> > configuration/status now.
> 
> I have a suspicion that this will totally break my code.

I think you are probably a special case here since you are the only
person who is dynamically building a DAI link array atm. Everyone else
has a static table. To further complicate matters, you are having to
read from a device tree that has not been optimised for creating ASoC
DAI link tables (hence the meeting at UDS this year to come up with some
device tree ASoC format).

Fwiw, I've just again tested another multiple DAI mapping to single
CODEC DAI :-

 	{
		.name = "DAI test1",
		.stream_name = "Multimedia",

		.cpu_dai_name = "omap-mcbsp-dai.1",
		.platform_name = "omap-pcm-audio",

		.codec_dai_name =  "twl6040-dl1",
		.codec_name = "twl6040-codec",
	},
	{
		.name = "DAI test2",
		.stream_name = "Multimedia",

		.cpu_dai_name = "omap-mcbsp-dai.3",
		.platform_name = "omap-pcm-audio",

		.codec_dai_name =  "twl6040-dl1",
		.codec_name = "twl6040-codec",
	}


Works fine for me.

> 
> > Hence each machine DAI link must be named
> > differently. You could have a "cs4270 playback" and "cs4270 capture" DAI
> > links now.
> 
> That won't work either.  For one thing, the CS4270 driver registers
> only one DAI, and it's called "cs4270-hifi".  So I have to call it
> "cs4270-hifi".  So I can't call it anything else.

I was meaning the DAI _link_ name (above as "DAI test1" and "DAI test
2") and not the CODEC DAI name ("twl6040-dl1" above).

I think you should be creating two DAI links like this:-

	{
		.name = "cs4270-playback",
		.stream_name = "Playback",

		.cpu_dai_name = "fsl-ssi-blah.0",
		.platform_name = "fsl-blah-pcm-audio",

		.codec_dai_name =  "cs4270-hifi",
		.codec_name = "cs4270-codec-addr",
	},
	{
		.name = "cs4270-capture",
		.stream_name = "Capture",

		.cpu_dai_name = "fsl-ssi-blah.1",
		.platform_name = "fsl-blah-pcm-audio",

		.codec_dai_name =  "cs4270-hifi",
		.codec_name = "cs4270-codec-addr",
	},

The only differences between both DAI links is the name, stream_name and
cpu_dai_name (iirc your DMA has to be different too?)

Thanks

Liam
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

  reply	other threads:[~2010-07-27 17:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26 22:37 asoc multi-component: almost there! Timur Tabi
2010-07-27 10:42 ` Liam Girdwood
2010-07-27 13:07   ` Timur Tabi
2010-07-27 13:49 ` Liam Girdwood
2010-07-27 15:20   ` Timur Tabi
2010-07-27 17:26     ` Liam Girdwood [this message]
2010-07-27 18:20       ` Timur Tabi
2010-07-27 18:45         ` Mark Brown
2010-07-27 21:23 ` Timur Tabi
2010-07-28 14:07   ` Liam Girdwood
2010-07-28 20:12     ` Timur Tabi

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=1280251590.3085.112.camel@odin \
    --to=lrg@slimlogic.co.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@sirena.org.uk \
    --cc=timur.tabi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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