[alsa-devel] [PATCH 00/44] ASoC: no Platform support
Hi Mark
Some drivers don't need to have special Platform component, but was mandatory at legacy style ALSA SoC. Thus, there is this kind of settings on some drivers.
dai_link->platform_of_node = dai_link->cpu_of_node;
This means, Platform == CPU. But it will be ignored, because it is already added when CPU bindings. Thus, this settings is not needed. This patchset supports no Platform.
Last patch removes dummy platform which is no longer needed. I think we don't need it anymore, but, should we keep it... ?
Kuninori Morimoto (44): ASoC: soc-core: allow no Platform on dai_link ASoC: vc4: vc4_hdmi: don't select unnecessary Platform ASoC: atmel: atmel-classd: don't select unnecessary Platform ASoC: atmel: atmel-pdmic: don't select unnecessary Platform ASoC: atmel: atmel_wm8904: don't select unnecessary Platform ASoC: atmel: mikroe-proto: don't select unnecessary Platform ASoC: atmel: sam9g20_wm8731: don't select unnecessary Platform ASoC: atmel: sam9x5_wm8731: don't select unnecessary Platform ASoC: atmel: tse850-pcm5142: don't select unnecessary Platform ASoC: fsl: eukrea-tlv320: don't select unnecessary Platform ASoC: fsl: fsl-asoc-card: don't select unnecessary Platform ASoC: fsl: imx-es8328: don't select unnecessary Platform ASoC: fsl: imx-sgtl5000: don't select unnecessary Platform ASoC: fsl: imx-spdif: don't select unnecessary Platform ASoC: fsl: imx-audmix: don't select unnecessary Platform ASoC: kirkwood: armada-370-db: don't select unnecessary Platform ASoC: mxs: mxs-sgtl5000: don't select unnecessary Platform ASoC: qcom: apq8016_sbc: don't select unnecessary Platform ASoC: qcom: storm: don't select unnecessary Platform ASoC: rockchip: rk3288_hdmi_analog: don't select unnecessary Platform ASoC: rockchip: rockchip_max98090: don't select unnecessary Platform ASoC: rockchip: rockchip_rt5645: don't select unnecessary Platform ASoC: samsung: arndale_rt5631: don't select unnecessary Platform ASoC: samsung: smdk_wm8994: don't select unnecessary Platform ASoC: samsung: snow: don't select unnecessary Platform ASoC: samsung: tm2_wm5110: don't select unnecessary Platform ASoC: sirf: sirf-audio: don't select unnecessary Platform ASoC: sunxi: sun4i-codec: don't select unnecessary Platform ASoC: tegra: tegra_alc5632: don't select unnecessary Platform ASoC: tegra: tegra_max98090: don't select unnecessary Platform ASoC: tegra: tegra_rt5640: don't select unnecessary Platform ASoC: tegra: tegra_rt5677: don't select unnecessary Platform ASoC: tegra: tegra_sgtl5000: don't select unnecessary Platform ASoC: tegra: tegra_wm8753: don't select unnecessary Platform ASoC: tegra: tegra_wm8903: don't select unnecessary Platform ASoC: tegra: tegra_wm9712: don't select unnecessary Platform ASoC: tegra: trimslice: don't select unnecessary Platform ASoC: ti: davinci-evm: don't select unnecessary Platform ASoC: ti: omap-abe-twl6040: don't select unnecessary Platform ASoC: ti: omap-hdmi: don't select unnecessary Platform ASoC: ti: omap-twl4030: don't select unnecessary Platform ASoC: ti: rx51: don't select unnecessary Platform ASoC: ux500: mop500: don't select unnecessary Platform ASoC: soc-utils: remove dummy Platform
drivers/gpu/drm/vc4/vc4_hdmi.c | 4 --- include/sound/soc.h | 2 +- sound/soc/atmel/atmel-classd.c | 5 +-- sound/soc/atmel/atmel-pdmic.c | 5 +-- sound/soc/atmel/atmel_wm8904.c | 4 +-- sound/soc/atmel/mikroe-proto.c | 7 ++-- sound/soc/atmel/sam9g20_wm8731.c | 5 +-- sound/soc/atmel/sam9x5_wm8731.c | 5 +-- sound/soc/atmel/tse850-pcm5142.c | 4 +-- sound/soc/fsl/eukrea-tlv320.c | 5 +-- sound/soc/fsl/fsl-asoc-card.c | 6 +--- sound/soc/fsl/imx-audmix.c | 14 +++----- sound/soc/fsl/imx-es8328.c | 5 +-- sound/soc/fsl/imx-sgtl5000.c | 5 +-- sound/soc/fsl/imx-spdif.c | 5 +-- sound/soc/kirkwood/armada-370-db.c | 12 ++----- sound/soc/mxs/mxs-sgtl5000.c | 8 ++--- sound/soc/qcom/apq8016_sbc.c | 10 ++---- sound/soc/qcom/storm.c | 4 +-- sound/soc/rockchip/rk3288_hdmi_analog.c | 5 +-- sound/soc/rockchip/rockchip_max98090.c | 5 +-- sound/soc/rockchip/rockchip_rt5645.c | 5 +-- sound/soc/samsung/arndale_rt5631.c | 6 +--- sound/soc/samsung/smdk_wm8994.c | 9 ++--- sound/soc/samsung/snow.c | 10 ++---- sound/soc/samsung/tm2_wm5110.c | 12 ++----- sound/soc/sirf/sirf-audio.c | 5 +-- sound/soc/soc-core.c | 64 +++++++++++++++++---------------- sound/soc/soc-utils.c | 25 ------------- sound/soc/sunxi/sun4i-codec.c | 5 +-- sound/soc/tegra/tegra_alc5632.c | 7 +--- sound/soc/tegra/tegra_max98090.c | 5 +-- sound/soc/tegra/tegra_rt5640.c | 5 +-- sound/soc/tegra/tegra_rt5677.c | 6 +--- sound/soc/tegra/tegra_sgtl5000.c | 7 +--- sound/soc/tegra/tegra_wm8753.c | 5 +-- sound/soc/tegra/tegra_wm8903.c | 5 +-- sound/soc/tegra/tegra_wm9712.c | 5 +-- sound/soc/tegra/trimslice.c | 6 +--- sound/soc/ti/davinci-evm.c | 5 +-- sound/soc/ti/omap-abe-twl6040.c | 22 +++++------- sound/soc/ti/omap-hdmi.c | 5 +-- sound/soc/ti/omap-twl4030.c | 12 ++----- sound/soc/ti/rx51.c | 5 +-- sound/soc/ux500/mop500.c | 8 ++--- 45 files changed, 98 insertions(+), 276 deletions(-)
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
dai_link is used to selecting Component (= CPU/Codec/Platform) and DAI (= CPU/Codec). And selected CPU/Codec/Platform components are *listed* on Card.
Many drivers don't need special Platform component, but was mandatory at legacy style ALSA SoC. Thus, there is this kind of settings on many drivers.
dai_link->platform_of_node = dai_link->cpu_of_node;
In this case, soc_bind_dai_link() will pick-up "CPU component" as "Platform component", and try to add it to snd_soc_pcm_runtime. But it will be ignored, because it is already added when CPU bindings.
Historically, this kind of "CPU component" is used/selected as "Platform" on many ALSA SoC drivers. OTOH, Dummy Platform will be selected automatically by ALSA SoC if driver doesn't have Platform settings.
These indicates that there are 2 type of Platforms exist at current ALSA SoC if driver doesn't need special Platform.
1) use Dummy Platform as Platform component 2) use CPU component as Platform component
ALSA SoC will call Dummy Platform callback function if it is using Dummy Platform, but it is completely pointless. Because it is the sound card which doesn't need special Platform.
Thus, the behavior we request to ALSA SoC is selecting 2) automatically instead of 1) if sound card doesn't need special Platform. And, 2) means "do nothing" as above explain.
These were needed at legacy style dai_link, but is no longer needed at modern style dai_link anymore.
This patch allows "no Platform" settings on dai_link, and will do nothing for it if there was no platform settings. This is same as 2).
By this patch, all drivers which is selecting "CPU component" as "Platform" can remove such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- include/sound/soc.h | 2 +- sound/soc/soc-core.c | 64 +++++++++++++++++++++++++++------------------------- 2 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h index 055e6d0..2ba3099 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -926,7 +926,7 @@ struct snd_soc_dai_link { /* * You MAY specify the link's platform/PCM/DMA driver, either by * device name, or by DT/OF node, but not both. Some forms of link - * do not need a platform. + * do not need a platform. In such case, platforms are not mandatory. */ struct snd_soc_dai_link_component *platforms; unsigned int num_platforms; diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 94a36ee..db6e47a 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -788,6 +788,9 @@ static int snd_soc_is_matching_component( { struct device_node *component_of_node;
+ if (!dlc) + return 0; + component_of_node = soc_component_to_node(component);
if (dlc->of_node && component_of_node != dlc->of_node) @@ -1053,20 +1056,12 @@ static void soc_remove_dai_links(struct snd_soc_card *card) } }
-static struct snd_soc_dai_link_component dummy_link = COMP_DUMMY(); - static int soc_init_dai_link(struct snd_soc_card *card, struct snd_soc_dai_link *link) { int i; struct snd_soc_dai_link_component *codec;
- /* default Platform */ - if (!link->platforms || !link->num_platforms) { - link->platforms = &dummy_link; - link->num_platforms = 1; - } - for_each_link_codecs(link, i, codec) { /* * Codec must be specified by 1 of name or OF node, @@ -1086,32 +1081,39 @@ static int soc_init_dai_link(struct snd_soc_card *card, } }
- /* FIXME */ - if (link->num_platforms > 1) { - dev_err(card->dev, - "ASoC: multi platform is not yet supported %s\n", - link->name); - return -EINVAL; - } - /* - * Platform may be specified by either name or OF node, but - * can be left unspecified, and a dummy platform will be used. + * Platform may be specified by either name or OF node, + * or no Platform. + * + * FIXME + * + * We need multi-platform support */ - if (link->platforms->name && link->platforms->of_node) { - dev_err(card->dev, - "ASoC: Both platform name/of_node are set for %s\n", - link->name); - return -EINVAL; - } + if (link->num_platforms > 0) {
- /* - * Defer card registartion if platform dai component is not added to - * component list. - */ - if ((link->platforms->of_node || link->platforms->name) && - !soc_find_component(link->platforms->of_node, link->platforms->name)) - return -EPROBE_DEFER; + if (link->num_platforms > 1) { + dev_err(card->dev, + "ASoC: multi platform is not yet supported %s\n", + link->name); + return -EINVAL; + } + + if (link->platforms->name && link->platforms->of_node) { + dev_err(card->dev, + "ASoC: Both platform name/of_node are set for %s\n", + link->name); + return -EINVAL; + } + + /* + * Defer card registartion if platform dai component is not + * added to component list. + */ + if ((link->platforms->of_node || link->platforms->name) && + !soc_find_component(link->platforms->of_node, + link->platforms->name)) + return -EPROBE_DEFER; + }
/* FIXME */ if (link->num_cpus > 1) {
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 6beac1c..de05ac8 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -71,7 +71,6 @@ struct vc4_hdmi_audio { struct snd_soc_dai_link link; struct snd_soc_dai_link_component cpu; struct snd_soc_dai_link_component codec; - struct snd_soc_dai_link_component platform; int samplerate; int channels; struct snd_dmaengine_dai_dma_data dma_data; @@ -1101,18 +1100,15 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *hdmi)
dai_link->cpus = &hdmi->audio.cpu; dai_link->codecs = &hdmi->audio.codec; - dai_link->platforms = &hdmi->audio.platform;
dai_link->num_cpus = 1; dai_link->num_codecs = 1; - dai_link->num_platforms = 1;
dai_link->name = "MAI"; dai_link->stream_name = "MAI PCM"; dai_link->codecs->dai_name = vc4_hdmi_audio_codec_dai_drv.name; dai_link->cpus->dai_name = dev_name(dev); dai_link->codecs->name = dev_name(dev); - dai_link->platforms->name = dev_name(dev);
card->dai_link = dai_link; card->num_links = 1;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/atmel/atmel-classd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index 0f2c574..a2390e9 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -503,24 +503,21 @@ static int atmel_classd_asoc_card_init(struct device *dev, if (!dai_link) return -ENOMEM;
- comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL); if (!comp) return -ENOMEM;
dai_link->cpus = &comp[0]; dai_link->codecs = &comp[1]; - dai_link->platforms = &comp[2];
dai_link->num_cpus = 1; dai_link->num_codecs = 1; - dai_link->num_platforms = 1;
dai_link->name = "CLASSD"; dai_link->stream_name = "CLASSD PCM"; dai_link->codecs->dai_name = ATMEL_CLASSD_CODEC_DAI_NAME; dai_link->cpus->dai_name = dev_name(dev); dai_link->codecs->name = dev_name(dev); - dai_link->platforms->name = dev_name(dev);
card->dai_link = dai_link; card->num_links = 1;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/atmel/atmel-pdmic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c index e09c283..d467410 100644 --- a/sound/soc/atmel/atmel-pdmic.c +++ b/sound/soc/atmel/atmel-pdmic.c @@ -514,24 +514,21 @@ static int atmel_pdmic_asoc_card_init(struct device *dev, if (!dai_link) return -ENOMEM;
- comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL); if (!comp) return -ENOMEM;
dai_link->cpus = &comp[0]; dai_link->codecs = &comp[1]; - dai_link->platforms = &comp[2];
dai_link->num_cpus = 1; dai_link->num_codecs = 1; - dai_link->num_platforms = 1;
dai_link->name = "PDMIC"; dai_link->stream_name = "PDMIC PCM"; dai_link->codecs->dai_name = ATMEL_PDMIC_CODEC_DAI_NAME; dai_link->cpus->dai_name = dev_name(dev); dai_link->codecs->name = dev_name(dev); - dai_link->platforms->name = dev_name(dev);
card->dai_link = dai_link; card->num_links = 1;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/atmel/atmel_wm8904.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index 776b27d..84e5e5d 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c @@ -58,8 +58,7 @@ static const struct snd_soc_ops atmel_asoc_wm8904_ops = {
SND_SOC_DAILINK_DEFS(pcm, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8904-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8904-hifi")));
static struct snd_soc_dai_link atmel_asoc_wm8904_dailink = { .name = "WM8904", @@ -113,7 +112,6 @@ static int atmel_asoc_wm8904_dt_init(struct platform_device *pdev) return ret; } dailink->cpus->of_node = cpu_np; - dailink->platforms->of_node = cpu_np; of_node_put(cpu_np);
codec_np = of_parse_phandle(np, "atmel,audio-codec", 0);
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/atmel/mikroe-proto.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/sound/soc/atmel/mikroe-proto.c b/sound/soc/atmel/mikroe-proto.c index 255168a..5335ca0 100644 --- a/sound/soc/atmel/mikroe-proto.c +++ b/sound/soc/atmel/mikroe-proto.c @@ -88,8 +88,8 @@ static int snd_proto_probe(struct platform_device *pdev) if (!dai) return -ENOMEM;
- /* for cpus/codecs/platforms */ - comp = devm_kzalloc(&pdev->dev, 3 * sizeof(*comp), GFP_KERNEL); + /* for cpus/codecs */ + comp = devm_kzalloc(&pdev->dev, 2 * sizeof(*comp), GFP_KERNEL); if (!comp) return -ENOMEM;
@@ -100,8 +100,6 @@ static int snd_proto_probe(struct platform_device *pdev) dai->num_cpus = 1; dai->codecs = &comp[1]; dai->num_codecs = 1; - dai->platforms = &comp[2]; - dai->num_platforms = 1;
dai->name = "WM8731"; dai->stream_name = "WM8731 HiFi"; @@ -121,7 +119,6 @@ static int snd_proto_probe(struct platform_device *pdev) return -EINVAL; } dai->cpus->of_node = cpu_np; - dai->platforms->of_node = cpu_np;
dai_fmt = snd_soc_of_parse_daifmt(np, NULL, &bitclkmaster, &framemaster);
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/atmel/sam9g20_wm8731.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index b1bef2b..df098d3 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c @@ -118,8 +118,7 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd)
SND_SOC_DAILINK_DEFS(pcm, DAILINK_COMP_ARRAY(COMP_CPU("at91rm9200_ssc.0")), - DAILINK_COMP_ARRAY(COMP_CODEC("wm8731.0-001b", "wm8731-hifi")), - DAILINK_COMP_ARRAY(COMP_PLATFORM("at91rm9200_ssc.0"))); + DAILINK_COMP_ARRAY(COMP_CODEC("wm8731.0-001b", "wm8731-hifi")));
static struct snd_soc_dai_link at91sam9g20ek_dai = { .name = "WM8731", @@ -210,14 +209,12 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
/* Parse dai and platform info */ at91sam9g20ek_dai.cpus->dai_name = NULL; - at91sam9g20ek_dai.platforms->name = NULL; cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0); if (!cpu_np) { dev_err(&pdev->dev, "dai and pcm info missing\n"); return -EINVAL; } at91sam9g20ek_dai.cpus->of_node = cpu_np; - at91sam9g20ek_dai.platforms->of_node = cpu_np;
of_node_put(codec_np); of_node_put(cpu_np);
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/atmel/sam9x5_wm8731.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/atmel/sam9x5_wm8731.c b/sound/soc/atmel/sam9x5_wm8731.c index 7822425..d2dc344 100644 --- a/sound/soc/atmel/sam9x5_wm8731.c +++ b/sound/soc/atmel/sam9x5_wm8731.c @@ -88,7 +88,7 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) card = devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL); priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); dai = devm_kzalloc(&pdev->dev, sizeof(*dai), GFP_KERNEL); - comp = devm_kzalloc(&pdev->dev, 3 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(&pdev->dev, 2 * sizeof(*comp), GFP_KERNEL); if (!dai || !card || !priv || !comp) { ret = -ENOMEM; goto out; @@ -107,8 +107,6 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) dai->num_cpus = 1; dai->codecs = &comp[1]; dai->num_codecs = 1; - dai->platforms = &comp[2]; - dai->num_platforms = 1;
dai->name = "WM8731"; dai->stream_name = "WM8731 PCM"; @@ -145,7 +143,6 @@ static int sam9x5_wm8731_driver_probe(struct platform_device *pdev) goto out; } dai->cpus->of_node = cpu_np; - dai->platforms->of_node = cpu_np;
priv->ssc_id = of_alias_get_id(cpu_np, "ssc");
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/atmel/tse850-pcm5142.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/atmel/tse850-pcm5142.c b/sound/soc/atmel/tse850-pcm5142.c index 59e2edb..319acb1 100644 --- a/sound/soc/atmel/tse850-pcm5142.c +++ b/sound/soc/atmel/tse850-pcm5142.c @@ -296,8 +296,7 @@ static const struct snd_soc_dapm_route tse850_intercon[] = {
SND_SOC_DAILINK_DEFS(pcm, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "pcm512x-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "pcm512x-hifi")));
static struct snd_soc_dai_link tse850_dailink = { .name = "TSE-850", @@ -337,7 +336,6 @@ static int tse850_dt_init(struct platform_device *pdev) return -EINVAL; } dailink->cpus->of_node = cpu_np; - dailink->platforms->of_node = cpu_np; of_node_put(cpu_np);
codec_np = of_parse_phandle(np, "axentia,audio-codec", 0);
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/fsl/eukrea-tlv320.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/fsl/eukrea-tlv320.c b/sound/soc/fsl/eukrea-tlv320.c index 6f3b768..1ed409d 100644 --- a/sound/soc/fsl/eukrea-tlv320.c +++ b/sound/soc/fsl/eukrea-tlv320.c @@ -63,8 +63,7 @@ static const struct snd_soc_ops eukrea_tlv320_snd_ops = {
SND_SOC_DAILINK_DEFS(hifi, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic23-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic23-hifi")));
static struct snd_soc_dai_link eukrea_tlv320_dai = { .name = "tlv320aic23", @@ -134,10 +133,8 @@ static int eukrea_tlv320_probe(struct platform_device *pdev) ext_port--;
eukrea_tlv320_dai.cpus->of_node = ssi_np; - eukrea_tlv320_dai.platforms->of_node = ssi_np; } else { eukrea_tlv320_dai.cpus->dai_name = "imx-ssi.0"; - eukrea_tlv320_dai.platforms->name = "imx-ssi.0"; eukrea_tlv320_dai.codecs->name = "tlv320aic23-codec.0-001a"; eukrea_tlv320.name = "cpuimx-audio"; }
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/fsl/fsl-asoc-card.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 39ea9bd..55a7e09 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -202,13 +202,11 @@ static int be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
SND_SOC_DAILINK_DEFS(hifi, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_EMPTY()), DAILINK_COMP_ARRAY(COMP_EMPTY()));
SND_SOC_DAILINK_DEFS(hifi_fe, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_DUMMY()), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_DUMMY()));
SND_SOC_DAILINK_DEFS(hifi_be, DAILINK_COMP_ARRAY(COMP_EMPTY()), @@ -656,14 +654,12 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) } }
- priv->dai_link[0].platforms->of_node = cpu_np; priv->dai_link[0].dai_fmt = priv->dai_fmt; priv->card.num_links = 1;
if (asrc_pdev) { /* DPCM DAI Links only if ASRC exsits */ priv->dai_link[1].cpus->of_node = asrc_np; - priv->dai_link[1].platforms->of_node = asrc_np; priv->dai_link[2].codecs->dai_name = codec_dai_name; priv->dai_link[2].codecs->of_node = codec_np; priv->dai_link[2].codecs->name =
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/fsl/imx-es8328.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/fsl/imx-es8328.c b/sound/soc/fsl/imx-es8328.c index 15a27a2..089ee14 100644 --- a/sound/soc/fsl/imx-es8328.c +++ b/sound/soc/fsl/imx-es8328.c @@ -148,7 +148,7 @@ static int imx_es8328_probe(struct platform_device *pdev) goto fail; }
- comp = devm_kzalloc(dev, 3 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL); if (!comp) { ret = -ENOMEM; goto fail; @@ -160,18 +160,15 @@ static int imx_es8328_probe(struct platform_device *pdev)
data->dai.cpus = &comp[0]; data->dai.codecs = &comp[1]; - data->dai.platforms = &comp[2];
data->dai.num_cpus = 1; data->dai.num_codecs = 1; - data->dai.num_platforms = 1;
data->dai.name = "hifi"; data->dai.stream_name = "hifi"; data->dai.codecs->dai_name = "es8328-hifi-analog"; data->dai.codecs->of_node = codec_np; data->dai.cpus->of_node = ssi_np; - data->dai.platforms->of_node = ssi_np; data->dai.init = &imx_es8328_dai_init; data->dai.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/fsl/imx-sgtl5000.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c index 15e8b93..c5ebe49 100644 --- a/sound/soc/fsl/imx-sgtl5000.c +++ b/sound/soc/fsl/imx-sgtl5000.c @@ -123,7 +123,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev) goto fail; }
- comp = devm_kzalloc(&pdev->dev, 3 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(&pdev->dev, 2 * sizeof(*comp), GFP_KERNEL); if (!comp) { ret = -ENOMEM; goto fail; @@ -139,18 +139,15 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
data->dai.cpus = &comp[0]; data->dai.codecs = &comp[1]; - data->dai.platforms = &comp[2];
data->dai.num_cpus = 1; data->dai.num_codecs = 1; - data->dai.num_platforms = 1;
data->dai.name = "HiFi"; data->dai.stream_name = "HiFi"; data->dai.codecs->dai_name = "sgtl5000"; data->dai.codecs->of_node = codec_np; data->dai.cpus->of_node = ssi_np; - data->dai.platforms->of_node = ssi_np; data->dai.init = &imx_sgtl5000_dai_init; data->dai.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/fsl/imx-spdif.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c index 6c4dadf..393c5a3 100644 --- a/sound/soc/fsl/imx-spdif.c +++ b/sound/soc/fsl/imx-spdif.c @@ -26,7 +26,7 @@ static int imx_spdif_audio_probe(struct platform_device *pdev) }
data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL); - comp = devm_kzalloc(&pdev->dev, 3 * sizeof(*comp), GFP_KERNEL); + comp = devm_kzalloc(&pdev->dev, 2 * sizeof(*comp), GFP_KERNEL); if (!data || !comp) { ret = -ENOMEM; goto end; @@ -34,18 +34,15 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
data->dai.cpus = &comp[0]; data->dai.codecs = &comp[1]; - data->dai.platforms = &comp[2];
data->dai.num_cpus = 1; data->dai.num_codecs = 1; - data->dai.num_platforms = 1;
data->dai.name = "S/PDIF PCM"; data->dai.stream_name = "S/PDIF PCM"; data->dai.codecs->dai_name = "snd-soc-dummy-dai"; data->dai.codecs->name = "snd-soc-dummy"; data->dai.cpus->of_node = spdif_np; - data->dai.platforms->of_node = spdif_np; data->dai.playback_only = true; data->dai.capture_only = true;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/fsl/imx-audmix.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c index 9e1cb18..9d41266 100644 --- a/sound/soc/fsl/imx-audmix.c +++ b/sound/soc/fsl/imx-audmix.c @@ -207,8 +207,8 @@ static int imx_audmix_probe(struct platform_device *pdev) for (i = 0; i < num_dai; i++) { struct snd_soc_dai_link_component *dlc;
- /* for CPU/Codec/Platform x 2 */ - dlc = devm_kzalloc(&pdev->dev, 6 * sizeof(*dlc), GFP_KERNEL); + /* for CPU/Codec x 2 */ + dlc = devm_kzalloc(&pdev->dev, 4 * sizeof(*dlc), GFP_KERNEL); if (!dlc) { dev_err(&pdev->dev, "failed to allocate dai_link\n"); return -ENOMEM; @@ -242,11 +242,9 @@ static int imx_audmix_probe(struct platform_device *pdev)
priv->dai[i].cpus = &dlc[0]; priv->dai[i].codecs = &dlc[1]; - priv->dai[i].platforms = &dlc[2];
priv->dai[i].num_cpus = 1; priv->dai[i].num_codecs = 1; - priv->dai[i].num_platforms = 1;
priv->dai[i].name = dai_name; priv->dai[i].stream_name = "HiFi-AUDMIX-FE"; @@ -254,7 +252,6 @@ static int imx_audmix_probe(struct platform_device *pdev) priv->dai[i].codecs->name = "snd-soc-dummy"; priv->dai[i].cpus->of_node = args.np; priv->dai[i].cpus->dai_name = dev_name(&cpu_pdev->dev); - priv->dai[i].platforms->of_node = args.np; priv->dai[i].dynamic = 1; priv->dai[i].dpcm_playback = 1; priv->dai[i].dpcm_capture = (i == 0 ? 1 : 0); @@ -269,20 +266,17 @@ static int imx_audmix_probe(struct platform_device *pdev) be_cp = devm_kasprintf(&pdev->dev, GFP_KERNEL, "AUDMIX-Capture-%d", i);
- priv->dai[num_dai + i].cpus = &dlc[3]; - priv->dai[num_dai + i].codecs = &dlc[4]; - priv->dai[num_dai + i].platforms = &dlc[5]; + priv->dai[num_dai + i].cpus = &dlc[2]; + priv->dai[num_dai + i].codecs = &dlc[3];
priv->dai[num_dai + i].num_cpus = 1; priv->dai[num_dai + i].num_codecs = 1; - priv->dai[num_dai + i].num_platforms = 1;
priv->dai[num_dai + i].name = be_name; priv->dai[num_dai + i].codecs->dai_name = "snd-soc-dummy-dai"; priv->dai[num_dai + i].codecs->name = "snd-soc-dummy"; priv->dai[num_dai + i].cpus->of_node = audmix_np; priv->dai[num_dai + i].cpus->dai_name = be_name; - priv->dai[num_dai + i].platforms->name = "snd-soc-dummy"; priv->dai[num_dai + i].no_pcm = 1; priv->dai[num_dai + i].dpcm_playback = 1; priv->dai[num_dai + i].dpcm_capture = 1;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/kirkwood/armada-370-db.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/sound/soc/kirkwood/armada-370-db.c b/sound/soc/kirkwood/armada-370-db.c index 8c3c808..fcf84a5 100644 --- a/sound/soc/kirkwood/armada-370-db.c +++ b/sound/soc/kirkwood/armada-370-db.c @@ -56,18 +56,15 @@ static const struct snd_soc_dapm_route a370db_route[] = {
SND_SOC_DAILINK_DEFS(analog, DAILINK_COMP_ARRAY(COMP_CPU("i2s")), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "cs42l51-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "cs42l51-hifi")));
SND_SOC_DAILINK_DEFS(spdif_out, DAILINK_COMP_ARRAY(COMP_CPU("spdif")), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "dit-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "dit-hifi")));
SND_SOC_DAILINK_DEFS(spdif_in, DAILINK_COMP_ARRAY(COMP_CPU("spdif")), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "dir-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "dir-hifi")));
static struct snd_soc_dai_link a370db_dai[] = { { @@ -111,21 +108,18 @@ static int a370db_probe(struct platform_device *pdev) a370db_dai[0].cpus->of_node = of_parse_phandle(pdev->dev.of_node, "marvell,audio-controller", 0); - a370db_dai[0].platforms->of_node = a370db_dai[0].cpus->of_node;
a370db_dai[0].codecs->of_node = of_parse_phandle(pdev->dev.of_node, "marvell,audio-codec", 0);
a370db_dai[1].cpus->of_node = a370db_dai[0].cpus->of_node; - a370db_dai[1].platforms->of_node = a370db_dai[0].cpus->of_node;
a370db_dai[1].codecs->of_node = of_parse_phandle(pdev->dev.of_node, "marvell,audio-codec", 1);
a370db_dai[2].cpus->of_node = a370db_dai[0].cpus->of_node; - a370db_dai[2].platforms->of_node = a370db_dai[0].cpus->of_node;
a370db_dai[2].codecs->of_node = of_parse_phandle(pdev->dev.of_node,
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/mxs/mxs-sgtl5000.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c index 9841e1d..aa24d0d 100644 --- a/sound/soc/mxs/mxs-sgtl5000.c +++ b/sound/soc/mxs/mxs-sgtl5000.c @@ -65,13 +65,11 @@ static const struct snd_soc_ops mxs_sgtl5000_hifi_ops = {
SND_SOC_DAILINK_DEFS(hifi_tx, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")));
SND_SOC_DAILINK_DEFS(hifi_rx, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")));
static struct snd_soc_dai_link mxs_sgtl5000_dai[] = { { @@ -126,8 +124,6 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev) mxs_sgtl5000_dai[i].codecs->of_node = codec_np; mxs_sgtl5000_dai[i].cpus->dai_name = NULL; mxs_sgtl5000_dai[i].cpus->of_node = saif_np[i]; - mxs_sgtl5000_dai[i].platforms->name = NULL; - mxs_sgtl5000_dai[i].platforms->of_node = saif_np[i]; }
of_node_put(codec_np);
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/qcom/apq8016_sbc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index 717542c..9ac7c9d 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -159,15 +159,12 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card)
link = data->dai_link;
- dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL); + dlc = devm_kzalloc(dev, sizeof(*dlc), GFP_KERNEL); if (!dlc) return ERR_PTR(-ENOMEM);
- link->cpus = &dlc[0]; - link->platforms = &dlc[1]; - - link->num_cpus = 1; - link->num_platforms = 1; + link->cpus = dlc; + link->num_cpus = 1;
for_each_child_of_node(node, np) { cpu = of_get_child_by_name(np, "cpu"); @@ -199,7 +196,6 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) goto error; }
- link->platforms->of_node = link->cpus->of_node; ret = of_property_read_string(np, "link-name", &link->name); if (ret) { dev_err(card->dev, "error getting codec dai_link name\n");
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/qcom/storm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/qcom/storm.c b/sound/soc/qcom/storm.c index 672edee..9c67e42 100644 --- a/sound/soc/qcom/storm.c +++ b/sound/soc/qcom/storm.c @@ -63,8 +63,7 @@ static const struct snd_soc_ops storm_soc_ops = {
SND_SOC_DAILINK_DEFS(hifi, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")));
static struct snd_soc_dai_link storm_dai_link = { .name = "Primary", @@ -83,7 +82,6 @@ static int storm_parse_of(struct snd_soc_card *card) dev_err(card->dev, "error getting cpu phandle\n"); return -EINVAL; } - dai_link->platforms->of_node = dai_link->cpus->of_node;
dai_link->codecs->of_node = of_parse_phandle(np, "codec", 0); if (!dai_link->codecs->of_node) {
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/rockchip/rk3288_hdmi_analog.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c index 767700c3..731f75d 100644 --- a/sound/soc/rockchip/rk3288_hdmi_analog.c +++ b/sound/soc/rockchip/rk3288_hdmi_analog.c @@ -142,8 +142,7 @@ static const struct snd_soc_ops rk_ops = { SND_SOC_DAILINK_DEFS(audio, DAILINK_COMP_ARRAY(COMP_EMPTY()), DAILINK_COMP_ARRAY(COMP_CODEC(NULL, NULL), - COMP_CODEC("hdmi-audio-codec.2.auto", "i2s-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + COMP_CODEC("hdmi-audio-codec.2.auto", "i2s-hifi")));
static struct snd_soc_dai_link rk_dailink = { .name = "Codecs", @@ -237,8 +236,6 @@ static int snd_rk_mc_probe(struct platform_device *pdev) return -EINVAL; }
- rk_dailink.platforms->of_node = rk_dailink.cpus->of_node; - ret = snd_soc_of_parse_audio_routing(card, "rockchip,routing"); if (ret) { dev_err(&pdev->dev,
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/rockchip/rockchip_max98090.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_max98090.c b/sound/soc/rockchip/rockchip_max98090.c index c5fc246..cc08cd8 100644 --- a/sound/soc/rockchip/rockchip_max98090.c +++ b/sound/soc/rockchip/rockchip_max98090.c @@ -113,8 +113,7 @@ static const struct snd_soc_ops rk_aif1_ops = {
SND_SOC_DAILINK_DEFS(hifi, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")));
static struct snd_soc_dai_link rk_dailink = { .name = "max98090", @@ -193,8 +192,6 @@ static int snd_rk_mc_probe(struct platform_device *pdev) return -EINVAL; }
- rk_dailink.platforms->of_node = rk_dailink.cpus->of_node; - rk_98090_headset_dev.codec_of_node = of_parse_phandle(np, "rockchip,headset-codec", 0); if (!rk_98090_headset_dev.codec_of_node) {
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/rockchip/rockchip_rt5645.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/rockchip/rockchip_rt5645.c b/sound/soc/rockchip/rockchip_rt5645.c index 26b67b2..fe53372 100644 --- a/sound/soc/rockchip/rockchip_rt5645.c +++ b/sound/soc/rockchip/rockchip_rt5645.c @@ -125,8 +125,7 @@ static const struct snd_soc_ops rk_aif1_ops = {
SND_SOC_DAILINK_DEFS(pcm, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5645-aif1")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5645-aif1")));
static struct snd_soc_dai_link rk_dailink = { .name = "rt5645", @@ -178,8 +177,6 @@ static int snd_rk_mc_probe(struct platform_device *pdev) goto put_codec_of_node; }
- rk_dailink.platforms->of_node = rk_dailink.cpus->of_node; - ret = snd_soc_of_parse_card_name(card, "rockchip,model"); if (ret) { dev_err(&pdev->dev,
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/samsung/arndale_rt5631.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/samsung/arndale_rt5631.c b/sound/soc/samsung/arndale_rt5631.c index c213913..e36c140 100644 --- a/sound/soc/samsung/arndale_rt5631.c +++ b/sound/soc/samsung/arndale_rt5631.c @@ -52,8 +52,7 @@ static struct snd_soc_ops arndale_ops = {
SND_SOC_DAILINK_DEFS(rt5631_hifi, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5631-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5631-hifi")));
static struct snd_soc_dai_link arndale_rt5631_dai[] = { { @@ -93,9 +92,6 @@ static int arndale_audio_probe(struct platform_device *pdev) return -EINVAL; } } - if (!arndale_rt5631_dai[n].platforms->name) - arndale_rt5631_dai[n].platforms->of_node = - arndale_rt5631_dai[n].cpus->of_node;
arndale_rt5631_dai[n].codecs->name = NULL; arndale_rt5631_dai[n].codecs->of_node = of_parse_phandle(np,
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/samsung/smdk_wm8994.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c index 28f8be0..99aa162 100644 --- a/sound/soc/samsung/smdk_wm8994.c +++ b/sound/soc/samsung/smdk_wm8994.c @@ -102,13 +102,11 @@ static int smdk_wm8994_init_paiftx(struct snd_soc_pcm_runtime *rtd)
SND_SOC_DAILINK_DEFS(aif1, DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")), - DAILINK_COMP_ARRAY(COMP_CODEC("wm8994-codec", "wm8994-aif1")), - DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0"))); + DAILINK_COMP_ARRAY(COMP_CODEC("wm8994-codec", "wm8994-aif1")));
SND_SOC_DAILINK_DEFS(fifo_tx, DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s-sec")), - DAILINK_COMP_ARRAY(COMP_CODEC("wm8994-codec", "wm8994-aif1")), - DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s-sec"))); + DAILINK_COMP_ARRAY(COMP_CODEC("wm8994-codec", "wm8994-aif1")));
static struct snd_soc_dai_link smdk_dai[] = { { /* Primary DAI i/f */ @@ -165,9 +163,6 @@ static int smdk_audio_probe(struct platform_device *pdev) "Property 'samsung,i2s-controller' missing or invalid\n"); ret = -EINVAL; } - - smdk_dai[0].platforms->name = NULL; - smdk_dai[0].platforms->of_node = smdk_dai[0].cpus->of_node; }
id = of_match_device(of_match_ptr(samsung_wm8994_of_match), &pdev->dev);
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/samsung/snow.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/sound/soc/samsung/snow.c b/sound/soc/samsung/snow.c index 8ea7799..7d669c4 100644 --- a/sound/soc/samsung/snow.c +++ b/sound/soc/samsung/snow.c @@ -14,9 +14,9 @@
#define FIN_PLL_RATE 24000000
-SND_SOC_DAILINK_DEFS(links, - DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_EMPTY()), +SND_SOC_DAILINK_DEF(links_cpus, + DAILINK_COMP_ARRAY(COMP_EMPTY())); +SND_SOC_DAILINK_DEF(links_codecs, DAILINK_COMP_ARRAY(COMP_EMPTY()));
struct snow_priv { @@ -150,8 +150,6 @@ static int snow_probe(struct platform_device *pdev) link->num_cpus = ARRAY_SIZE(links_cpus); link->codecs = links_codecs; link->num_codecs = ARRAY_SIZE(links_codecs); - link->platforms = links_platforms; - link->num_platforms = ARRAY_SIZE(links_platforms);
card->dai_link = link; card->num_links = 1; @@ -207,8 +205,6 @@ static int snow_probe(struct platform_device *pdev) } }
- link->platforms->of_node = link->cpus->of_node; - /* Update card-name if provided through DT, else use default name */ snd_soc_of_parse_card_name(card, "samsung,model");
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/samsung/tm2_wm5110.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/sound/soc/samsung/tm2_wm5110.c b/sound/soc/samsung/tm2_wm5110.c index c091033..a807810 100644 --- a/sound/soc/samsung/tm2_wm5110.c +++ b/sound/soc/samsung/tm2_wm5110.c @@ -429,22 +429,18 @@ static struct snd_soc_dai_driver tm2_ext_dai[] = {
SND_SOC_DAILINK_DEFS(aif1, DAILINK_COMP_ARRAY(COMP_CPU(SAMSUNG_I2S_DAI)), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm5110-aif1")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm5110-aif1")));
SND_SOC_DAILINK_DEFS(voice, DAILINK_COMP_ARRAY(COMP_CPU(SAMSUNG_I2S_DAI)), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm5110-aif2")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm5110-aif2")));
SND_SOC_DAILINK_DEFS(bt, DAILINK_COMP_ARRAY(COMP_CPU(SAMSUNG_I2S_DAI)), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm5110-aif3")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm5110-aif3")));
SND_SOC_DAILINK_DEFS(hdmi, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_EMPTY()), DAILINK_COMP_ARRAY(COMP_EMPTY()));
static struct snd_soc_dai_link tm2_dai_links[] = { @@ -576,14 +572,12 @@ static int tm2_probe(struct platform_device *pdev) unsigned int dai_index = 0; /* WM5110 */
dai_link->cpus->name = NULL; - dai_link->platforms->name = NULL;
if (num_codecs > 1 && i == card->num_links - 1) dai_index = 1; /* HDMI */
dai_link->codecs->of_node = codec_dai_node[dai_index]; dai_link->cpus->of_node = cpu_dai_node[dai_index]; - dai_link->platforms->of_node = cpu_dai_node[dai_index]; }
if (num_codecs > 1) {
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/sirf/sirf-audio.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/sirf/sirf-audio.c b/sound/soc/sirf/sirf-audio.c index c923b67..45ad236 100644 --- a/sound/soc/sirf/sirf-audio.c +++ b/sound/soc/sirf/sirf-audio.c @@ -62,8 +62,7 @@ static const struct snd_soc_dapm_route intercon[] = { /* Digital audio interface glue - connects codec <--> CPU */ SND_SOC_DAILINK_DEFS(sirf, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sirf-audio-codec")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sirf-audio-codec")));
static struct snd_soc_dai_link sirf_audio_dai_link[] = { { @@ -98,8 +97,6 @@ static int sirf_audio_probe(struct platform_device *pdev)
sirf_audio_dai_link[0].cpus->of_node = of_parse_phandle(pdev->dev.of_node, "sirf,audio-platform", 0); - sirf_audio_dai_link[0].platforms->of_node = - of_parse_phandle(pdev->dev.of_node, "sirf,audio-platform", 0); sirf_audio_dai_link[0].codecs->of_node = of_parse_phandle(pdev->dev.of_node, "sirf,audio-codec", 0); sirf_audio_card->gpio_spk_pa = of_get_named_gpio(pdev->dev.of_node,
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/sunxi/sun4i-codec.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 619073e..cd96cf5b 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -1297,24 +1297,21 @@ static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev, struct snd_soc_dai_link *link = devm_kzalloc(dev, sizeof(*link), GFP_KERNEL); struct snd_soc_dai_link_component *dlc = devm_kzalloc(dev, - 3 * sizeof(*dlc), GFP_KERNEL); + 2 * sizeof(*dlc), GFP_KERNEL); if (!link || !dlc) return NULL;
link->cpus = &dlc[0]; link->codecs = &dlc[1]; - link->platforms = &dlc[2];
link->num_cpus = 1; link->num_codecs = 1; - link->num_platforms = 1;
link->name = "cdc"; link->stream_name = "CDC PCM"; link->codecs->dai_name = "Codec"; link->cpus->dai_name = dev_name(dev); link->codecs->name = dev_name(dev); - link->platforms->name = dev_name(dev); link->dai_fmt = SND_SOC_DAIFMT_I2S;
*num_links = 1;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/tegra/tegra_alc5632.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c index 5a63249..2c1f131 100644 --- a/sound/soc/tegra/tegra_alc5632.c +++ b/sound/soc/tegra/tegra_alc5632.c @@ -126,8 +126,7 @@ static int tegra_alc5632_asoc_init(struct snd_soc_pcm_runtime *rtd)
SND_SOC_DAILINK_DEFS(pcm, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "alc5632-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "alc5632-hifi")));
static struct snd_soc_dai_link tegra_alc5632_dai = { .name = "ALC5632", @@ -198,8 +197,6 @@ static int tegra_alc5632_probe(struct platform_device *pdev) goto err_put_codec_of_node; }
- tegra_alc5632_dai.platforms->of_node = tegra_alc5632_dai.cpus->of_node; - ret = tegra_asoc_utils_init(&alc5632->util_data, &pdev->dev); if (ret) goto err_put_cpu_of_node; @@ -218,7 +215,6 @@ static int tegra_alc5632_probe(struct platform_device *pdev) err_put_cpu_of_node: of_node_put(tegra_alc5632_dai.cpus->of_node); tegra_alc5632_dai.cpus->of_node = NULL; - tegra_alc5632_dai.platforms->of_node = NULL; err_put_codec_of_node: of_node_put(tegra_alc5632_dai.codecs->of_node); tegra_alc5632_dai.codecs->of_node = NULL; @@ -237,7 +233,6 @@ static int tegra_alc5632_remove(struct platform_device *pdev)
of_node_put(tegra_alc5632_dai.cpus->of_node); tegra_alc5632_dai.cpus->of_node = NULL; - tegra_alc5632_dai.platforms->of_node = NULL; of_node_put(tegra_alc5632_dai.codecs->of_node); tegra_alc5632_dai.codecs->of_node = NULL;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/tegra/tegra_max98090.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c index 4954a33..4786baa 100644 --- a/sound/soc/tegra/tegra_max98090.c +++ b/sound/soc/tegra/tegra_max98090.c @@ -167,8 +167,7 @@ static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd)
SND_SOC_DAILINK_DEFS(pcm, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")));
static struct snd_soc_dai_link tegra_max98090_dai = { .name = "max98090", @@ -242,8 +241,6 @@ static int tegra_max98090_probe(struct platform_device *pdev) goto err; }
- tegra_max98090_dai.platforms->of_node = tegra_max98090_dai.cpus->of_node; - ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) goto err;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/tegra/tegra_rt5640.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c index d46915a..4ed0468 100644 --- a/sound/soc/tegra/tegra_rt5640.c +++ b/sound/soc/tegra/tegra_rt5640.c @@ -117,8 +117,7 @@ static int tegra_rt5640_asoc_init(struct snd_soc_pcm_runtime *rtd)
SND_SOC_DAILINK_DEFS(aif1, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5640-aif1")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5640-aif1")));
static struct snd_soc_dai_link tegra_rt5640_dai = { .name = "RT5640", @@ -188,8 +187,6 @@ static int tegra_rt5640_probe(struct platform_device *pdev) goto err; }
- tegra_rt5640_dai.platforms->of_node = tegra_rt5640_dai.cpus->of_node; - ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) goto err;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/tegra/tegra_rt5677.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/tegra/tegra_rt5677.c b/sound/soc/tegra/tegra_rt5677.c index 81cb6cc..738bdf8 100644 --- a/sound/soc/tegra/tegra_rt5677.c +++ b/sound/soc/tegra/tegra_rt5677.c @@ -160,8 +160,7 @@ static int tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd)
SND_SOC_DAILINK_DEFS(pcm, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5677-aif1")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5677-aif1")));
static struct snd_soc_dai_link tegra_rt5677_dai = { .name = "RT5677", @@ -260,7 +259,6 @@ static int tegra_rt5677_probe(struct platform_device *pdev) ret = -EINVAL; goto err_put_codec_of_node; } - tegra_rt5677_dai.platforms->of_node = tegra_rt5677_dai.cpus->of_node;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) @@ -280,7 +278,6 @@ static int tegra_rt5677_probe(struct platform_device *pdev) err_put_cpu_of_node: of_node_put(tegra_rt5677_dai.cpus->of_node); tegra_rt5677_dai.cpus->of_node = NULL; - tegra_rt5677_dai.platforms->of_node = NULL; err_put_codec_of_node: of_node_put(tegra_rt5677_dai.codecs->of_node); tegra_rt5677_dai.codecs->of_node = NULL; @@ -297,7 +294,6 @@ static int tegra_rt5677_remove(struct platform_device *pdev)
tegra_asoc_utils_fini(&machine->util_data);
- tegra_rt5677_dai.platforms->of_node = NULL; of_node_put(tegra_rt5677_dai.codecs->of_node); tegra_rt5677_dai.codecs->of_node = NULL; of_node_put(tegra_rt5677_dai.cpus->of_node);
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/tegra/tegra_sgtl5000.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c index e13b81d..07504a2 100644 --- a/sound/soc/tegra/tegra_sgtl5000.c +++ b/sound/soc/tegra/tegra_sgtl5000.c @@ -83,8 +83,7 @@ static const struct snd_soc_dapm_widget tegra_sgtl5000_dapm_widgets[] = {
SND_SOC_DAILINK_DEFS(hifi, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "sgtl5000")));
static struct snd_soc_dai_link tegra_sgtl5000_dai = { .name = "sgtl5000", @@ -146,8 +145,6 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev) goto err_put_codec_of_node; }
- tegra_sgtl5000_dai.platforms->of_node = tegra_sgtl5000_dai.cpus->of_node; - ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) goto err_put_cpu_of_node; @@ -166,7 +163,6 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev) err_put_cpu_of_node: of_node_put(tegra_sgtl5000_dai.cpus->of_node); tegra_sgtl5000_dai.cpus->of_node = NULL; - tegra_sgtl5000_dai.platforms->of_node = NULL; err_put_codec_of_node: of_node_put(tegra_sgtl5000_dai.codecs->of_node); tegra_sgtl5000_dai.codecs->of_node = NULL; @@ -186,7 +182,6 @@ static int tegra_sgtl5000_driver_remove(struct platform_device *pdev)
of_node_put(tegra_sgtl5000_dai.cpus->of_node); tegra_sgtl5000_dai.cpus->of_node = NULL; - tegra_sgtl5000_dai.platforms->of_node = NULL; of_node_put(tegra_sgtl5000_dai.codecs->of_node); tegra_sgtl5000_dai.codecs->of_node = NULL;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/tegra/tegra_wm8753.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/tegra/tegra_wm8753.c b/sound/soc/tegra/tegra_wm8753.c index 8492b3d..bbefad5 100644 --- a/sound/soc/tegra/tegra_wm8753.c +++ b/sound/soc/tegra/tegra_wm8753.c @@ -100,8 +100,7 @@ static const struct snd_soc_dapm_widget tegra_wm8753_dapm_widgets[] = {
SND_SOC_DAILINK_DEFS(pcm, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8753-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8753-hifi")));
static struct snd_soc_dai_link tegra_wm8753_dai = { .name = "WM8753", @@ -165,8 +164,6 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev) goto err; }
- tegra_wm8753_dai.platforms->of_node = tegra_wm8753_dai.cpus->of_node; - ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) goto err;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/tegra/tegra_wm8903.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c index 5915bf4..8a80237 100644 --- a/sound/soc/tegra/tegra_wm8903.c +++ b/sound/soc/tegra/tegra_wm8903.c @@ -211,8 +211,7 @@ static int tegra_wm8903_remove(struct snd_soc_card *card)
SND_SOC_DAILINK_DEFS(hifi, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8903-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "wm8903-hifi")));
static struct snd_soc_dai_link tegra_wm8903_dai = { .name = "WM8903", @@ -339,8 +338,6 @@ static int tegra_wm8903_driver_probe(struct platform_device *pdev) goto err; }
- tegra_wm8903_dai.platforms->of_node = tegra_wm8903_dai.cpus->of_node; - ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) goto err;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/tegra/tegra_wm9712.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/tegra/tegra_wm9712.c b/sound/soc/tegra/tegra_wm9712.c index b85bd9f..b5faf70 100644 --- a/sound/soc/tegra/tegra_wm9712.c +++ b/sound/soc/tegra/tegra_wm9712.c @@ -42,8 +42,7 @@ static int tegra_wm9712_init(struct snd_soc_pcm_runtime *rtd)
SND_SOC_DAILINK_DEFS(hifi, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC("wm9712-codec", "wm9712-hifi")));
static struct snd_soc_dai_link tegra_wm9712_dai = { .name = "AC97 HiFi", @@ -105,8 +104,6 @@ static int tegra_wm9712_driver_probe(struct platform_device *pdev) goto codec_unregister; }
- tegra_wm9712_dai.platforms->of_node = tegra_wm9712_dai.cpus->of_node; - ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); if (ret) goto codec_unregister;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/tegra/trimslice.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/sound/soc/tegra/trimslice.c b/sound/soc/tegra/trimslice.c index a553daa..5ec8f94 100644 --- a/sound/soc/tegra/trimslice.c +++ b/sound/soc/tegra/trimslice.c @@ -93,8 +93,7 @@ static const struct snd_soc_dapm_route trimslice_audio_map[] = {
SND_SOC_DAILINK_DEFS(single_dsp, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic23-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic23-hifi")));
static struct snd_soc_dai_link trimslice_tlv320aic23_dai = { .name = "TLV320AIC23", @@ -152,9 +151,6 @@ static int tegra_snd_trimslice_probe(struct platform_device *pdev) goto err; }
- trimslice_tlv320aic23_dai.platforms->of_node = - trimslice_tlv320aic23_dai.cpus->of_node; - ret = tegra_asoc_utils_init(&trimslice->util_data, &pdev->dev); if (ret) goto err;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/ti/davinci-evm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c index bd822bc..d920bef 100644 --- a/sound/soc/ti/davinci-evm.c +++ b/sound/soc/ti/davinci-evm.c @@ -356,8 +356,7 @@ static struct snd_soc_card da850_snd_soc_card = { */ SND_SOC_DAILINK_DEFS(evm, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic3x-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "tlv320aic3x-hifi")));
static struct snd_soc_dai_link evm_dai_tlv320aic3x = { .name = "TLV320AIC3X", @@ -411,8 +410,6 @@ static int davinci_evm_probe(struct platform_device *pdev) if (!dai->cpus->of_node) return -EINVAL;
- dai->platforms->of_node = dai->cpus->of_node; - evm_soc_card.dev = &pdev->dev; ret = snd_soc_of_parse_card_name(&evm_soc_card, "ti,model"); if (ret)
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/ti/omap-abe-twl6040.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/sound/soc/ti/omap-abe-twl6040.c b/sound/soc/ti/omap-abe-twl6040.c index 3522ea7..475a074 100644 --- a/sound/soc/ti/omap-abe-twl6040.c +++ b/sound/soc/ti/omap-abe-twl6040.c @@ -35,17 +35,17 @@ #include "omap-mcpdm.h" #include "../codecs/twl6040.h"
-SND_SOC_DAILINK_DEFS(link0, - DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC("twl6040-codec", - "twl6040-legacy")), +SND_SOC_DAILINK_DEF(link0_cpus, DAILINK_COMP_ARRAY(COMP_EMPTY())); +SND_SOC_DAILINK_DEF(link0_codecs, + DAILINK_COMP_ARRAY(COMP_CODEC("twl6040-codec", + "twl6040-legacy")));
-SND_SOC_DAILINK_DEFS(link1, - DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", - "dmic-hifi")), +SND_SOC_DAILINK_DEF(link1_cpus, DAILINK_COMP_ARRAY(COMP_EMPTY())); +SND_SOC_DAILINK_DEF(link1_codecs, + DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", + "dmic-hifi")));
struct abe_twl6040 { struct snd_soc_card card; @@ -270,9 +270,6 @@ static int omap_abe_probe(struct platform_device *pdev) priv->dai_links[0].cpus = link0_cpus; priv->dai_links[0].num_cpus = 1; priv->dai_links[0].cpus->of_node = dai_node; - priv->dai_links[0].platforms = link0_platforms; - priv->dai_links[0].num_platforms = 1; - priv->dai_links[0].platforms->of_node = dai_node; priv->dai_links[0].codecs = link0_codecs; priv->dai_links[0].num_codecs = 1; priv->dai_links[0].init = omap_abe_twl6040_init; @@ -286,9 +283,6 @@ static int omap_abe_probe(struct platform_device *pdev) priv->dai_links[1].cpus = link1_cpus; priv->dai_links[1].num_cpus = 1; priv->dai_links[1].cpus->of_node = dai_node; - priv->dai_links[1].platforms = link1_platforms; - priv->dai_links[1].num_platforms = 1; - priv->dai_links[1].platforms->of_node = dai_node; priv->dai_links[1].codecs = link1_codecs; priv->dai_links[1].num_codecs = 1; priv->dai_links[1].init = omap_abe_dmic_init;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/ti/omap-hdmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/ti/omap-hdmi.c b/sound/soc/ti/omap-hdmi.c index def2a0c..0671f06 100644 --- a/sound/soc/ti/omap-hdmi.c +++ b/sound/soc/ti/omap-hdmi.c @@ -364,20 +364,17 @@ static int omap_hdmi_audio_probe(struct platform_device *pdev) if (!card->dai_link) return -ENOMEM;
- compnent = devm_kzalloc(dev, 3 * sizeof(*compnent), GFP_KERNEL); + compnent = devm_kzalloc(dev, 2 * sizeof(*compnent), GFP_KERNEL); if (!compnent) return -ENOMEM; card->dai_link->cpus = &compnent[0]; card->dai_link->num_cpus = 1; card->dai_link->codecs = &compnent[1]; card->dai_link->num_codecs = 1; - card->dai_link->platforms = &compnent[2]; - card->dai_link->num_platforms = 1;
card->dai_link->name = card->name; card->dai_link->stream_name = card->name; card->dai_link->cpus->dai_name = dev_name(ad->dssdev); - card->dai_link->platforms->name = dev_name(ad->dssdev); card->dai_link->codecs->name = "snd-soc-dummy"; card->dai_link->codecs->dai_name = "snd-soc-dummy-dai"; card->num_links = 1;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/ti/omap-twl4030.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/sound/soc/ti/omap-twl4030.c b/sound/soc/ti/omap-twl4030.c index ddd24b2..2669998 100644 --- a/sound/soc/ti/omap-twl4030.c +++ b/sound/soc/ti/omap-twl4030.c @@ -211,13 +211,11 @@ static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd) /* Digital audio interface glue - connects codec <--> CPU */ SND_SOC_DAILINK_DEFS(hifi, DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.2")), - DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-hifi")), - DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.2"))); + DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-hifi")));
SND_SOC_DAILINK_DEFS(voice, DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.3")), - DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-voice")), - DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.3"))); + DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-voice")));
static struct snd_soc_dai_link omap_twl4030_dai_links[] = { { @@ -279,18 +277,12 @@ static int omap_twl4030_probe(struct platform_device *pdev) omap_twl4030_dai_links[0].cpus->dai_name = NULL; omap_twl4030_dai_links[0].cpus->of_node = dai_node;
- omap_twl4030_dai_links[0].platforms->name = NULL; - omap_twl4030_dai_links[0].platforms->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].cpus->dai_name = NULL; omap_twl4030_dai_links[1].cpus->of_node = dai_node; - - omap_twl4030_dai_links[1].platforms->name = NULL; - omap_twl4030_dai_links[1].platforms->of_node = dai_node; }
priv->jack_detect = of_get_named_gpio(node,
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/ti/rx51.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/sound/soc/ti/rx51.c b/sound/soc/ti/rx51.c index 0684f96..dff751c4 100644 --- a/sound/soc/ti/rx51.c +++ b/sound/soc/ti/rx51.c @@ -315,8 +315,7 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) SND_SOC_DAILINK_DEFS(aic34, DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.2")), DAILINK_COMP_ARRAY(COMP_CODEC("tlv320aic3x-codec.2-0018", - "tlv320aic3x-hifi")), - DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.2"))); + "tlv320aic3x-hifi")));
static struct snd_soc_dai_link rx51_dai[] = { { @@ -393,9 +392,7 @@ static int rx51_soc_probe(struct platform_device *pdev) return -EINVAL; } rx51_dai[0].cpus->dai_name = NULL; - rx51_dai[0].platforms->name = NULL; rx51_dai[0].cpus->of_node = dai_node; - rx51_dai[0].platforms->of_node = dai_node;
dai_node = of_parse_phandle(np, "nokia,audio-codec", 0); if (!dai_node) {
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/ux500/mop500.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c index 20552e9..12b2260 100644 --- a/sound/soc/ux500/mop500.c +++ b/sound/soc/ux500/mop500.c @@ -29,13 +29,11 @@ /* Define the whole MOP500 soundcard, linking platform to the codec-drivers */ SND_SOC_DAILINK_DEFS(link1, DAILINK_COMP_ARRAY(COMP_CPU("ux500-msp-i2s.1")), - DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.0")), - DAILINK_COMP_ARRAY(COMP_PLATFORM("ux500-msp-i2s.1"))); + DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.0")));
SND_SOC_DAILINK_DEFS(link2, DAILINK_COMP_ARRAY(COMP_CPU("ux500-msp-i2s.3")), - DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.1")), - DAILINK_COMP_ARRAY(COMP_PLATFORM("ux500-msp-i2s.3"))); + DAILINK_COMP_ARRAY(COMP_CODEC("ab8500-codec.0", "ab8500-codec-dai.1")));
static struct snd_soc_dai_link mop500_dai_links[] = { { @@ -91,8 +89,6 @@ static int mop500_of_probe(struct platform_device *pdev, for (i = 0; i < 2; i++) { mop500_dai_links[i].cpus->of_node = msp_np[i]; mop500_dai_links[i].cpus->dai_name = NULL; - mop500_dai_links[i].platforms->of_node = msp_np[i]; - mop500_dai_links[i].platforms->name = NULL; mop500_dai_links[i].codecs->of_node = codec_np; mop500_dai_links[i].codecs->name = NULL; }
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC used 2 type of Platform if sound card doesn't need Platform.
1) use Dummy Platform as Platform component 2) use CPU component as Platform component
Now, ALSA SoC allows "no Platform" settings, and it will behave same as 2) case selection. And, all sound card which doesn't need specific Platform are now not selecting Platform any more.
This means, no sound card is using dummy Platform on ALSA SoC any more. This patch removes unused dummy Platform.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/soc-utils.c | 25 ------------------------- 1 file changed, 25 deletions(-)
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c index e3b9dd6..f67e715 100644 --- a/sound/soc/soc-utils.c +++ b/sound/soc/soc-utils.c @@ -262,26 +262,6 @@ static const struct snd_pcm_hardware dummy_dma_hardware = { .periods_max = 128, };
-static int dummy_dma_open(struct snd_pcm_substream *substream) -{ - struct snd_soc_pcm_runtime *rtd = substream->private_data; - - /* BE's dont need dummy params */ - if (!rtd->dai_link->no_pcm) - snd_soc_set_runtime_hwparams(substream, &dummy_dma_hardware); - - return 0; -} - -static const struct snd_pcm_ops snd_dummy_dma_ops = { - .open = dummy_dma_open, - .ioctl = snd_pcm_lib_ioctl, -}; - -static const struct snd_soc_component_driver dummy_platform = { - .ops = &snd_dummy_dma_ops, -}; - static const struct snd_soc_component_driver dummy_codec = { .idle_bias_on = 1, .use_pmdown_time = 1, @@ -339,11 +319,6 @@ static int snd_soc_dummy_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_component(&pdev->dev, &dummy_codec, &dummy_dai, 1); - if (ret < 0) - return ret; - - ret = devm_snd_soc_register_component(&pdev->dev, &dummy_platform, - NULL, 0);
return ret; }
Hi Mark
Some drivers don't need to have special Platform component, but was mandatory at legacy style ALSA SoC. Thus, there is this kind of settings on some drivers.
dai_link->platform_of_node = dai_link->cpu_of_node;
This means, Platform == CPU. But it will be ignored, because it is already added when CPU bindings. Thus, this settings is not needed. This patchset supports no Platform.
Last patch removes dummy platform which is no longer needed. I think we don't need it anymore, but, should we keep it... ?
I noticed few patches were missed. I will post these
Thank you for your help !! Best regards --- Kuninori Morimoto
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/generic/simple-card-utils.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c index ac8678f..3cf5cb2 100644 --- a/sound/soc/generic/simple-card-utils.c +++ b/sound/soc/generic/simple-card-utils.c @@ -346,9 +346,18 @@ EXPORT_SYMBOL_GPL(asoc_simple_dai_init);
void asoc_simple_canonicalize_platform(struct snd_soc_dai_link *dai_link) { - /* Assumes platform == cpu */ - if (!dai_link->platforms->of_node) - dai_link->platforms->of_node = dai_link->cpus->of_node; + /* + * no Platform + * + * It will be waste of memory, but not be memory leak. + * see + * asoc_simple_init_priv() + * asoc_simple_priv + */ + if (!dai_link->platforms->of_node) { + dai_link->platforms = NULL; + dai_link->num_platforms = 0; + } } EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_platform);
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/qcom/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index c7a8785..7689e3d 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -103,7 +103,9 @@ int qcom_snd_parse_of(struct snd_soc_card *card) link->codecs = dlc; link->num_codecs = 1;
- link->platforms->of_node = link->cpus->of_node; + link->platforms = NULL; + link->num_platforms = 0; + link->codecs->dai_name = "snd-soc-dummy-dai"; link->codecs->name = "snd-soc-dummy"; link->dynamic = 1;
From: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com --- sound/soc/rockchip/rk3399_gru_sound.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c index 16f7847..7dd7bf8 100644 --- a/sound/soc/rockchip/rk3399_gru_sound.c +++ b/sound/soc/rockchip/rk3399_gru_sound.c @@ -267,33 +267,27 @@ enum {
SND_SOC_DAILINK_DEFS(cdndp, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "spdif-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "spdif-hifi")));
SND_SOC_DAILINK_DEFS(da7219, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "da7219-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "da7219-hifi")));
SND_SOC_DAILINK_DEFS(dmic, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "dmic-hifi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "dmic-hifi")));
SND_SOC_DAILINK_DEFS(max98357a, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")));
SND_SOC_DAILINK_DEFS(rt5514, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5514-aif1")), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "rt5514-aif1")));
SND_SOC_DAILINK_DEFS(rt5514_dsp, DAILINK_COMP_ARRAY(COMP_EMPTY()), - DAILINK_COMP_ARRAY(COMP_DUMMY()), - DAILINK_COMP_ARRAY(COMP_EMPTY())); + DAILINK_COMP_ARRAY(COMP_DUMMY()));
static const struct snd_soc_dai_link rockchip_dais[] = { [DAILINK_CDNDP] = { @@ -527,7 +521,6 @@ static int rockchip_sound_of_parse_dais(struct device *dev,
if (!dai->codecs->name) dai->codecs->of_node = np_codec; - dai->platforms->of_node = np_cpu; dai->cpus->of_node = np_cpu;
if (card->num_dapm_routes + rockchip_routes[index].num_routes >
participants (1)
-
Kuninori Morimoto