aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaechul Lee <jcsing.lee@samsung.com>2017-09-05 21:04:14 -0400
committerMark Brown <broonie@kernel.org>2017-09-19 10:59:03 -0400
commite8d93208905a9987c211f97a14a93f2776ab52e7 (patch)
treeaaa84957661bba45d8de2cc8740e8d3c445bd84a
parent22289ddcd87285b3d61cd8b129438ca6abb1aa37 (diff)
ASoC: samsung: Use 'samsung-i2s' cpu_dai for dai_links
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> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/samsung/tm2_wm5110.c4
1 files changed, 3 insertions, 1 deletions
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[] = {
383 { 383 {
384 .name = "WM5110 AIF1", 384 .name = "WM5110 AIF1",
385 .stream_name = "HiFi Primary", 385 .stream_name = "HiFi Primary",
386 .cpu_dai_name = SAMSUNG_I2S_DAI,
386 .codec_dai_name = "wm5110-aif1", 387 .codec_dai_name = "wm5110-aif1",
387 .ops = &tm2_aif1_ops, 388 .ops = &tm2_aif1_ops,
388 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 389 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
@@ -390,6 +391,7 @@ static struct snd_soc_dai_link tm2_dai_links[] = {
390 }, { 391 }, {
391 .name = "WM5110 Voice", 392 .name = "WM5110 Voice",
392 .stream_name = "Voice call", 393 .stream_name = "Voice call",
394 .cpu_dai_name = SAMSUNG_I2S_DAI,
393 .codec_dai_name = "wm5110-aif2", 395 .codec_dai_name = "wm5110-aif2",
394 .ops = &tm2_aif2_ops, 396 .ops = &tm2_aif2_ops,
395 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 397 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
@@ -398,6 +400,7 @@ static struct snd_soc_dai_link tm2_dai_links[] = {
398 }, { 400 }, {
399 .name = "WM5110 BT", 401 .name = "WM5110 BT",
400 .stream_name = "Bluetooth", 402 .stream_name = "Bluetooth",
403 .cpu_dai_name = SAMSUNG_I2S_DAI,
401 .codec_dai_name = "wm5110-aif3", 404 .codec_dai_name = "wm5110-aif3",
402 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 405 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
403 SND_SOC_DAIFMT_CBM_CFM, 406 SND_SOC_DAIFMT_CBM_CFM,
@@ -477,7 +480,6 @@ static int tm2_probe(struct platform_device *pdev)
477 } 480 }
478 481
479 for (i = 0; i < card->num_links; i++) { 482 for (i = 0; i < card->num_links; i++) {
480 card->dai_link[i].cpu_dai_name = NULL;
481 card->dai_link[i].cpu_name = NULL; 483 card->dai_link[i].cpu_name = NULL;
482 card->dai_link[i].platform_name = NULL; 484 card->dai_link[i].platform_name = NULL;
483 card->dai_link[i].codec_of_node = codec_dai_node; 485 card->dai_link[i].codec_of_node = codec_dai_node;