From e718a3eb09ae491147ded7e2e923ba6de59f0b24 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Thu, 23 May 2019 11:07:48 -0500 Subject: ASoC: qdsp6: q6core: Use struct_size() in kmemdup() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace code of the following form: sizeof(*fwk) + fwk->num_services * sizeof(fwk->svc_api_info[0]); with: struct_size(fwk, svc_api_info, fwk->num_services) and so on... Notice that variables bytes and len are unnecessary, hence they are removed. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mark Brown --- sound/soc/qcom/qdsp6/q6core.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/qdsp6/q6core.c b/sound/soc/qcom/qdsp6/q6core.c index cdfc8ab6cfc0..ae314a652efe 100644 --- a/sound/soc/qcom/qdsp6/q6core.c +++ b/sound/soc/qcom/qdsp6/q6core.c @@ -98,13 +98,13 @@ static int q6core_callback(struct apr_device *adev, struct apr_resp_pkt *data) } case AVCS_CMDRSP_GET_FWK_VERSION: { struct avcs_cmdrsp_get_fwk_version *fwk; - int bytes; fwk = data->payload; - bytes = sizeof(*fwk) + fwk->num_services * - sizeof(fwk->svc_api_info[0]); - core->fwk_version = kmemdup(data->payload, bytes, GFP_ATOMIC); + core->fwk_version = kmemdup(data->payload, + struct_size(fwk, svc_api_info, + fwk->num_services), + GFP_ATOMIC); if (!core->fwk_version) return -ENOMEM; @@ -115,13 +115,13 @@ static int q6core_callback(struct apr_device *adev, struct apr_resp_pkt *data) } case AVCS_GET_VERSIONS_RSP: { struct avcs_cmdrsp_get_version *v; - int len; v = data->payload; - len = sizeof(*v) + v->num_services * sizeof(v->svc_api_info[0]); - - core->svc_version = kmemdup(data->payload, len, GFP_ATOMIC); + core->svc_version = kmemdup(data->payload, + struct_size(v, svc_api_info, + v->num_services), + GFP_ATOMIC); if (!core->svc_version) return -ENOMEM; -- cgit v1.2.3 From fa350b770b57d6e17b73d259bfec7e40099f7261 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 6 Jun 2019 13:16:51 +0900 Subject: ASoC: qcom: storm: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/qcom/storm.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/storm.c b/sound/soc/qcom/storm.c index a9fa972466ad..672edee2ea93 100644 --- a/sound/soc/qcom/storm.c +++ b/sound/soc/qcom/storm.c @@ -61,11 +61,16 @@ static const struct snd_soc_ops storm_soc_ops = { .hw_params = storm_ops_hw_params, }; +SND_SOC_DAILINK_DEFS(hifi, + DAILINK_COMP_ARRAY(COMP_EMPTY()), + DAILINK_COMP_ARRAY(COMP_CODEC(NULL, "HiFi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); + static struct snd_soc_dai_link storm_dai_link = { .name = "Primary", .stream_name = "Primary", - .codec_dai_name = "HiFi", .ops = &storm_soc_ops, + SND_SOC_DAILINK_REG(hifi), }; static int storm_parse_of(struct snd_soc_card *card) @@ -73,15 +78,15 @@ static int storm_parse_of(struct snd_soc_card *card) struct snd_soc_dai_link *dai_link = card->dai_link; struct device_node *np = card->dev->of_node; - dai_link->cpu_of_node = of_parse_phandle(np, "cpu", 0); - if (!dai_link->cpu_of_node) { + dai_link->cpus->of_node = of_parse_phandle(np, "cpu", 0); + if (!dai_link->cpus->of_node) { dev_err(card->dev, "error getting cpu phandle\n"); return -EINVAL; } - dai_link->platform_of_node = dai_link->cpu_of_node; + dai_link->platforms->of_node = dai_link->cpus->of_node; - dai_link->codec_of_node = of_parse_phandle(np, "codec", 0); - if (!dai_link->codec_of_node) { + dai_link->codecs->of_node = of_parse_phandle(np, "codec", 0); + if (!dai_link->codecs->of_node) { dev_err(card->dev, "error getting codec phandle\n"); return -EINVAL; } -- cgit v1.2.3 From 1e36ea360ab98e9c20329a3d9364705d1347e411 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 6 Jun 2019 13:16:58 +0900 Subject: ASoC: qcom: common: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/qcom/common.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index 5661025e8cec..c7a878507220 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -14,6 +14,7 @@ int qcom_snd_parse_of(struct snd_soc_card *card) struct device *dev = card->dev; struct snd_soc_dai_link *link; struct of_phandle_args args; + struct snd_soc_dai_link_component *dlc; int ret, num_links; ret = snd_soc_of_parse_card_name(card, "model"); @@ -40,6 +41,17 @@ int qcom_snd_parse_of(struct snd_soc_card *card) card->num_links = num_links; link = card->dai_link; + + dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL); + if (!dlc) + return -ENOMEM; + + link->cpus = &dlc[0]; + link->platforms = &dlc[1]; + + link->num_cpus = 1; + link->num_platforms = 1; + for_each_child_of_node(dev->of_node, np) { cpu = of_get_child_by_name(np, "cpu"); platform = of_get_child_by_name(np, "platform"); @@ -57,20 +69,20 @@ int qcom_snd_parse_of(struct snd_soc_card *card) dev_err(card->dev, "error getting cpu phandle\n"); goto err; } - link->cpu_of_node = args.np; + link->cpus->of_node = args.np; link->id = args.args[0]; - ret = snd_soc_of_get_dai_name(cpu, &link->cpu_dai_name); + ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name); if (ret) { dev_err(card->dev, "error getting cpu dai name\n"); goto err; } if (codec && platform) { - link->platform_of_node = of_parse_phandle(platform, + link->platforms->of_node = of_parse_phandle(platform, "sound-dai", 0); - if (!link->platform_of_node) { + if (!link->platforms->of_node) { dev_err(card->dev, "platform dai not found\n"); ret = -EINVAL; goto err; @@ -84,9 +96,16 @@ int qcom_snd_parse_of(struct snd_soc_card *card) link->no_pcm = 1; link->ignore_pmdown_time = 1; } else { - link->platform_of_node = link->cpu_of_node; - link->codec_dai_name = "snd-soc-dummy-dai"; - link->codec_name = "snd-soc-dummy"; + dlc = devm_kzalloc(dev, sizeof(*dlc), GFP_KERNEL); + if (!dlc) + return -ENOMEM; + + link->codecs = dlc; + link->num_codecs = 1; + + link->platforms->of_node = link->cpus->of_node; + link->codecs->dai_name = "snd-soc-dummy-dai"; + link->codecs->name = "snd-soc-dummy"; link->dynamic = 1; } -- cgit v1.2.3 From 98b232ca9e0e7fb0f3be80653f647c8ce369556d Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 6 Jun 2019 13:17:04 +0900 Subject: ASoC: qcom: apq8016_sbc: use modern dai_link style ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/qcom/apq8016_sbc.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index 4b559932adc3..717542c61d04 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -126,6 +126,7 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) struct snd_soc_dai_link *link; struct device_node *np, *codec, *cpu, *node = dev->of_node; struct apq8016_sbc_data *data; + struct snd_soc_dai_link_component *dlc; int ret, num_links; ret = snd_soc_of_parse_card_name(card, "qcom,model"); @@ -158,6 +159,16 @@ 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); + if (!dlc) + return ERR_PTR(-ENOMEM); + + link->cpus = &dlc[0]; + link->platforms = &dlc[1]; + + link->num_cpus = 1; + link->num_platforms = 1; + for_each_child_of_node(node, np) { cpu = of_get_child_by_name(np, "cpu"); codec = of_get_child_by_name(np, "codec"); @@ -168,14 +179,14 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) goto error; } - link->cpu_of_node = of_parse_phandle(cpu, "sound-dai", 0); - if (!link->cpu_of_node) { + link->cpus->of_node = of_parse_phandle(cpu, "sound-dai", 0); + if (!link->cpus->of_node) { dev_err(card->dev, "error getting cpu phandle\n"); ret = -EINVAL; goto error; } - ret = snd_soc_of_get_dai_name(cpu, &link->cpu_dai_name); + ret = snd_soc_of_get_dai_name(cpu, &link->cpus->dai_name); if (ret) { dev_err(card->dev, "error getting cpu dai name\n"); goto error; @@ -188,7 +199,7 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) goto error; } - link->platform_of_node = link->cpu_of_node; + 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"); -- cgit v1.2.3 From 16395ceee11f8f8af764bac76adc20a43ba1a153 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Mon, 17 Jun 2019 22:28:13 -0700 Subject: ASoC: qcom: common: Fix NULL pointer in of parser A snd_soc_dai_link_component is allocated and associated with the first link, so when the code tries to assign the of_node of the second link's "cpu" member it dereferences a NULL pointer. Fix this by moving the allocation and assignement of snd_soc_dai_link_components into the loop, giving us one pair per link. Fixes: 1e36ea360ab9 ("ASoC: qcom: common: use modern dai_link style") Signed-off-by: Bjorn Andersson Acked-by: Srinivas Kandagatla Signed-off-by: Mark Brown --- sound/soc/qcom/common.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index c7a878507220..97488b5cc515 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -42,17 +42,17 @@ int qcom_snd_parse_of(struct snd_soc_card *card) card->num_links = num_links; link = card->dai_link; - dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL); - if (!dlc) - return -ENOMEM; + for_each_child_of_node(dev->of_node, np) { + dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL); + if (!dlc) + return -ENOMEM; - link->cpus = &dlc[0]; - link->platforms = &dlc[1]; + link->cpus = &dlc[0]; + link->platforms = &dlc[1]; - link->num_cpus = 1; - link->num_platforms = 1; + link->num_cpus = 1; + link->num_platforms = 1; - for_each_child_of_node(dev->of_node, np) { cpu = of_get_child_by_name(np, "cpu"); platform = of_get_child_by_name(np, "platform"); codec = of_get_child_by_name(np, "codec"); -- cgit v1.2.3 From 5646843879699a8774c560126b4da4ced97d9b9c Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 19 Jun 2019 10:17:22 +0900 Subject: ASoC: qcom: apq8016_sbc: don't select unnecessary Platform 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 Signed-off-by: Mark Brown --- sound/soc/qcom/apq8016_sbc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index 717542c61d04..9ac7c9d03ca5 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"); -- cgit v1.2.3 From 3caf11fa88a954916c14c719b89478f4d89386d5 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 19 Jun 2019 10:17:26 +0900 Subject: ASoC: qcom: storm: don't select unnecessary Platform 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 Signed-off-by: Mark Brown --- sound/soc/qcom/storm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/storm.c b/sound/soc/qcom/storm.c index 672edee2ea93..9c67e42a1f00 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) { -- cgit v1.2.3 From 0814c6412967bac140ef9878ad48e1f30e5afba3 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Wed, 19 Jun 2019 10:19:35 +0900 Subject: ASoC: qcom: don't select unnecessary Platform 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 Signed-off-by: Mark Brown --- sound/soc/qcom/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index 97488b5cc515..adf49b198754 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; -- cgit v1.2.3 From 291728a523231f22155610fd595a83bdc91f147b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 28 Jun 2019 10:47:46 +0900 Subject: ASoC: qcom: apq8016_sbc: consider CPU-Platform possibility commit 564684387969 ("ASoC: qcom: apq8016_sbc: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 564684387969 ("ASoC: qcom: apq8016_sbc: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/qcom/apq8016_sbc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c index c0b0aa8493d3..f60a71990f66 100644 --- a/sound/soc/qcom/apq8016_sbc.c +++ b/sound/soc/qcom/apq8016_sbc.c @@ -150,12 +150,15 @@ static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) link = data->dai_link; - dlc = devm_kzalloc(dev, sizeof(*dlc), GFP_KERNEL); + dlc = devm_kzalloc(dev, 2 * sizeof(*dlc), GFP_KERNEL); if (!dlc) return ERR_PTR(-ENOMEM); - link->cpus = dlc; - link->num_cpus = 1; + link->cpus = &dlc[0]; + link->platforms = &dlc[1]; + + link->num_cpus = 1; + link->num_platforms = 1; for_each_child_of_node(node, np) { cpu = of_get_child_by_name(np, "cpu"); @@ -187,6 +190,7 @@ 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"); -- cgit v1.2.3 From 9522e94749d1eb2e88ca4fb1ed20dbbf6ac381d1 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 28 Jun 2019 10:47:50 +0900 Subject: ASoC: qcom: storm: consider CPU-Platform possibility commit 3caf11fa88a9 ("ASoC: qcom: storm: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 3caf11fa88a9 ("ASoC: qcom: storm: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/qcom/storm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/storm.c b/sound/soc/qcom/storm.c index e6aeed7b6b97..e6666e597265 100644 --- a/sound/soc/qcom/storm.c +++ b/sound/soc/qcom/storm.c @@ -55,7 +55,8 @@ 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_CODEC(NULL, "HiFi")), + DAILINK_COMP_ARRAY(COMP_EMPTY())); static struct snd_soc_dai_link storm_dai_link = { .name = "Primary", @@ -74,6 +75,7 @@ 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) { -- cgit v1.2.3 From 0751154fda401d76d7ff025a9ca63678bf4ca021 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Fri, 28 Jun 2019 10:49:48 +0900 Subject: ASoC: qcom: consider CPU-Platform possibility commit 0814c6412967 ("ASoC: qcom: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 0814c6412967 ("ASoC: qcom: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/qcom/common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index adf49b198754..97488b5cc515 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -103,9 +103,7 @@ int qcom_snd_parse_of(struct snd_soc_card *card) link->codecs = dlc; link->num_codecs = 1; - link->platforms = NULL; - link->num_platforms = 0; - + link->platforms->of_node = link->cpus->of_node; link->codecs->dai_name = "snd-soc-dummy-dai"; link->codecs->name = "snd-soc-dummy"; link->dynamic = 1; -- cgit v1.2.3 From 9aa0cf79568e7078c32710034b0df8946db6cdad Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Wed, 3 Jul 2019 13:31:02 +0100 Subject: ASoC: qdsp6: q6afe-dai: Add missing Slimbus0 audio route For some reason SLIMBus RX0 playback is not added to audio routes. This patch adds the missing route. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20190703123102.12626-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown --- sound/soc/qcom/qdsp6/q6afe-dai.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/soc/qcom') diff --git a/sound/soc/qcom/qdsp6/q6afe-dai.c b/sound/soc/qcom/qdsp6/q6afe-dai.c index dc645ba4d8d0..c1a7624eaf17 100644 --- a/sound/soc/qcom/qdsp6/q6afe-dai.c +++ b/sound/soc/qcom/qdsp6/q6afe-dai.c @@ -447,6 +447,7 @@ static int q6afe_mi2s_set_sysclk(struct snd_soc_dai *dai, static const struct snd_soc_dapm_route q6afe_dapm_routes[] = { {"HDMI Playback", NULL, "HDMI_RX"}, {"Display Port Playback", NULL, "DISPLAY_PORT_RX"}, + {"Slimbus Playback", NULL, "SLIMBUS_0_RX"}, {"Slimbus1 Playback", NULL, "SLIMBUS_1_RX"}, {"Slimbus2 Playback", NULL, "SLIMBUS_2_RX"}, {"Slimbus3 Playback", NULL, "SLIMBUS_3_RX"}, -- cgit v1.2.3