public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
* ASoC: multi-component updates from RFC
@ 2010-07-21 12:31 Liam Girdwood
  2010-07-22  6:27 ` Peter Ujfalusi
  0 siblings, 1 reply; 4+ messages in thread
From: Liam Girdwood @ 2010-07-21 12:31 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood

I've just pushed some updates to multi-component that came out of the
RFC discussion.

The main update is the use of dev_name (or DAI name for devices with
multiple DAIs) to identify ASoC components. This replaces the current
method of using a struct codec|dai|platform pointer and ID to define a
DAI link. e.g. we can now define a DAI link as follows :-

static struct snd_soc_dai_link sdp3430_dai[] = {
	{
		.name = "TWL4030 I2S",
		.stream_name = "TWL4030 Audio",
		.cpu_dai_name = "omap-mcbsp-dai.1",
		.codec_dai_name = "twl4030-hifi",
		.platform_name = "omap-pcm-audio",
		.codec_name = "twl4030-codec",
		.init = sdp3430_twl4030_init,
		.ops = &sdp3430_ops,
	},
	{
		.name = "TWL4030 PCM",
		.stream_name = "TWL4030 Voice",
		.cpu_dai_name = "omap-mcbsp-dai.2",
		.codec_dai_name = "twl4030-voice",
		.platform_name = "omap-pcm-audio",
		.codec_name = "twl4030-codec",
		.init = sdp3430_twl4030_voice_init,
		.ops = &sdp3430_voice_ops,
	},
};

This now means we now no longer have to export all the CODEC | DAI |
platform structure symbols around and can keep them static. We also
manage to delete a few headers as a result of this change.

Since we are now using dev_name or DAI name (for single devices with
multiple DAIs) I've taken the opportunity to standardise the ASoC
component naming. It's currently very ad-hoc and platform specific, so
I've now added some useful prefixes to help. e.g. So we now have :-

"-codec" prefix for codecs, e.g. "wm8731-codec"
"-dai" prefix for CPU DAI's e.g. "pxa-i2s-dai"
"-hifi", -"voice", etc for CODEC DAIs e.g. "wm8731-hifi"
"-pcm-audio" for platform DMA, e.g. "pxa-pcm-audio" for PXA DMA
(although most platform DMA controllers used this anyway).

This naming standard will also come in handy for device tree too.

The only other change I've made is fixing the twl4030 and DAC33 codec
probe and remove (as spotted by Peter).

I've also received and applied numerous patches from Jarkko, Timur,
Ryan, Chanwoo, Joonyoug, Kyungmin, Jassi and Seungwhan.

The multi-component code can be found here :-

git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6.git topic/multi-component

As usual, please give this some testing (especially ASoC platform
maintainers) and if all is OK we can upstream some time next week (or
the week after).

Thanks

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

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

end of thread, other threads:[~2010-07-22 13:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21 12:31 ASoC: multi-component updates from RFC Liam Girdwood
2010-07-22  6:27 ` Peter Ujfalusi
2010-07-22  8:18   ` Liam Girdwood
2010-07-22 13:07     ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox