ASoC: omap: Bind the omap-pcm platform driver to dai device
cover ASoC: omap: Bind the omap-pcm platform driver to dai device
Hi,
This should have been done a long time ago...
Add support for binding the omap-pcm platform to a dai device. IN this way we can remove the 'omap-pcm-audio' platform device/driver need.
The change will also going to simplify cases when we boot with DT and we can use the same node for cpu_dai and platform.
Regards,
Peter
---
Peter Ujfalusi (18):
ASoC: omap-pcm: Support for binding the platform driver to dai devices
ASoC: omap-mcpdm: Assign the dai DMA data at earlier time
ASoC: omap-mcpdm: Bind the platform driver to the dai driver when
loading
ASoC: omap-mcbsp: Assign the dai DMA data at earlier time
ASoC: omap-mcbsp: Bind the platform driver to the dai driver when
loading
ASoC: omap-dmic: Assign the dai DMA data at earlier time
ASoC: omap-dmic: Bind the platform driver to the dai driver when
loading
ASoC: omap-hdmi: Bind the platform driver to the dai driver when
loading
ASoC: omap-abe-twl6040: Use the cpu_dai node to specify the platform
driver
ASoC: omap-twl4030: Use the same name/node for platform as the cpu_dai
ASoC: am3517evm: Use the same name for platform as the cpu_dai
ASoC: ams-delta: Use the same name for platform as the cpu_dai
ASoC: n810: Use the same name for platform as the cpu_dai
ASoC: omap3pandora: Use the same name for platform as the cpu_dai
ASoC: osk5912: Use the same name for platform as the cpu_dai
ASoC: rx51: Use the same name for platform as the cpu_dai
ASoC: omap-hdmi-card: Use the same name for platform as the cpu_dai
ASoC: omap-pcm: Drop the platform driver init code
sound/soc/omap/am3517evm.c | 2 +- sound/soc/omap/ams-delta.c | 2 +- sound/soc/omap/n810.c | 2 +- sound/soc/omap/omap-abe-twl6040.c | 8 ++------ sound/soc/omap/omap-dmic.c | 10 +++++++++- sound/soc/omap/omap-hdmi-card.c | 2 +- sound/soc/omap/omap-hdmi.c | 7 ++++++- sound/soc/omap/omap-mcbsp.c | 19 ++++++++++++------- sound/soc/omap/omap-mcpdm.c | 15 +++++++++++---- sound/soc/omap/omap-pcm.c | 25 ++++++------------------- sound/soc/omap/omap-pcm.h | 35 +++++++++++++++++++++++++++++++++++ sound/soc/omap/omap-twl4030.c | 10 ++++++++-- sound/soc/omap/omap3pandora.c | 4 ++-- sound/soc/omap/osk5912.c | 2 +- sound/soc/omap/rx51.c | 2 +- 15 files changed, 97 insertions(+), 48 deletions(-) create mode 100644 sound/soc/omap/omap-pcm.h
Signature · 1 line
1.9.2
PATCH 1/18 ASoC: omap-pcm: Support for binding the platform driver to dai devices
With the new calls it is going to be possible to bind the platform driver to a dai device which makes it easier for us in a long run to handle DT boots, and opens the possibility to move machine driver to generic simple card.
--- sound/soc/omap/omap-pcm.c | 12 ++++++++++++ sound/soc/omap/omap-pcm.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 sound/soc/omap/omap-pcm.h
sound/soc/omap/omap-pcm.c +12 -0
@@ -232,6 +232,18 @@ static struct snd_soc_platform_driver omap_soc_platform = { .pcm_free = omap_pcm_free_dma_buffers, }; +int omap_pcm_platform_register (struct device *dev) +{ +return snd_soc_register_platform (dev, &omap_soc_platform); +} +EXPORT_SYMBOL_GPL (omap_pcm_platform_register); + +void omap_pcm_platform_unregister (struct device *dev) +{ +snd_soc_unregister_platform (dev); +} +EXPORT_SYMBOL_GPL (omap_pcm_platform_unregister); +static int omap_pcm_probe (struct platform_device *pdev) { return snd_soc_register_platform(&pdev->dev,
sound/soc/omap/omap-pcm.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* omap-pcm.h - OMAP PCM driver +* +* Copyright (C) 2014 Texas Instruments, Inc. +* +* Author: Peter Ujfalusi <[email protected]> +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +*/ + +#ifndef __OMAP_PCM_H__ +#define __OMAP_PCM_H__ + +#if IS_ENABLED (CONFIG_SND_OMAP_SOC ) +int omap_pcm_platform_register (struct device *dev); +void omap_pcm_platform_unregister (struct device *dev); +#else +static inline int omap_pcm_platform_register (struct device *dev) +{ +return 0 ; +} + +static inline void omap_pcm_platform_unregister (struct device *dev) +{ +} +#endif /* CONFIG_SND_OMAP_SOC */ + +#endif /* __OMAP_PCM_H__ */
Signature · 1 line
1.9.2
Re: [PATCH 01/18] ASoC: omap-pcm: Support for binding the platform driver to dai devices
Quoted 17 lines · Peter Ujfalusi
With the new calls it is going to be possible to bind the platform driver to a dai device which makes it easier for us in a long run to handle DT boots, and opens the possibility to move machine driver to generic simple card.
Signed-off-by Peter Ujfalusi <[email protected]>--- sound/soc/omap/omap-pcm.c | 12 ++++++++++++ sound/soc/omap/omap-pcm.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 sound/soc/omap/omap-pcm.hsound/soc/omap/omap-pcm.c +0
-0
sound/soc/omap/omap-pcm.c static struct snd_soc_platform_driver omap_soc_platform = { · line 237
Quoted 6 lines
sound/soc/omap/omap-pcm.c +3
-0@@ -232,6 +232,18 @@ static struct snd_soc_platform_driver omap_soc_platform = { .pcm_free = omap_pcm_free_dma_buffers, }; +int omap_pcm_platform_register (struct device *dev) +{ +return snd_soc_register_platform (dev, &omap_soc_platform);
Aargh, I meant to use the devm_snd_soc_register_platform() so the unregister is not going to be needed and the subsequent patches are expecting that this is devm_*
Will resend soon.
Quoted 54 lines
sound/soc/omap/omap-pcm.c +9
-0+} +EXPORT_SYMBOL_GPL (omap_pcm_platform_register); + +void omap_pcm_platform_unregister (struct device *dev) +{ +snd_soc_unregister_platform (dev); +} +EXPORT_SYMBOL_GPL (omap_pcm_platform_unregister); +static int omap_pcm_probe (struct platform_device *pdev) { return snd_soc_register_platform(&pdev->dev,sound/soc/omap/omap-pcm.h new file +35
-0@@ -0,0 +1,35 @@ +/* +* omap-pcm.h - OMAP PCM driver +* +* Copyright (C) 2014 Texas Instruments, Inc. +* +* Author: Peter Ujfalusi <[email protected]> +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +*/ + +#ifndef __OMAP_PCM_H__ +#define __OMAP_PCM_H__ + +#if IS_ENABLED (CONFIG_SND_OMAP_SOC ) +int omap_pcm_platform_register (struct device *dev); +void omap_pcm_platform_unregister (struct device *dev); +#else +static inline int omap_pcm_platform_register (struct device *dev) +{ +return 0 ; +} + +static inline void omap_pcm_platform_unregister (struct device *dev) +{ +} +#endif /* CONFIG_SND_OMAP_SOC */ + +#endif /* __OMAP_PCM_H__ */
Signature · 1 line
Péter
Re: [PATCH 01/18] ASoC: omap-pcm: Support for binding the platform driver to dai devices
Quoted 8 lines · Peter Ujfalusi
sound/soc/omap/omap-pcm.c static struct snd_soc_platform_driver omap_soc_platform = { · line 237
Quoted 3 lines
sound/soc/omap/omap-pcm.c +3
-0+int omap_pcm_platform_register (struct device *dev) +{ +return snd_soc_register_platform (dev, &omap_soc_platform);Aargh, I meant to use the
devm_snd_soc_register_platform()so the unregister is not going to be needed and the subsequent patches are expecting that this is devm_*
Will resend soon.
There's no devm variant for snd_soc_register_platform()
Mark: would it make sens to add it? I can add a patch to v2 of this series for it.
Signature · 1 line
Péter
PATCH 2/18 ASoC: omap-mcpdm: Assign the dai DMA data at earlier time
In reply to Peter UjfalusiAssign the dai dma data at dai driver probe time, not in startup.
--- sound/soc/omap/omap-mcpdm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/omap/omap-mcpdm.c +4 -3
@@ -265,9 +265,6 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream, }mutex_unlock (&mcpdm->mutex); -snd_soc_dai_set_dma_data (dai, substream, - &mcpdm->dma_data[substream->stream]); -return 0 ; }
@@ -406,6 +403,10 @@ static int omap_mcpdm_probe(struct snd_soc_dai *dai) mcpdm->config[SNDRV_PCM_STREAM_PLAYBACK ].threshold =2 ; mcpdm->config[SNDRV_PCM_STREAM_CAPTURE ].threshold =MCPDM_UP_THRES_MAX -3 ; + + dai->playback_dma_data = &mcpdm->dma_data[SNDRV_PCM_STREAM_PLAYBACK ]; + dai->capture_dma_data = &mcpdm->dma_data[SNDRV_PCM_STREAM_CAPTURE ]; +return ret; }
Signature · 1 line
1.9.2
Mark Brown
maintainerRe: [PATCH 02/18] ASoC: omap-mcpdm: Assign the dai DMA data at earlier time
Quoted 7 lines · Peter Ujfalusi
sound/soc/omap/omap-mcpdm.c +0
-3-snd_soc_dai_set_dma_data (dai, substream, - &mcpdm->dma_data[substream->stream]); -return 0 ; }
sound/soc/omap/omap-mcpdm.c static int omap_mcpdm_probe(struct snd_soc_dai *dai) · line 409
Quoted 7 lines
sound/soc/omap/omap-mcpdm.c +4
-0@@ -406,6 +403,10 @@ static int omap_mcpdm_probe(struct snd_soc_dai *dai) mcpdm->config[SNDRV_PCM_STREAM_PLAYBACK ].threshold =2 ; mcpdm->config[SNDRV_PCM_STREAM_CAPTURE ].threshold =MCPDM_UP_THRES_MAX -3 ; + + dai->playback_dma_data = &mcpdm->dma_data[SNDRV_PCM_STREAM_PLAYBACK ]; + dai->capture_dma_data = &mcpdm->dma_data[SNDRV_PCM_STREAM_CAPTURE ]; +
Any reason to stop using _set_dma_data()?
Re: [PATCH 02/18] ASoC: omap-mcpdm: Assign the dai DMA data at earlier time
Quoted 8 lines · Mark Brown
Quoted 6 lines · Peter Ujfalusi
sound/soc/omap/omap-mcpdm.c +0
-3-snd_soc_dai_set_dma_data (dai, substream, - &mcpdm->dma_data[substream->stream]); -return 0 ; }
Quoted 10 lines
sound/soc/omap/omap-mcpdm.c static int omap_mcpdm_probe(struct snd_soc_dai *dai) · line 409
Quoted 8 lines
sound/soc/omap/omap-mcpdm.c +4
-0@@ -406,6 +403,10 @@ static int omap_mcpdm_probe(struct snd_soc_dai *dai) mcpdm->config[SNDRV_PCM_STREAM_PLAYBACK ].threshold =2 ; mcpdm->config[SNDRV_PCM_STREAM_CAPTURE ].threshold =MCPDM_UP_THRES_MAX -3 ; + + dai->playback_dma_data = &mcpdm->dma_data[SNDRV_PCM_STREAM_PLAYBACK ]; + dai->capture_dma_data = &mcpdm->dma_data[SNDRV_PCM_STREAM_CAPTURE ]; +Any reason to stop using
_set_dma_data()?
At dai driver probe we do not have substream and snd_soc_dai_set_dma_data() relies on that (substream->stream) to figure out which dma_data to set.
This change is not a must for omap right now, but I have seen on davinci that we need to have the playback/capture_dma_data set at this time if we are using the ASoC generic dmaengine pcm for platform (I use edma-pcm on davinci right now).
Signature · 1 line
Péter
Re: [PATCH 02/18] ASoC: omap-mcpdm: Assign the dai DMA data at earlier time
Quoted 20 lines · Peter Ujfalusi
Quoted 8 lines · Mark Brown
Quoted 6 lines · Peter Ujfalusi
sound/soc/omap/omap-mcpdm.c +0
-3-snd_soc_dai_set_dma_data (dai, substream, - &mcpdm->dma_data[substream->stream]); -return 0 ; }Quoted 10 lines
sound/soc/omap/omap-mcpdm.c static int omap_mcpdm_probe(struct snd_soc_dai *dai) · line 409
Quoted 8 lines
sound/soc/omap/omap-mcpdm.c +4
-0@@ -406,6 +403,10 @@ static int omap_mcpdm_probe(struct snd_soc_dai *dai) mcpdm->config[SNDRV_PCM_STREAM_PLAYBACK ].threshold =2 ; mcpdm->config[SNDRV_PCM_STREAM_CAPTURE ].threshold =MCPDM_UP_THRES_MAX -3 ; + + dai->playback_dma_data = &mcpdm->dma_data[SNDRV_PCM_STREAM_PLAYBACK ]; + dai->capture_dma_data = &mcpdm->dma_data[SNDRV_PCM_STREAM_CAPTURE ]; +Any reason to stop using
_set_dma_data()?
Quoted 3 lines
At dai driver probe we do not have substream and
snd_soc_dai_set_dma_data()relies on that (substream->stream) to figure out whichdma_datato set.
You can use snd_soc_dai_init_dma_data(). Not that it saves much code, but it hides the implementation, which makes it easier to change things if we ever have to.
- Lars
PATCH 3/18 ASoC: omap-mcpdm: Bind the platform driver to the dai driver when loading
In reply to Peter UjfalusiUse the same device for the platform driver when registering as the dai driver. This will enable us to clean up some DT booted cases.
--- sound/soc/omap/omap-mcpdm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
sound/soc/omap/omap-mcpdm.c +7 -1
@@ -42,6 +42,7 @@#include <sound/dmaengine_pcm.h> #include "omap-mcpdm.h" +#include "omap-pcm.h" struct mcpdm_link_config {u32 link_mask;/* channel mask for the direction */
@@ -461,6 +462,7 @@ static int asoc_mcpdm_probe(struct platform_device *pdev) {struct omap_mcpdm *mcpdm;struct resource *res; +int ret; mcpdm =devm_kzalloc (&pdev->dev,sizeof (struct omap_mcpdm ),GFP_KERNEL );if (!mcpdm)
@@ -491,9 +493,13 @@ static int asoc_mcpdm_probe(struct platform_device *pdev) mcpdm->dev = &pdev->dev; -return devm_snd_soc_register_component (&pdev->dev, + ret =devm_snd_soc_register_component (&pdev->dev, &omap_mcpdm_component, &omap_mcpdm_dai,1 ); +if (ret) +return ret; + +return omap_pcm_platform_register (&pdev->dev); }static const struct of_device_id omap_mcpdm_of_match[] = {
Signature · 1 line
1.9.2
PATCH 4/18 ASoC: omap-mcbsp: Assign the dai DMA data at earlier time
In reply to Peter UjfalusiAssign the dai dma data at dai driver probe time, not in startup.
--- sound/soc/omap/omap-mcbsp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/omap/omap-mcbsp.c +3 -3
@@ -149,9 +149,6 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 2); } -snd_soc_dai_set_dma_data (cpu_dai, substream, - &mcbsp->dma_data[substream->stream]); -return err; }
@@ -559,6 +556,9 @@ static int omap_mcbsp_probe(struct snd_soc_dai *dai)pm_runtime_enable (mcbsp->dev); + dai->playback_dma_data = &mcbsp->dma_data[SNDRV_PCM_STREAM_PLAYBACK ]; + dai->capture_dma_data = &mcbsp->dma_data[SNDRV_PCM_STREAM_CAPTURE ]; +return 0 ; }
Signature · 1 line
1.9.2
PATCH 5/18 ASoC: omap-mcbsp: Bind the platform driver to the dai driver when loading
In reply to Peter UjfalusiUse the same device for the platform driver when registering as the dai driver. This will enable us to clean up some DT booted cases.
--- sound/soc/omap/omap-mcbsp.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
sound/soc/omap/omap-mcbsp.c +9 -4
@@ -38,6 +38,7 @@#include <linux/platform_data/asoc-ti-mcbsp.h> #include "mcbsp.h" #include "omap-mcbsp.h" +#include "omap-pcm.h" #define OMAP_MCBSP_RATES (SNDRV_PCM_RATE_8000_96000)
@@ -799,11 +800,15 @@ static int asoc_mcbsp_probe(struct platform_device *pdev)platform_set_drvdata (pdev, mcbsp); ret =omap_mcbsp_init (pdev); -if (!ret) -return snd_soc_register_component (&pdev->dev, &omap_mcbsp_component, - &omap_mcbsp_dai,1 ); +if (ret) +return ret; -return ret; + ret =snd_soc_register_component (&pdev->dev, &omap_mcbsp_component, + &omap_mcbsp_dai,1 ); +if (ret) +return ret; + +return omap_pcm_platform_register (&pdev->dev); }static int asoc_mcbsp_remove (struct platform_device *pdev)
Signature · 1 line
1.9.2
PATCH 6/18 ASoC: omap-dmic: Assign the dai DMA data at earlier time
In reply to Peter UjfalusiAssign the dai dma data at dai driver probe time, not in startup.
--- sound/soc/omap/omap-dmic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
sound/soc/omap/omap-dmic.c +4 -1
@@ -113,7 +113,6 @@ static int omap_dmic_dai_startup(struct snd_pcm_substream *substream,mutex_unlock (&dmic->mutex); -snd_soc_dai_set_dma_data (dai, substream, &dmic->dma_data);return ret; }
@@ -417,6 +416,10 @@ static int omap_dmic_probe(struct snd_soc_dai *dai)/* Configure DMIC threshold value */ dmic->threshold =OMAP_DMIC_THRES_MAX -3 ; + + dai->playback_dma_data =NULL ; + dai->capture_dma_data = &dmic->dma_data; +return 0 ; }
Signature · 1 line
1.9.2
PATCH 7/18 ASoC: omap-dmic: Bind the platform driver to the dai driver when loading
In reply to Peter UjfalusiUse the same device for the platform driver when registering as the dai driver. This will enable us to clean up some DT booted cases.
--- sound/soc/omap/omap-dmic.c | 5 +++++ 1 file changed, 5 insertions(+)
sound/soc/omap/omap-dmic.c +5 -0
@@ -42,6 +42,7 @@#include <sound/dmaengine_pcm.h> #include "omap-dmic.h" +#include "omap-pcm.h" struct omap_dmic {struct device *dev;
@@ -495,6 +496,10 @@ static int asoc_dmic_probe(struct platform_device *pdev)if (ret) goto err_put_clk; + ret =omap_pcm_platform_register (&pdev->dev); +if (ret) + goto err_put_clk; +return 0 ; err_put_clk:
Signature · 1 line
1.9.2
PATCH 8/18 ASoC: omap-hdmi: Bind the platform driver to the dai driver when loading
In reply to Peter UjfalusiUse the same device for the platform driver when registering as the dai driver. This will enable us to clean up some DT booted cases.
--- sound/soc/omap/omap-hdmi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
sound/soc/omap/omap-hdmi.c +6 -1
@@ -36,6 +36,7 @@#include <video/omapdss.h> #include "omap-hdmi.h" +#include "omap-pcm.h" #define DRV_NAME "omap-hdmi-audio-dai"
@@ -324,7 +325,11 @@ static int omap_hdmi_probe(struct platform_device *pdev) ret =snd_soc_register_component (&pdev->dev, &omap_hdmi_component, &omap_hdmi_dai,1 ); -return ret; +if (ret) +return ret; + +return omap_pcm_platform_register (&pdev->dev); +} }static int omap_hdmi_remove (struct platform_device *pdev)
Signature · 1 line
1.9.2
PATCH 9/18 ASoC: omap-abe-twl6040: Use the cpu_dai node to specify the platform driver
In reply to Peter UjfalusiNow that the platform driver is registered with the cpu_dai's device we can use the same node for it instead of the hardwired name. We can also remove the cpu_dai_name and platform_name from the dai_link struct since we only support DT boot on OMAP4/5
--- sound/soc/omap/omap-abe-twl6040.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
sound/soc/omap/omap-abe-twl6040.c +2 -6
@@ -214,9 +214,7 @@ static struct snd_soc_dai_link abe_twl6040_dai_links[] = { { .name = "TWL6040", .stream_name = "TWL6040", - .cpu_dai_name = "omap-mcpdm", .codec_dai_name = "twl6040-legacy", - .platform_name = "omap-pcm-audio", .codec_name = "twl6040-codec", .init = omap_abe_twl6040_init, .ops = &omap_abe_ops,
@@ -224,9 +222,7 @@ static struct snd_soc_dai_link abe_twl6040_dai_links[] = { { .name = "DMIC", .stream_name = "DMIC Capture", - .cpu_dai_name = "omap-dmic", .codec_dai_name = "dmic-hifi", - .platform_name = "omap-pcm-audio", .codec_name = "dmic-codec", .init = omap_abe_dmic_init, .ops = &omap_abe_dmic_ops,
@@ -281,14 +277,14 @@ static int omap_abe_probe(struct platform_device *pdev)dev_err (&pdev->dev,"McPDM node is not provided\n" );return -EINVAL ; } - abe_twl6040_dai_links[0 ].cpu_dai_name =NULL ; abe_twl6040_dai_links[0 ].cpu_of_node = dai_node; + abe_twl6040_dai_links[0 ].platform_of_node = dai_node; dai_node =of_parse_phandle (node,"ti,dmic" ,0 );if (dai_node) { num_links =2 ; - abe_twl6040_dai_links[1 ].cpu_dai_name =NULL ; abe_twl6040_dai_links[1 ].cpu_of_node = dai_node; + abe_twl6040_dai_links[1 ].platform_of_node = dai_node; priv->dmic_codec_dev =platform_device_register_simple ("dmic-codec" ,-1 ,NULL ,0 );
Signature · 1 line
1.9.2
PATCH 10/18 ASoC: omap-twl4030: Use the same name/node for platform as the cpu_dai
In reply to Peter UjfalusiNow that the platform driver is registered with the cpu_dai's device we can use the same name/node for it.
--- sound/soc/omap/omap-twl4030.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
sound/soc/omap/omap-twl4030.c +8 -2
@@ -239,7 +239,7 @@ static struct snd_soc_dai_link omap_twl4030_dai_links[] = { .stream_name = "TWL4030 HiFi", .cpu_dai_name = "omap-mcbsp.2", .codec_dai_name = "twl4030-hifi", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.2", .codec_name = "twl4030-codec", .init = omap_twl4030_init, .ops = &omap_twl4030_ops,
@@ -249,7 +249,7 @@ static struct snd_soc_dai_link omap_twl4030_dai_links[] = { .stream_name = "TWL4030 Voice", .cpu_dai_name = "omap-mcbsp.3", .codec_dai_name = "twl4030-voice", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.2", .codec_name = "twl4030-codec", .dai_fmt =SND_SOC_DAIFMT_DSP_A |SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM,
@@ -299,12 +299,18 @@ static int omap_twl4030_probe(struct platform_device *pdev) omap_twl4030_dai_links[0 ].cpu_dai_name =NULL ; omap_twl4030_dai_links[0 ].cpu_of_node = dai_node; + omap_twl4030_dai_links[0 ].platform_name =NULL ; + omap_twl4030_dai_links[0 ].platform_of_node = dai_node; + dai_node =of_parse_phandle (node,"ti,mcbsp-voice" ,0 );if (!dai_node) { card->num_links =1 ; }else { omap_twl4030_dai_links[1 ].cpu_dai_name =NULL ; omap_twl4030_dai_links[1 ].cpu_of_node = dai_node; + + omap_twl4030_dai_links[1 ].platform_name =NULL ; + omap_twl4030_dai_links[1 ].platform_of_node = dai_node; } priv->jack_detect = of_get_named_gpio(node,
Signature · 1 line
1.9.2
PATCH 11/18 ASoC: am3517evm: Use the same name for platform as the cpu_dai
In reply to Peter UjfalusiNow that the platform driver is registered with the cpu_dai's device we can use the same name for it.
--- sound/soc/omap/am3517evm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/omap/am3517evm.c +1 -1
@@ -77,7 +77,7 @@ static struct snd_soc_dai_link am3517evm_dai = { .stream_name = "AIC23", .cpu_dai_name = "omap-mcbsp.1", .codec_dai_name = "tlv320aic23-hifi", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.1", .codec_name = "tlv320aic23-codec.2-001a", .dai_fmt =SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM,
Signature · 1 line
1.9.2
PATCH 12/18 ASoC: ams-delta: Use the same name for platform as the cpu_dai
In reply to Peter UjfalusiNow that the platform driver is registered with the cpu_dai's device we can use the same name for it.
--- sound/soc/omap/ams-delta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/omap/ams-delta.c +1 -1
@@ -565,7 +565,7 @@ static struct snd_soc_dai_link ams_delta_dai_link = { .cpu_dai_name = "omap-mcbsp.1", .codec_dai_name = "cx20442-voice", .init = ams_delta_cx20442_init, - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.1", .codec_name = "cx20442-codec", .ops = &ams_delta_ops, };
Signature · 1 line
1.9.2
PATCH 13/18 ASoC: n810: Use the same name for platform as the cpu_dai
In reply to Peter UjfalusiNow that the platform driver is registered with the cpu_dai's device we can use the same name for it.
--- sound/soc/omap/n810.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/omap/n810.c +1 -1
@@ -278,7 +278,7 @@ static struct snd_soc_dai_link n810_dai = { .name = "TLV320AIC33", .stream_name = "AIC33", .cpu_dai_name = "omap-mcbsp.2", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.2", .codec_name = "tlv320aic3x-codec.2-0018", .codec_dai_name = "tlv320aic3x-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
Signature · 1 line
1.9.2
PATCH 14/18 ASoC: omap3pandora: Use the same name for platform as the cpu_dai
In reply to Peter UjfalusiNow that the platform driver is registered with the cpu_dai's device we can use the same name for it.
--- sound/soc/omap/omap3pandora.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/omap/omap3pandora.c +2 -2
@@ -215,7 +215,7 @@ static struct snd_soc_dai_link omap3pandora_dai[] = { .stream_name = "HiFi Out", .cpu_dai_name = "omap-mcbsp.2", .codec_dai_name = "twl4030-hifi", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.2", .codec_name = "twl4030-codec", .dai_fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS,
@@ -226,7 +226,7 @@ static struct snd_soc_dai_link omap3pandora_dai[] = { .stream_name = "Line/Mic In", .cpu_dai_name = "omap-mcbsp.4", .codec_dai_name = "twl4030-hifi", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.4", .codec_name = "twl4030-codec", .dai_fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS,
Signature · 1 line
1.9.2
PATCH 15/18 ASoC: osk5912: Use the same name for platform as the cpu_dai
In reply to Peter UjfalusiNow that the platform driver is registered with the cpu_dai's device we can use the same name for it.
--- sound/soc/omap/osk5912.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/omap/osk5912.c +1 -1
@@ -96,7 +96,7 @@ static struct snd_soc_dai_link osk_dai = { .stream_name = "AIC23", .cpu_dai_name = "omap-mcbsp.1", .codec_dai_name = "tlv320aic23-hifi", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.1", .codec_name = "tlv320aic23-codec", .dai_fmt =SND_SOC_DAIFMT_DSP_B |SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM,
Signature · 1 line
1.9.2
PATCH 16/18 ASoC: rx51: Use the same name for platform as the cpu_dai
In reply to Peter UjfalusiNow that the platform driver is registered with the cpu_dai's device we can use the same name for it.
--- sound/soc/omap/rx51.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/omap/rx51.c +1 -1
@@ -358,7 +358,7 @@ static struct snd_soc_dai_link rx51_dai[] = { .stream_name = "AIC34", .cpu_dai_name = "omap-mcbsp.2", .codec_dai_name = "tlv320aic3x-hifi", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.2", .codec_name = "tlv320aic3x-codec.2-0018", .dai_fmt =SND_SOC_DAIFMT_DSP_A |SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM,
Signature · 1 line
1.9.2
PATCH 17/18 ASoC: omap-hdmi-card: Use the same name for platform as the cpu_dai
In reply to Peter UjfalusiNow that the platform driver is registered with the cpu_dai's device we can use the same name for it.
--- sound/soc/omap/omap-hdmi-card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/omap/omap-hdmi-card.c +1 -1
@@ -33,7 +33,7 @@ static struct snd_soc_dai_link omap_hdmi_dai = { .name = "HDMI", .stream_name = "HDMI", .cpu_dai_name = "omap-hdmi-audio-dai", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-hdmi-audio-dai", .codec_name = "hdmi-audio-codec", .codec_dai_name = "hdmi-hifi", };
Signature · 1 line
1.9.2
PATCH 18/18 ASoC: omap-pcm: Drop the platform driver init code
In reply to Peter UjfalusiThe omap-pcm no longer need to be a platform driver since all cpu_dai will bind the platform to it's own device which we can use.
--- sound/soc/omap/omap-pcm.c | 25 ------------------------- 1 file changed, 25 deletions(-)
sound/soc/omap/omap-pcm.c +0 -25
@@ -244,31 +244,6 @@ void omap_pcm_platform_unregister(struct device *dev) }EXPORT_SYMBOL_GPL (omap_pcm_platform_unregister); -static int omap_pcm_probe (struct platform_device *pdev) -{ -return snd_soc_register_platform (&pdev->dev, - &omap_soc_platform); -} - -static int omap_pcm_remove (struct platform_device *pdev) -{ -snd_soc_unregister_platform (&pdev->dev); -return 0 ; -} - -static struct platform_driver omap_pcm_driver = { - .driver = { - .name ="omap-pcm-audio" , - .owner =THIS_MODULE , - }, - - .probe = omap_pcm_probe, - .remove = omap_pcm_remove, -}; - -module_platform_driver (omap_pcm_driver); -MODULE_AUTHOR ("Jarkko Nikula <[email protected]>" );MODULE_DESCRIPTION ("OMAP PCM DMA module" );MODULE_LICENSE ("GPL" ); -MODULE_ALIAS ("platform:omap-pcm-audio" );
Signature · 1 line
1.9.2