Patchwork [1/5] ASoC: fsl: mpc5200 multi-codec fixups

login
register
mail settings
Submitter Eric Millbrandt
Date Sept. 12, 2012, 2:14 a.m.
Message ID <1347416089-23393-2-git-send-email-emillbrandt@dekaresearch.com>
Download mbox | patch
Permalink /patch/183239/
State Superseded
Delegated to: Anatolij Gustschin
Headers show

Comments

Eric Millbrandt - Sept. 12, 2012, 2:14 a.m.
Add platform DAI information that is needed to successfully register the
mpc5200 platform.

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
---
 arch/powerpc/platforms/52xx/Kconfig |    1 +
 sound/soc/fsl/mpc5200_dma.c         |    4 ++--
 sound/soc/fsl/mpc5200_psc_ac97.c    |    8 ++++++--
 sound/soc/fsl/mpc5200_psc_i2s.c     |    3 +++
 4 files changed, 12 insertions(+), 4 deletions(-)
Mark Brown - Sept. 12, 2012, 3:04 a.m.
On Tue, Sep 11, 2012 at 10:14:45PM -0400, Eric Millbrandt wrote:
> Add platform DAI information that is needed to successfully register the
> mpc5200 platform.

I'm really not clear what this patch is supposed to be doing.  What are
the problems you are trying to fix and how does your patch fix them?
This should almost certainly be split into a bunch of smaller patches
with focused changelogs.

> --- a/arch/powerpc/platforms/52xx/Kconfig
> +++ b/arch/powerpc/platforms/52xx/Kconfig
> @@ -1,6 +1,7 @@
>  config PPC_MPC52xx
>  	bool "52xx-based boards"
>  	depends on 6xx
> +	select FSL_SOC
>  	select PPC_CLOCK
>  	select PPC_PCI_CHOICE

This doesnt seem to have much to do with the commit message...

> diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
> index 9a3f7c5..46fb518 100644
> --- a/sound/soc/fsl/mpc5200_dma.c
> +++ b/sound/soc/fsl/mpc5200_dma.c
> @@ -366,8 +366,8 @@ static void psc_dma_free(struct snd_pcm *pcm)
>  
>  static struct snd_soc_platform_driver mpc5200_audio_dma_platform = {
>  	.ops		= &psc_dma_ops,
> -	.pcm_new	= &psc_dma_new,
> -	.pcm_free	= &psc_dma_free,
> +	.pcm_new	= psc_dma_new,
> +	.pcm_free	= psc_dma_free,
>  };

Nor does this.

> -/* ALSA only supports a single AC97 device so static is recommend here */
> +/* ALSA only supports a single AC97 bus device so static is recommend here */
>  static struct psc_dma *psc_dma;

Or this.
Eric Millbrandt - Sept. 12, 2012, 2:29 p.m.
Hi Mark,

On 2012-09-11 Mark Brown wrote:
>> --- a/arch/powerpc/platforms/52xx/Kconfig
>> +++ b/arch/powerpc/platforms/52xx/Kconfig
>> @@ -1,6 +1,7 @@
>>  config PPC_MPC52xx  bool "52xx-based boards"        depends on 6xx +        select
>>  FSL_SOC     select PPC_CLOCK        select PPC_PCI_CHOICE
>
> This doesnt seem to have much to do with the commit message...
>
I'll spit this into another patch.  SND_POWERPC_SOC, which wraps all of the Powerpc socs, depends on FSL_SOC.  Would it be better to have SND_POWERPC_SOC depend on FSL_SOC or PPC_MPC52xx?

>> -/* ALSA only supports a single AC97 device so static is recommend here
>> */ +/* ALSA only supports a single AC97 bus device so static is
>> recommend +here */
>>  static struct psc_dma *psc_dma;
>
> Or this.
>
I'll also be split this out.  The change was to clarify that now you can have multiple ac97 codec, but soc-core can still only have on ac97 bus.

Eric




This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.

Thank you.

Please consider the environment before printing this email.

Patch

diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig
index 90f4496..fb35944 100644
--- a/arch/powerpc/platforms/52xx/Kconfig
+++ b/arch/powerpc/platforms/52xx/Kconfig
@@ -1,6 +1,7 @@ 
 config PPC_MPC52xx
 	bool "52xx-based boards"
 	depends on 6xx
+	select FSL_SOC
 	select PPC_CLOCK
 	select PPC_PCI_CHOICE
 
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index 9a3f7c5..46fb518 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -366,8 +366,8 @@  static void psc_dma_free(struct snd_pcm *pcm)
 
 static struct snd_soc_platform_driver mpc5200_audio_dma_platform = {
 	.ops		= &psc_dma_ops,
-	.pcm_new	= &psc_dma_new,
-	.pcm_free	= &psc_dma_free,
+	.pcm_new	= psc_dma_new,
+	.pcm_free	= psc_dma_free,
 };
 
 static int mpc5200_hpcd_probe(struct platform_device *op)
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c
index ffa00a2..2f70729 100644
--- a/sound/soc/fsl/mpc5200_psc_ac97.c
+++ b/sound/soc/fsl/mpc5200_psc_ac97.c
@@ -28,7 +28,7 @@ 
 
 #define DRV_NAME "mpc5200-psc-ac97"
 
-/* ALSA only supports a single AC97 device so static is recommend here */
+/* ALSA only supports a single AC97 bus device so static is recommend here */
 static struct psc_dma *psc_dma;
 
 static unsigned short psc_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
@@ -237,15 +237,18 @@  static const struct snd_soc_dai_ops psc_ac97_digital_ops = {
 
 static struct snd_soc_dai_driver psc_ac97_dai[] = {
 {
+	.name = "mpc5200_psc_ac97.0",
 	.ac97_control = 1,
 	.probe	= psc_ac97_probe,
 	.playback = {
+		.stream_name	= "AC97 Playback",
 		.channels_min   = 1,
 		.channels_max   = 6,
 		.rates          = SNDRV_PCM_RATE_8000_48000,
 		.formats = SNDRV_PCM_FMTBIT_S32_BE,
 	},
 	.capture = {
+		.stream_name	= "AC97 Capture",
 		.channels_min   = 1,
 		.channels_max   = 2,
 		.rates          = SNDRV_PCM_RATE_8000_48000,
@@ -254,8 +257,10 @@  static struct snd_soc_dai_driver psc_ac97_dai[] = {
 	.ops = &psc_ac97_analog_ops,
 },
 {
+	.name = "mpc5200_psc_ac97.1",
 	.ac97_control = 1,
 	.playback = {
+		.stream_name	= "AC97 SPDIF",
 		.channels_min   = 1,
 		.channels_max   = 2,
 		.rates          = SNDRV_PCM_RATE_32000 | \
@@ -330,4 +335,3 @@  module_platform_driver(psc_ac97_driver);
 MODULE_AUTHOR("Jon Smirl <jonsmirl@gmail.com>");
 MODULE_DESCRIPTION("mpc5200 AC97 module");
 MODULE_LICENSE("GPL");
-
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c
index 7b53032..3cf21df 100644
--- a/sound/soc/fsl/mpc5200_psc_i2s.c
+++ b/sound/soc/fsl/mpc5200_psc_i2s.c
@@ -130,13 +130,16 @@  static const struct snd_soc_dai_ops psc_i2s_dai_ops = {
 };
 
 static struct snd_soc_dai_driver psc_i2s_dai[] = {{
+	.name = "mpc5200_psc_i2s.0",
 	.playback = {
+		.stream_name = "I2S Playback",
 		.channels_min = 2,
 		.channels_max = 2,
 		.rates = PSC_I2S_RATES,
 		.formats = PSC_I2S_FORMATS,
 	},
 	.capture = {
+		.stream_name = "I2S Capture",
 		.channels_min = 2,
 		.channels_max = 2,
 		.rates = PSC_I2S_RATES,