aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-09-01 16:15:52 -0400
committerMark Brown <broonie@linaro.org>2013-09-01 16:15:52 -0400
commit90d561bed9619fc08c31eab9315ebe811d41149a (patch)
tree990181e26f309543db6fd4d8797d5bcabdae37b6 /sound
parent59a3aed73bd61616df2f40700b7783dcdc7414fd (diff)
parenta90e6053baa61feed8b19a9f4cbec6b56479d1ba (diff)
Merge remote-tracking branch 'asoc/topic/fsl' into tmp
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/Makefile2
-rw-r--r--sound/soc/fsl/fsl_spdif.c12
-rw-r--r--sound/soc/mxs/mxs-sgtl5000.c2
-rw-r--r--sound/soc/soc-pcm.c10
4 files changed, 19 insertions, 7 deletions
diff --git a/sound/soc/fsl/Makefile b/sound/soc/fsl/Makefile
index e2aaff717f8a..8db705b0fdf9 100644
--- a/sound/soc/fsl/Makefile
+++ b/sound/soc/fsl/Makefile
@@ -45,7 +45,7 @@ snd-soc-mx27vis-aic32x4-objs := mx27vis-aic32x4.o
45snd-soc-wm1133-ev1-objs := wm1133-ev1.o 45snd-soc-wm1133-ev1-objs := wm1133-ev1.o
46snd-soc-imx-sgtl5000-objs := imx-sgtl5000.o 46snd-soc-imx-sgtl5000-objs := imx-sgtl5000.o
47snd-soc-imx-wm8962-objs := imx-wm8962.o 47snd-soc-imx-wm8962-objs := imx-wm8962.o
48snd-soc-imx-spdif-objs :=imx-spdif.o 48snd-soc-imx-spdif-objs := imx-spdif.o
49snd-soc-imx-mc13783-objs := imx-mc13783.o 49snd-soc-imx-mc13783-objs := imx-mc13783.o
50 50
51obj-$(CONFIG_SND_SOC_EUKREA_TLV320) += snd-soc-eukrea-tlv320.o 51obj-$(CONFIG_SND_SOC_EUKREA_TLV320) += snd-soc-eukrea-tlv320.o
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index e93dc0dfb0d9..3920c3e849ce 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -411,8 +411,8 @@ static int spdif_set_sample_rate(struct snd_pcm_substream *substream,
411 return 0; 411 return 0;
412} 412}
413 413
414int fsl_spdif_startup(struct snd_pcm_substream *substream, 414static int fsl_spdif_startup(struct snd_pcm_substream *substream,
415 struct snd_soc_dai *cpu_dai) 415 struct snd_soc_dai *cpu_dai)
416{ 416{
417 struct snd_soc_pcm_runtime *rtd = substream->private_data; 417 struct snd_soc_pcm_runtime *rtd = substream->private_data;
418 struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(rtd->cpu_dai); 418 struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(rtd->cpu_dai);
@@ -546,7 +546,7 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream,
546 return 0; 546 return 0;
547} 547}
548 548
549struct snd_soc_dai_ops fsl_spdif_dai_ops = { 549static struct snd_soc_dai_ops fsl_spdif_dai_ops = {
550 .startup = fsl_spdif_startup, 550 .startup = fsl_spdif_startup,
551 .hw_params = fsl_spdif_hw_params, 551 .hw_params = fsl_spdif_hw_params,
552 .trigger = fsl_spdif_trigger, 552 .trigger = fsl_spdif_trigger,
@@ -919,7 +919,7 @@ static int fsl_spdif_dai_probe(struct snd_soc_dai *dai)
919 return 0; 919 return 0;
920} 920}
921 921
922struct snd_soc_dai_driver fsl_spdif_dai = { 922static struct snd_soc_dai_driver fsl_spdif_dai = {
923 .probe = &fsl_spdif_dai_probe, 923 .probe = &fsl_spdif_dai_probe,
924 .playback = { 924 .playback = {
925 .channels_min = 2, 925 .channels_min = 2,
@@ -1071,9 +1071,9 @@ static int fsl_spdif_probe_txclk(struct fsl_spdif_priv *spdif_priv,
1071 break; 1071 break;
1072 } 1072 }
1073 1073
1074 dev_dbg(&pdev->dev, "use rxtx%d as tx clock source for %dHz sample rate", 1074 dev_dbg(&pdev->dev, "use rxtx%d as tx clock source for %dHz sample rate\n",
1075 spdif_priv->txclk_src[index], rate[index]); 1075 spdif_priv->txclk_src[index], rate[index]);
1076 dev_dbg(&pdev->dev, "use divisor %d for %dHz sample rate", 1076 dev_dbg(&pdev->dev, "use divisor %d for %dHz sample rate\n",
1077 spdif_priv->txclk_div[index], rate[index]); 1077 spdif_priv->txclk_div[index], rate[index]);
1078 1078
1079 return 0; 1079 return 0;
diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c
index ce084eb10c49..4bb273786ff3 100644
--- a/sound/soc/mxs/mxs-sgtl5000.c
+++ b/sound/soc/mxs/mxs-sgtl5000.c
@@ -105,11 +105,13 @@ static struct snd_soc_dai_link mxs_sgtl5000_dai[] = {
105 .stream_name = "HiFi Playback", 105 .stream_name = "HiFi Playback",
106 .codec_dai_name = "sgtl5000", 106 .codec_dai_name = "sgtl5000",
107 .ops = &mxs_sgtl5000_hifi_ops, 107 .ops = &mxs_sgtl5000_hifi_ops,
108 .playback_only = true,
108 }, { 109 }, {
109 .name = "HiFi Rx", 110 .name = "HiFi Rx",
110 .stream_name = "HiFi Capture", 111 .stream_name = "HiFi Capture",
111 .codec_dai_name = "sgtl5000", 112 .codec_dai_name = "sgtl5000",
112 .ops = &mxs_sgtl5000_hifi_ops, 113 .ops = &mxs_sgtl5000_hifi_ops,
114 .capture_only = true,
113 }, 115 },
114}; 116};
115 117
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index fb70fbe26862..330c9a6b5cb5 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2020,6 +2020,16 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
2020 capture = 1; 2020 capture = 1;
2021 } 2021 }
2022 2022
2023 if (rtd->dai_link->playback_only) {
2024 playback = 1;
2025 capture = 0;
2026 }
2027
2028 if (rtd->dai_link->capture_only) {
2029 playback = 0;
2030 capture = 1;
2031 }
2032
2023 /* create the PCM */ 2033 /* create the PCM */
2024 if (rtd->dai_link->no_pcm) { 2034 if (rtd->dai_link->no_pcm) {
2025 snprintf(new_name, sizeof(new_name), "(%s)", 2035 snprintf(new_name, sizeof(new_name), "(%s)",