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

* Re: ASoC: multi-component updates from RFC
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Ujfalusi @ 2010-07-22  6:27 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, ext Liam Girdwood

Hello Liam,

On Wednesday 21 July 2010 15:31:30 ext Liam Girdwood wrote:

...

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

I'm in the process of checking the changes.
For the twl4030 I have spotted the following:
1. twl-core registers "twl4030_codec" platform device.
2. The driver for this is the drivers/mfd/twl4030-codec.c
3. this MFD driver registers the following platform devices:
   twl4030_codec_audio
   twl4030_codec_vibra
4. the sound/soc/codecs/twl4030.c is the twl4030_codec_audio driver
5. the drivers/input/misc/twl4030-vibra.c is the twl4030_codec_vibra driver
Note: the platform data is propagated from board files to mfd/twl4030-codec.c, 
than this mfd driver passes the appropriate platform data to the soc codec, and 
vibra driver.

The codec part of twl40x0, twl50x0 has vibra and audio functionality, and they 
have interoperability problems (sharing the same resources).

The name for the drivers/mfd/twl4030-codec.c is chosen, because the TRM refers 
to this block as codec (audio + vibra).
We could go, and rename however this mfd driver to twl4030-audio (since the TRM 
randomly refers to audio block instead of codec).
Than we can have twl4030-codec as device name for the soc codec, and twl4030-
vibra for the vibra.

I'll continue on checking the changes...

-- 
Péter

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

* Re: ASoC: multi-component updates from RFC
  2010-07-22  6:27 ` Peter Ujfalusi
@ 2010-07-22  8:18   ` Liam Girdwood
  2010-07-22 13:07     ` Liam Girdwood
  0 siblings, 1 reply; 4+ messages in thread
From: Liam Girdwood @ 2010-07-22  8:18 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, Mark Brown

On Thu, 2010-07-22 at 09:27 +0300, Peter Ujfalusi wrote:
> Hello Liam,
> 
> On Wednesday 21 July 2010 15:31:30 ext Liam Girdwood wrote:
> 
> ...
> 
> > The only other change I've made is fixing the twl4030 and DAC33 codec
> > probe and remove (as spotted by Peter).
> 
> I'm in the process of checking the changes.
> For the twl4030 I have spotted the following:
> 1. twl-core registers "twl4030_codec" platform device.
> 2. The driver for this is the drivers/mfd/twl4030-codec.c
> 3. this MFD driver registers the following platform devices:
>    twl4030_codec_audio
>    twl4030_codec_vibra
> 4. the sound/soc/codecs/twl4030.c is the twl4030_codec_audio driver

Ah, I didn't see that part. I'll revert the twl-core name change.

> 5. the drivers/input/misc/twl4030-vibra.c is the twl4030_codec_vibra driver
> Note: the platform data is propagated from board files to mfd/twl4030-codec.c, 
> than this mfd driver passes the appropriate platform data to the soc codec, and 
> vibra driver.
> 
> The codec part of twl40x0, twl50x0 has vibra and audio functionality, and they 
> have interoperability problems (sharing the same resources).
> 

I'm actually looking into the interop problems later as twl6040 + vibra
has the same issues.

> The name for the drivers/mfd/twl4030-codec.c is chosen, because the TRM refers 
> to this block as codec (audio + vibra).
> We could go, and rename however this mfd driver to twl4030-audio (since the TRM 
> randomly refers to audio block instead of codec).
> Than we can have twl4030-codec as device name for the soc codec, and twl4030-
> vibra for the vibra.
> 

Agreed, I'll make that change.

> I'll continue on checking the changes...
> 

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

* Re: ASoC: multi-component updates from RFC
  2010-07-22  8:18   ` Liam Girdwood
@ 2010-07-22 13:07     ` Liam Girdwood
  0 siblings, 0 replies; 4+ messages in thread
From: Liam Girdwood @ 2010-07-22 13:07 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: alsa-devel, Mark Brown

On Thu, 2010-07-22 at 09:18 +0100, Liam Girdwood wrote:
> On Thu, 2010-07-22 at 09:27 +0300, Peter Ujfalusi wrote:

> > The name for the drivers/mfd/twl4030-codec.c is chosen, because the TRM refers 
> > to this block as codec (audio + vibra).
> > We could go, and rename however this mfd driver to twl4030-audio (since the TRM 
> > randomly refers to audio block instead of codec).
> > Than we can have twl4030-codec as device name for the soc codec, and twl4030-
> > vibra for the vibra.
> > 
> 
> Agreed, I'll make that change.

Pushed to git. I also fixed a naming bug in the mcbsp DAI devices too.

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