diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/davinci/davinci-evm.c | 16 |
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 | ||
84 | static 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 | |||
84 | static struct snd_soc_ops evm_ops = { | 94 | static struct snd_soc_ops evm_ops = { |
85 | .hw_params = evm_hw_params, | 95 | .hw_params = evm_hw_params, |
86 | }; | 96 | }; |
87 | 97 | ||
98 | static 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 */ |
89 | static const struct snd_soc_dapm_widget aic3x_dapm_widgets[] = { | 103 | static 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 | }; |
171 | static struct snd_soc_dai_link da8xx_evm_dai = { | 185 | static struct snd_soc_dai_link da8xx_evm_dai = { |