Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1727101 > unrolled thread

[PATCH v2 2/3] ASoC: samsung: Use 'samsung-i2s' cpu_dai for dai_links

Started byJaechul Lee <jcsing.lee@samsung.com>
First post2017-09-06 03:10 +0200
Last post2017-09-08 18:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 2/3] ASoC: samsung: Use 'samsung-i2s' cpu_dai for  dai_links Jaechul Lee <jcsing.lee@samsung.com> - 2017-09-06 03:10 +0200
    Re: [PATCH v2 2/3] ASoC: samsung: Use 'samsung-i2s' cpu_dai for  dai_links Krzysztof Kozlowski <krzk@kernel.org> - 2017-09-08 18:50 +0200

#1727101 — [PATCH v2 2/3] ASoC: samsung: Use 'samsung-i2s' cpu_dai for dai_links

FromJaechul Lee <jcsing.lee@samsung.com>
Date2017-09-06 03:10 +0200
Subject[PATCH v2 2/3] ASoC: samsung: Use 'samsung-i2s' cpu_dai for dai_links
Message-ID<umx0S-2j7-15@gated-at.bofh.it>
Add specific cpu_dai_name to dai_link because samsung i2s driver registers
two dais and components. Selecting one of them clearly is needed more
information like cpu_dai_name, of_node. The reason why the dai_links have
to use 'samsung-i2s' for cpu_dai is that 'samsung-i2s-sec' doesn't have a
capture functionality.

Without this code, cpu_dai will be selected the first one of the
component_list. For example, if I describe nothing to cpu_dai_name,
'samsung-i2s-sec' might be selected to HiFi Primay.

Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
---
 sound/soc/samsung/tm2_wm5110.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/samsung/tm2_wm5110.c b/sound/soc/samsung/tm2_wm5110.c
index 68698f3d72f9..710e2151141f 100644
--- a/sound/soc/samsung/tm2_wm5110.c
+++ b/sound/soc/samsung/tm2_wm5110.c
@@ -383,6 +383,7 @@ static struct snd_soc_dai_link tm2_dai_links[] = {
 	{
 		.name		= "WM5110 AIF1",
 		.stream_name	= "HiFi Primary",
+		.cpu_dai_name   = SAMSUNG_I2S_DAI,
 		.codec_dai_name = "wm5110-aif1",
 		.ops		= &tm2_aif1_ops,
 		.dai_fmt	= SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
@@ -390,6 +391,7 @@ static struct snd_soc_dai_link tm2_dai_links[] = {
 	}, {
 		.name		= "WM5110 Voice",
 		.stream_name	= "Voice call",
+		.cpu_dai_name   = SAMSUNG_I2S_DAI,
 		.codec_dai_name = "wm5110-aif2",
 		.ops		= &tm2_aif2_ops,
 		.dai_fmt	= SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
@@ -398,6 +400,7 @@ static struct snd_soc_dai_link tm2_dai_links[] = {
 	}, {
 		.name		= "WM5110 BT",
 		.stream_name	= "Bluetooth",
+		.cpu_dai_name   = SAMSUNG_I2S_DAI,
 		.codec_dai_name = "wm5110-aif3",
 		.dai_fmt	= SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
 				  SND_SOC_DAIFMT_CBM_CFM,
@@ -477,7 +480,6 @@ static int tm2_probe(struct platform_device *pdev)
 	}
 
 	for (i = 0; i < card->num_links; i++) {
-		card->dai_link[i].cpu_dai_name = NULL;
 		card->dai_link[i].cpu_name = NULL;
 		card->dai_link[i].platform_name = NULL;
 		card->dai_link[i].codec_of_node = codec_dai_node;
-- 
2.14.1

[toc] | [next] | [standalone]


#1729079

FromKrzysztof Kozlowski <krzk@kernel.org>
Date2017-09-08 18:50 +0200
Message-ID<unuDD-16Q-9@gated-at.bofh.it>
In reply to#1727101
On Wed, Sep 06, 2017 at 10:04:14AM +0900, Jaechul Lee wrote:
> Add specific cpu_dai_name to dai_link because samsung i2s driver registers
> two dais and components. Selecting one of them clearly is needed more
> information like cpu_dai_name, of_node. The reason why the dai_links have
> to use 'samsung-i2s' for cpu_dai is that 'samsung-i2s-sec' doesn't have a
> capture functionality.
> 
> Without this code, cpu_dai will be selected the first one of the
> component_list. For example, if I describe nothing to cpu_dai_name,
> 'samsung-i2s-sec' might be selected to HiFi Primay.
> 
> Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com>
> ---
>  sound/soc/samsung/tm2_wm5110.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web