ASoC: omap: Bind the omap-pcm platform driver to dai device
v2 cover ASoC: omap: Bind the omap-pcm platform driver to dai device
Hi,
Changes since v1:
- Add resource managed snd_soc_register_platform()
- Use snd_soc_dai_init_dma_data()
- omap-pcm is using the devm_snd_soc_register_platform()
- Patch for davinci-mcasp since Version4 is using omap-pcm
Cover letter from v1:
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 (20):
ASoC: Add resource managed snd_soc_register_platform()
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: davinci-mcasp: Update MCASP_VERSION_4 platform driver
registration
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
include/sound/soc.h | 2 ++ sound/soc/davinci/davinci-mcasp.c | 37 +++++++++++++++++++++++++++++++------ 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 | 9 ++++++++- sound/soc/omap/omap-hdmi-card.c | 2 +- sound/soc/omap/omap-hdmi.c | 7 ++++++- sound/soc/omap/omap-mcbsp.c | 20 +++++++++++++------- sound/soc/omap/omap-mcpdm.c | 16 ++++++++++++---- sound/soc/omap/omap-pcm.c | 25 +++---------------------- sound/soc/omap/omap-pcm.h | 30 ++++++++++++++++++++++++++++++ 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 +- sound/soc/soc-devres.c | 34 ++++++++++++++++++++++++++++++++++ 18 files changed, 157 insertions(+), 57 deletions(-) create mode 100644 sound/soc/omap/omap-pcm.h
Signature · 1 line
1.9.2
PATCH v2 1/20 ASoC: Add resource managed snd_soc_register_platform()
Simplify error handling and remove repetitive (and rarely executed) code for unregistration by providing a devm_snd_soc_register_platform() platform.
--- include/sound/soc.h | 2 ++ sound/soc/soc-devres.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+)
include/sound/soc.h +2 -0
@@ -375,6 +375,8 @@ int snd_soc_resume(struct device *dev);int snd_soc_poweroff (struct device *dev);int snd_soc_register_platform (struct device *dev,const struct snd_soc_platform_driver *platform_drv); +int devm_snd_soc_register_platform (struct device *dev, +const struct snd_soc_platform_driver *platform_drv);void snd_soc_unregister_platform (struct device *dev);int snd_soc_add_platform (struct device *dev,struct snd_soc_platform *platform,const struct snd_soc_platform_driver *platform_drv);
sound/soc/soc-devres.c +34 -0
@@ -52,6 +52,40 @@ int devm_snd_soc_register_component(struct device *dev, }EXPORT_SYMBOL_GPL (devm_snd_soc_register_component); +static void devm_platform_release (struct device *dev,void *res) +{ +snd_soc_unregister_platform (*(struct device **)res); +} + +/** +* devm_snd_soc_register_platform - resource managed platform registration +* @dev: Device used to manage platform +* @platform: platform to register +* +* Register a platform driver with automatic unregistration when the device is +* unregistered. +*/ +int devm_snd_soc_register_platform (struct device *dev, +const struct snd_soc_platform_driver *platform_drv) +{ +struct device **ptr; +int ret; + + ptr =devres_alloc (devm_platform_release,sizeof (*ptr),GFP_KERNEL ); +if (!ptr) +return -ENOMEM ; + + ret =snd_soc_register_platform (dev, platform_drv); +if (ret ==0 ) { + *ptr = dev; +devres_add (dev, ptr); + }else { +devres_free (ptr); + } + +return ret; +} +static void devm_card_release (struct device *dev,void *res) {snd_soc_unregister_card (*(struct snd_soc_card **)res);
Signature · 1 line
1.9.2
PATCH v2 2/20 ASoC: omap-pcm: Support for binding the platform driver to dai devices
In reply to Peter UjfalusiWith 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 | 6 ++++++ sound/soc/omap/omap-pcm.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 sound/soc/omap/omap-pcm.h
sound/soc/omap/omap-pcm.c +6 -0
@@ -232,6 +232,12 @@ 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 devm_snd_soc_register_platform (dev, &omap_soc_platform); +} +EXPORT_SYMBOL_GPL (omap_pcm_platform_register); +static int omap_pcm_probe (struct platform_device *pdev) { return snd_soc_register_platform(&pdev->dev,
sound/soc/omap/omap-pcm.h new file +30 -0
@@ -0,0 +1,30 @@ +/* +* 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); +#else +static inline int omap_pcm_platform_register (struct device *dev) +{ +return 0 ; +} +#endif /* CONFIG_SND_OMAP_SOC */ + +#endif /* __OMAP_PCM_H__ */
Signature · 1 line
1.9.2
PATCH v2 3/20 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 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
sound/soc/omap/omap-mcpdm.c +5 -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,11 @@ 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 ; + +snd_soc_dai_init_dma_data (dai, + &mcpdm->dma_data[SNDRV_PCM_STREAM_PLAYBACK ], + &mcpdm->dma_data[SNDRV_PCM_STREAM_CAPTURE ]); +return ret; }
Signature · 1 line
1.9.2
PATCH v2 4/20 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 */
@@ -462,6 +463,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)
@@ -492,9 +494,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 v2 5/20 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/omap/omap-mcbsp.c +4 -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,10 @@ static int omap_mcbsp_probe(struct snd_soc_dai *dai)pm_runtime_enable (mcbsp->dev); +snd_soc_dai_init_dma_data (dai, + &mcbsp->dma_data[SNDRV_PCM_STREAM_PLAYBACK ], + &mcbsp->dma_data[SNDRV_PCM_STREAM_CAPTURE ]); +return 0 ; }
Signature · 1 line
1.9.2
PATCH v2 6/20 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)
@@ -800,11 +801,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 v2 7/20 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
sound/soc/omap/omap-dmic.c +3 -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,9 @@ static int omap_dmic_probe(struct snd_soc_dai *dai)/* Configure DMIC threshold value */ dmic->threshold =OMAP_DMIC_THRES_MAX -3 ; + +snd_soc_dai_init_dma_data (dai,NULL , &dmic->dma_data); +return 0 ; }
Signature · 1 line
1.9.2
PATCH v2 8/20 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;
@@ -494,6 +495,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 v2 9/20 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
Re: [PATCH v2 09/20] ASoC: omap-hdmi: Bind the platform driver to the dai driver when loading
On 04/16/2014 02:46 PM, Peter Ujfalusi wrote:
[...]
sound/soc/omap/omap-hdmi.c static int omap_hdmi_probe(struct platform_device *pdev) · line 333
Quoted 3 lines
sound/soc/omap/omap-hdmi.c +2
-0+return omap_pcm_platform_register (&pdev->dev); +} }
There is a excess } here.
Re: [PATCH v2 09/20] ASoC: omap-hdmi: Bind the platform driver to the dai driver when loading
Quoted 6 lines · Lars-Peter Clausen
On 04/16/2014 02:46 PM, Peter Ujfalusi wrote:
[...]sound/soc/omap/omap-hdmi.c static int omap_hdmi_probe(struct platform_device *pdev) · line 333
Quoted 3 lines
sound/soc/omap/omap-hdmi.c +2
-0+return omap_pcm_platform_register (&pdev->dev); +} }There is a excess } here.
Aargh, true. I don't have omap-hdmi available to build in my config since I do not have display support enabled for omap4/omap5.
Will send a patch to fix it asap.
Thanks,
Péter
PATCH v2 10/20 ASoC: davinci-mcasp: Update MCASP_VERSION_4 platform driver registration
In reply to Peter UjfalusiVersion 4 of McASP is using omap-pcm as platform driver and the omap-pcm platform need to be registered using the cpu dai's device.
--- sound/soc/davinci/davinci-mcasp.c | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-)
sound/soc/davinci/davinci-mcasp.c +31 -6
@@ -36,6 +36,7 @@#include "davinci-pcm.h" #include "davinci-mcasp.h" +#include "../omap/omap-pcm.h" #define MCASP_MAX_AFIFO_DEPTH 64
@@ -1220,12 +1221,25 @@ static int davinci_mcasp_probe(struct platform_device *pdev)if (ret !=0 ) goto err_release_clk; -if (mcasp->version !=MCASP_VERSION_4 ) { +switch (mcasp->version) { +case MCASP_VERSION_1 : +case MCASP_VERSION_2 : +case MCASP_VERSION_3 : ret =davinci_soc_platform_register (&pdev->dev); -if (ret) { -dev_err (&pdev->dev,"register PCM failed: %d\n" , ret); - goto err_unregister_component; - } +break ; +case MCASP_VERSION_4 : + ret =omap_pcm_platform_register (&pdev->dev); +break ; +default : +dev_err (&pdev->dev,"Invalid McASP version: %d\n" , + mcasp->version); + ret = -EINVAL ; +break ; + } + +if (ret) { +dev_err (&pdev->dev,"register PCM failed: %d\n" , ret); + goto err_unregister_component; }return 0 ;
@@ -1243,8 +1257,19 @@ static int davinci_mcasp_remove(struct platform_device *pdev)struct davinci_mcasp *mcasp =dev_get_drvdata (&pdev->dev);snd_soc_unregister_component (&pdev->dev); -if (mcasp->version !=MCASP_VERSION_4 ) + +switch (mcasp->version) { +case MCASP_VERSION_1 : +case MCASP_VERSION_2 : +case MCASP_VERSION_3 :davinci_soc_platform_unregister (&pdev->dev); +break ; +case MCASP_VERSION_4 : +/* Using the resource managed omap-pcm as platform driver */ +break ; +default : +break ; + }pm_runtime_put_sync (&pdev->dev);pm_runtime_disable (&pdev->dev);
Signature · 1 line
1.9.2
PATCH v2 11/20 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 v2 12/20 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 v2 13/20 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 v2 14/20 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
@@ -536,7 +536,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 v2 15/20 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 v2 16/20 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
@@ -197,7 +197,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,
@@ -208,7 +208,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 v2 17/20 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 v2 18/20 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
@@ -319,7 +319,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 v2 19/20 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 v2 20/20 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
@@ -238,31 +238,6 @@ int omap_pcm_platform_register(struct device *dev) }EXPORT_SYMBOL_GPL (omap_pcm_platform_register); -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
Quoted 3 lines · Peter Ujfalusi
Hi,
Changes since v1:
Applied all, thanks.