diff options
author | Jarkko Nikula <jarkko.nikula@bitmer.com> | 2011-09-30 09:07:45 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-02 14:57:07 -0400 |
commit | cf9feff28fc1f00c82fb0cc016307d4c65da132a (patch) | |
tree | eec1415a291e0f6d88da379c26fc7e2f631bc762 /sound/soc/omap/sdp3430.c | |
parent | 4dd0417253be35bfbe368c40ec5a10732b24fd65 (diff) |
ASoC: omap: Convert bunch of machine drivers to use init time DAI format
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/omap/sdp3430.c')
-rw-r--r-- | sound/soc/omap/sdp3430.c | 46 |
1 files changed, 4 insertions, 42 deletions
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index 9f6a758029d1..2ff5f7bff891 100644 --- a/sound/soc/omap/sdp3430.c +++ b/sound/soc/omap/sdp3430.c | |||
@@ -53,29 +53,8 @@ static int sdp3430_hw_params(struct snd_pcm_substream *substream, | |||
53 | { | 53 | { |
54 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 54 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
55 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 55 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
56 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
57 | int ret; | 56 | int ret; |
58 | 57 | ||
59 | /* Set codec DAI configuration */ | ||
60 | ret = snd_soc_dai_set_fmt(codec_dai, | ||
61 | SND_SOC_DAIFMT_I2S | | ||
62 | SND_SOC_DAIFMT_NB_NF | | ||
63 | SND_SOC_DAIFMT_CBM_CFM); | ||
64 | if (ret < 0) { | ||
65 | printk(KERN_ERR "can't set codec DAI configuration\n"); | ||
66 | return ret; | ||
67 | } | ||
68 | |||
69 | /* Set cpu DAI configuration */ | ||
70 | ret = snd_soc_dai_set_fmt(cpu_dai, | ||
71 | SND_SOC_DAIFMT_I2S | | ||
72 | SND_SOC_DAIFMT_NB_NF | | ||
73 | SND_SOC_DAIFMT_CBM_CFM); | ||
74 | if (ret < 0) { | ||
75 | printk(KERN_ERR "can't set cpu DAI configuration\n"); | ||
76 | return ret; | ||
77 | } | ||
78 | |||
79 | /* Set the codec system clock for DAC and ADC */ | 58 | /* Set the codec system clock for DAC and ADC */ |
80 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | 59 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, |
81 | SND_SOC_CLOCK_IN); | 60 | SND_SOC_CLOCK_IN); |
@@ -96,29 +75,8 @@ static int sdp3430_hw_voice_params(struct snd_pcm_substream *substream, | |||
96 | { | 75 | { |
97 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 76 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
98 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 77 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
99 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
100 | int ret; | 78 | int ret; |
101 | 79 | ||
102 | /* Set codec DAI configuration */ | ||
103 | ret = snd_soc_dai_set_fmt(codec_dai, | ||
104 | SND_SOC_DAIFMT_DSP_A | | ||
105 | SND_SOC_DAIFMT_IB_NF | | ||
106 | SND_SOC_DAIFMT_CBM_CFM); | ||
107 | if (ret) { | ||
108 | printk(KERN_ERR "can't set codec DAI configuration\n"); | ||
109 | return ret; | ||
110 | } | ||
111 | |||
112 | /* Set cpu DAI configuration */ | ||
113 | ret = snd_soc_dai_set_fmt(cpu_dai, | ||
114 | SND_SOC_DAIFMT_DSP_A | | ||
115 | SND_SOC_DAIFMT_IB_NF | | ||
116 | SND_SOC_DAIFMT_CBM_CFM); | ||
117 | if (ret < 0) { | ||
118 | printk(KERN_ERR "can't set cpu DAI configuration\n"); | ||
119 | return ret; | ||
120 | } | ||
121 | |||
122 | /* Set the codec system clock for DAC and ADC */ | 80 | /* Set the codec system clock for DAC and ADC */ |
123 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | 81 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, |
124 | SND_SOC_CLOCK_IN); | 82 | SND_SOC_CLOCK_IN); |
@@ -267,6 +225,8 @@ static struct snd_soc_dai_link sdp3430_dai[] = { | |||
267 | .codec_dai_name = "twl4030-hifi", | 225 | .codec_dai_name = "twl4030-hifi", |
268 | .platform_name = "omap-pcm-audio", | 226 | .platform_name = "omap-pcm-audio", |
269 | .codec_name = "twl4030-codec", | 227 | .codec_name = "twl4030-codec", |
228 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
229 | SND_SOC_DAIFMT_CBM_CFM, | ||
270 | .init = sdp3430_twl4030_init, | 230 | .init = sdp3430_twl4030_init, |
271 | .ops = &sdp3430_ops, | 231 | .ops = &sdp3430_ops, |
272 | }, | 232 | }, |
@@ -277,6 +237,8 @@ static struct snd_soc_dai_link sdp3430_dai[] = { | |||
277 | .codec_dai_name = "twl4030-voice", | 237 | .codec_dai_name = "twl4030-voice", |
278 | .platform_name = "omap-pcm-audio", | 238 | .platform_name = "omap-pcm-audio", |
279 | .codec_name = "twl4030-codec", | 239 | .codec_name = "twl4030-codec", |
240 | .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | | ||
241 | SND_SOC_DAIFMT_CBM_CFM, | ||
280 | .init = sdp3430_twl4030_voice_init, | 242 | .init = sdp3430_twl4030_voice_init, |
281 | .ops = &sdp3430_voice_ops, | 243 | .ops = &sdp3430_voice_ops, |
282 | }, | 244 | }, |