aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChaithrika U S <chaithrika@ti.com>2010-03-10 04:18:33 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-03-10 06:59:56 -0500
commit8d43d1bc81190ee8e4e694d805afa586339b0afc (patch)
treeb41c070e4e2e367f6a6ce1022d81cb78e8aca746
parent3a9d620278981f367a77a8888c0d59a70473b056 (diff)
ASoC: DaVinci: Add hw_param callback for S/PDIF DIT link
On TI DM6467 EVM, S/PDIF DIT codec fails to open as it is unable to install hardware params. This dummy codec has no set_fmt and set_sysclk implementations and calls from the application to these functions cause errors. This patch adds a new hardware params callback function for S/PDIF transciever codec. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Tested-by: Anuj Aggarwal <anuj.aggarwal@ti.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/davinci/davinci-evm.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index 7ccbe6684fc2..dba6651547c1 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -81,10 +81,24 @@ static int evm_hw_params(struct snd_pcm_substream *substream,
81 return 0; 81 return 0;
82} 82}
83 83
84static int evm_spdif_hw_params(struct snd_pcm_substream *substream,
85 struct snd_pcm_hw_params *params)
86{
87 struct snd_soc_pcm_runtime *rtd = substream->private_data;
88 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
89
90 /* set cpu DAI configuration */
91 return snd_soc_dai_set_fmt(cpu_dai, AUDIO_FORMAT);
92}
93
84static struct snd_soc_ops evm_ops = { 94static struct snd_soc_ops evm_ops = {
85 .hw_params = evm_hw_params, 95 .hw_params = evm_hw_params,
86}; 96};
87 97
98static struct snd_soc_ops evm_spdif_ops = {
99 .hw_params = evm_spdif_hw_params,
100};
101
88/* davinci-evm machine dapm widgets */ 102/* davinci-evm machine dapm widgets */
89static const struct snd_soc_dapm_widget aic3x_dapm_widgets[] = { 103static const struct snd_soc_dapm_widget aic3x_dapm_widgets[] = {
90 SND_SOC_DAPM_HP("Headphone Jack", NULL), 104 SND_SOC_DAPM_HP("Headphone Jack", NULL),
@@ -165,7 +179,7 @@ static struct snd_soc_dai_link dm6467_evm_dai[] = {
165 .stream_name = "spdif", 179 .stream_name = "spdif",
166 .cpu_dai = &davinci_mcasp_dai[DAVINCI_MCASP_DIT_DAI], 180 .cpu_dai = &davinci_mcasp_dai[DAVINCI_MCASP_DIT_DAI],
167 .codec_dai = &dit_stub_dai, 181 .codec_dai = &dit_stub_dai,
168 .ops = &evm_ops, 182 .ops = &evm_spdif_ops,
169 }, 183 },
170}; 184};
171static struct snd_soc_dai_link da8xx_evm_dai = { 185static struct snd_soc_dai_link da8xx_evm_dai = {