aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/at91
diff options
context:
space:
mode:
authorLiam Girdwood <lg@opensource.wolfsonmicro.com>2008-07-08 08:19:18 -0400
committerJaroslav Kysela <perex@perex.cz>2008-07-10 03:32:51 -0400
commit64105cfd65df74fdf82c1d053b2c9953304a94ea (patch)
treeaf420baafa02afd0a6292dbe93e2c5fff65850b2 /sound/soc/at91
parent8c6529dbf881303920a415c2d14a500218661949 (diff)
ALSA: asoc: machines - add Digital Audio Interface (DAI) control functions.
This patch adds several functions for DAI control and config and replaces the current method of calling function pointers within the DAI struct within the machine drivers. Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/soc/at91')
-rw-r--r--sound/soc/at91/eti_b1_wm8731.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/at91/eti_b1_wm8731.c b/sound/soc/at91/eti_b1_wm8731.c
index 9d4213963c26..d532de954241 100644
--- a/sound/soc/at91/eti_b1_wm8731.c
+++ b/sound/soc/at91/eti_b1_wm8731.c
@@ -58,13 +58,13 @@ static int eti_b1_startup(struct snd_pcm_substream *substream)
58 int ret; 58 int ret;
59 59
60 /* cpu clock is the AT91 master clock sent to the SSC */ 60 /* cpu clock is the AT91 master clock sent to the SSC */
61 ret = cpu_dai->dai_ops.set_sysclk(cpu_dai, AT91_SYSCLK_MCK, 61 ret = snd_soc_dai_set_sysclk(cpu_dai, AT91_SYSCLK_MCK,
62 60000000, SND_SOC_CLOCK_IN); 62 60000000, SND_SOC_CLOCK_IN);
63 if (ret < 0) 63 if (ret < 0)
64 return ret; 64 return ret;
65 65
66 /* codec system clock is supplied by PCK1, set to 12MHz */ 66 /* codec system clock is supplied by PCK1, set to 12MHz */
67 ret = codec_dai->dai_ops.set_sysclk(codec_dai, WM8731_SYSCLK, 67 ret = snd_soc_dai_set_sysclk(codec_dai, WM8731_SYSCLK,
68 12000000, SND_SOC_CLOCK_IN); 68 12000000, SND_SOC_CLOCK_IN);
69 if (ret < 0) 69 if (ret < 0)
70 return ret; 70 return ret;
@@ -96,13 +96,13 @@ static int eti_b1_hw_params(struct snd_pcm_substream *substream,
96 int cmr_div, period; 96 int cmr_div, period;
97 97
98 /* set codec DAI configuration */ 98 /* set codec DAI configuration */
99 ret = codec_dai->dai_ops.set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | 99 ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
100 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); 100 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
101 if (ret < 0) 101 if (ret < 0)
102 return ret; 102 return ret;
103 103
104 /* set cpu DAI configuration */ 104 /* set cpu DAI configuration */
105 ret = cpu_dai->dai_ops.set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | 105 ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
106 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); 106 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS);
107 if (ret < 0) 107 if (ret < 0)
108 return ret; 108 return ret;
@@ -141,17 +141,17 @@ static int eti_b1_hw_params(struct snd_pcm_substream *substream,
141 } 141 }
142 142
143 /* set the MCK divider for BCLK */ 143 /* set the MCK divider for BCLK */
144 ret = cpu_dai->dai_ops.set_clkdiv(cpu_dai, AT91SSC_CMR_DIV, cmr_div); 144 ret = snd_soc_dai_set_clkdiv(cpu_dai, AT91SSC_CMR_DIV, cmr_div);
145 if (ret < 0) 145 if (ret < 0)
146 return ret; 146 return ret;
147 147
148 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 148 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
149 /* set the BCLK divider for DACLRC */ 149 /* set the BCLK divider for DACLRC */
150 ret = cpu_dai->dai_ops.set_clkdiv(cpu_dai, 150 ret = snd_soc_dai_set_clkdiv(cpu_dai,
151 AT91SSC_TCMR_PERIOD, period); 151 AT91SSC_TCMR_PERIOD, period);
152 } else { 152 } else {
153 /* set the BCLK divider for ADCLRC */ 153 /* set the BCLK divider for ADCLRC */
154 ret = cpu_dai->dai_ops.set_clkdiv(cpu_dai, 154 ret = snd_soc_dai_set_clkdiv(cpu_dai,
155 AT91SSC_RCMR_PERIOD, period); 155 AT91SSC_RCMR_PERIOD, period);
156 } 156 }
157 if (ret < 0) 157 if (ret < 0)
@@ -163,13 +163,13 @@ static int eti_b1_hw_params(struct snd_pcm_substream *substream,
163 */ 163 */
164 164
165 /* set codec DAI configuration */ 165 /* set codec DAI configuration */
166 ret = codec_dai->dai_ops.set_fmt(codec_dai, SND_SOC_DAIFMT_I2S | 166 ret = snd_soc_dai_set_fmt(codec_dai, SND_SOC_DAIFMT_I2S |
167 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); 167 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
168 if (ret < 0) 168 if (ret < 0)
169 return ret; 169 return ret;
170 170
171 /* set cpu DAI configuration */ 171 /* set cpu DAI configuration */
172 ret = cpu_dai->dai_ops.set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S | 172 ret = snd_soc_dai_set_fmt(cpu_dai, SND_SOC_DAIFMT_I2S |
173 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM); 173 SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM);
174 if (ret < 0) 174 if (ret < 0)
175 return ret; 175 return ret;