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 | |
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>
-rw-r--r-- | sound/soc/omap/am3517evm.c | 22 | ||||
-rw-r--r-- | sound/soc/omap/igep0020.c | 23 | ||||
-rw-r--r-- | sound/soc/omap/n810.c | 19 | ||||
-rw-r--r-- | sound/soc/omap/omap3evm.c | 23 | ||||
-rw-r--r-- | sound/soc/omap/omap3pandora.c | 20 | ||||
-rw-r--r-- | sound/soc/omap/osk5912.c | 23 | ||||
-rw-r--r-- | sound/soc/omap/overo.c | 23 | ||||
-rw-r--r-- | sound/soc/omap/rx51.c | 20 | ||||
-rw-r--r-- | sound/soc/omap/sdp3430.c | 46 | ||||
-rw-r--r-- | sound/soc/omap/zoom2.c | 46 |
10 files changed, 26 insertions, 239 deletions
diff --git a/sound/soc/omap/am3517evm.c b/sound/soc/omap/am3517evm.c index 73dde4a1adc3..48af0f87f84d 100644 --- a/sound/soc/omap/am3517evm.c +++ b/sound/soc/omap/am3517evm.c | |||
@@ -43,26 +43,6 @@ static int am3517evm_hw_params(struct snd_pcm_substream *substream, | |||
43 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | 43 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
44 | int ret; | 44 | int ret; |
45 | 45 | ||
46 | /* Set codec DAI configuration */ | ||
47 | ret = snd_soc_dai_set_fmt(codec_dai, | ||
48 | SND_SOC_DAIFMT_DSP_B | | ||
49 | SND_SOC_DAIFMT_NB_NF | | ||
50 | SND_SOC_DAIFMT_CBM_CFM); | ||
51 | if (ret < 0) { | ||
52 | printk(KERN_ERR "can't set codec DAI configuration\n"); | ||
53 | return ret; | ||
54 | } | ||
55 | |||
56 | /* Set cpu DAI configuration */ | ||
57 | ret = snd_soc_dai_set_fmt(cpu_dai, | ||
58 | SND_SOC_DAIFMT_DSP_B | | ||
59 | SND_SOC_DAIFMT_NB_NF | | ||
60 | SND_SOC_DAIFMT_CBM_CFM); | ||
61 | if (ret < 0) { | ||
62 | printk(KERN_ERR "can't set cpu DAI configuration\n"); | ||
63 | return ret; | ||
64 | } | ||
65 | |||
66 | /* Set the codec system clock for DAC and ADC */ | 46 | /* Set the codec system clock for DAC and ADC */ |
67 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, | 47 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, |
68 | CODEC_CLOCK, SND_SOC_CLOCK_IN); | 48 | CODEC_CLOCK, SND_SOC_CLOCK_IN); |
@@ -140,6 +120,8 @@ static struct snd_soc_dai_link am3517evm_dai = { | |||
140 | .codec_dai_name = "tlv320aic23-hifi", | 120 | .codec_dai_name = "tlv320aic23-hifi", |
141 | .platform_name = "omap-pcm-audio", | 121 | .platform_name = "omap-pcm-audio", |
142 | .codec_name = "tlv320aic23-codec.2-001a", | 122 | .codec_name = "tlv320aic23-codec.2-001a", |
123 | .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | | ||
124 | SND_SOC_DAIFMT_CBM_CFM, | ||
143 | .init = am3517evm_aic23_init, | 125 | .init = am3517evm_aic23_init, |
144 | .ops = &am3517evm_ops, | 126 | .ops = &am3517evm_ops, |
145 | }; | 127 | }; |
diff --git a/sound/soc/omap/igep0020.c b/sound/soc/omap/igep0020.c index 0ae34702995b..84615a7de6ad 100644 --- a/sound/soc/omap/igep0020.c +++ b/sound/soc/omap/igep0020.c | |||
@@ -38,29 +38,8 @@ static int igep2_hw_params(struct snd_pcm_substream *substream, | |||
38 | { | 38 | { |
39 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 39 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
40 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 40 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
41 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
42 | int ret; | 41 | int ret; |
43 | 42 | ||
44 | /* Set codec DAI configuration */ | ||
45 | ret = snd_soc_dai_set_fmt(codec_dai, | ||
46 | SND_SOC_DAIFMT_I2S | | ||
47 | SND_SOC_DAIFMT_NB_NF | | ||
48 | SND_SOC_DAIFMT_CBM_CFM); | ||
49 | if (ret < 0) { | ||
50 | printk(KERN_ERR "can't set codec DAI configuration\n"); | ||
51 | return ret; | ||
52 | } | ||
53 | |||
54 | /* Set cpu DAI configuration */ | ||
55 | ret = snd_soc_dai_set_fmt(cpu_dai, | ||
56 | SND_SOC_DAIFMT_I2S | | ||
57 | SND_SOC_DAIFMT_NB_NF | | ||
58 | SND_SOC_DAIFMT_CBM_CFM); | ||
59 | if (ret < 0) { | ||
60 | printk(KERN_ERR "can't set cpu DAI configuration\n"); | ||
61 | return ret; | ||
62 | } | ||
63 | |||
64 | /* Set the codec system clock for DAC and ADC */ | 43 | /* Set the codec system clock for DAC and ADC */ |
65 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | 44 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, |
66 | SND_SOC_CLOCK_IN); | 45 | SND_SOC_CLOCK_IN); |
@@ -84,6 +63,8 @@ static struct snd_soc_dai_link igep2_dai = { | |||
84 | .codec_dai_name = "twl4030-hifi", | 63 | .codec_dai_name = "twl4030-hifi", |
85 | .platform_name = "omap-pcm-audio", | 64 | .platform_name = "omap-pcm-audio", |
86 | .codec_name = "twl4030-codec", | 65 | .codec_name = "twl4030-codec", |
66 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
67 | SND_SOC_DAIFMT_CBM_CFM, | ||
87 | .ops = &igep2_ops, | 68 | .ops = &igep2_ops, |
88 | }; | 69 | }; |
89 | 70 | ||
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 62e292f49313..c10d3566ab1f 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c | |||
@@ -115,25 +115,8 @@ static int n810_hw_params(struct snd_pcm_substream *substream, | |||
115 | { | 115 | { |
116 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 116 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
117 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 117 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
118 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
119 | int err; | 118 | int err; |
120 | 119 | ||
121 | /* Set codec DAI configuration */ | ||
122 | err = snd_soc_dai_set_fmt(codec_dai, | ||
123 | SND_SOC_DAIFMT_I2S | | ||
124 | SND_SOC_DAIFMT_NB_NF | | ||
125 | SND_SOC_DAIFMT_CBM_CFM); | ||
126 | if (err < 0) | ||
127 | return err; | ||
128 | |||
129 | /* Set cpu DAI configuration */ | ||
130 | err = snd_soc_dai_set_fmt(cpu_dai, | ||
131 | SND_SOC_DAIFMT_I2S | | ||
132 | SND_SOC_DAIFMT_NB_NF | | ||
133 | SND_SOC_DAIFMT_CBM_CFM); | ||
134 | if (err < 0) | ||
135 | return err; | ||
136 | |||
137 | /* Set the codec system clock for DAC and ADC */ | 120 | /* Set the codec system clock for DAC and ADC */ |
138 | err = snd_soc_dai_set_sysclk(codec_dai, 0, 12000000, | 121 | err = snd_soc_dai_set_sysclk(codec_dai, 0, 12000000, |
139 | SND_SOC_CLOCK_IN); | 122 | SND_SOC_CLOCK_IN); |
@@ -312,6 +295,8 @@ static struct snd_soc_dai_link n810_dai = { | |||
312 | .platform_name = "omap-pcm-audio", | 295 | .platform_name = "omap-pcm-audio", |
313 | .codec_name = "tlv320aic3x-codec.2-0018", | 296 | .codec_name = "tlv320aic3x-codec.2-0018", |
314 | .codec_dai_name = "tlv320aic3x-hifi", | 297 | .codec_dai_name = "tlv320aic3x-hifi", |
298 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
299 | SND_SOC_DAIFMT_CBM_CFM, | ||
315 | .init = n810_aic33_init, | 300 | .init = n810_aic33_init, |
316 | .ops = &n810_ops, | 301 | .ops = &n810_ops, |
317 | }; | 302 | }; |
diff --git a/sound/soc/omap/omap3evm.c b/sound/soc/omap/omap3evm.c index 0daa04469836..bf9ae2a6f901 100644 --- a/sound/soc/omap/omap3evm.c +++ b/sound/soc/omap/omap3evm.c | |||
@@ -36,29 +36,8 @@ static int omap3evm_hw_params(struct snd_pcm_substream *substream, | |||
36 | { | 36 | { |
37 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 37 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
38 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 38 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
39 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
40 | int ret; | 39 | int ret; |
41 | 40 | ||
42 | /* Set codec DAI configuration */ | ||
43 | ret = snd_soc_dai_set_fmt(codec_dai, | ||
44 | SND_SOC_DAIFMT_I2S | | ||
45 | SND_SOC_DAIFMT_NB_NF | | ||
46 | SND_SOC_DAIFMT_CBM_CFM); | ||
47 | if (ret < 0) { | ||
48 | printk(KERN_ERR "Can't set codec DAI configuration\n"); | ||
49 | return ret; | ||
50 | } | ||
51 | |||
52 | /* Set cpu DAI configuration */ | ||
53 | ret = snd_soc_dai_set_fmt(cpu_dai, | ||
54 | SND_SOC_DAIFMT_I2S | | ||
55 | SND_SOC_DAIFMT_NB_NF | | ||
56 | SND_SOC_DAIFMT_CBM_CFM); | ||
57 | if (ret < 0) { | ||
58 | printk(KERN_ERR "Can't set cpu DAI configuration\n"); | ||
59 | return ret; | ||
60 | } | ||
61 | |||
62 | /* Set the codec system clock for DAC and ADC */ | 41 | /* Set the codec system clock for DAC and ADC */ |
63 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | 42 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, |
64 | SND_SOC_CLOCK_IN); | 43 | SND_SOC_CLOCK_IN); |
@@ -82,6 +61,8 @@ static struct snd_soc_dai_link omap3evm_dai = { | |||
82 | .codec_dai_name = "twl4030-hifi", | 61 | .codec_dai_name = "twl4030-hifi", |
83 | .platform_name = "omap-pcm-audio", | 62 | .platform_name = "omap-pcm-audio", |
84 | .codec_name = "twl4030-codec", | 63 | .codec_name = "twl4030-codec", |
64 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
65 | SND_SOC_DAIFMT_CBM_CFM, | ||
85 | .ops = &omap3evm_ops, | 66 | .ops = &omap3evm_ops, |
86 | }; | 67 | }; |
87 | 68 | ||
diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c index 8047c521e318..3ae87fd36612 100644 --- a/sound/soc/omap/omap3pandora.c +++ b/sound/soc/omap/omap3pandora.c | |||
@@ -48,24 +48,8 @@ static int omap3pandora_hw_params(struct snd_pcm_substream *substream, | |||
48 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 48 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
49 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 49 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
50 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | 50 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
51 | int fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
52 | SND_SOC_DAIFMT_CBS_CFS; | ||
53 | int ret; | 51 | int ret; |
54 | 52 | ||
55 | /* Set codec DAI configuration */ | ||
56 | ret = snd_soc_dai_set_fmt(codec_dai, fmt); | ||
57 | if (ret < 0) { | ||
58 | pr_err(PREFIX "can't set codec DAI configuration\n"); | ||
59 | return ret; | ||
60 | } | ||
61 | |||
62 | /* Set cpu DAI configuration */ | ||
63 | ret = snd_soc_dai_set_fmt(cpu_dai, fmt); | ||
64 | if (ret < 0) { | ||
65 | pr_err(PREFIX "can't set cpu DAI configuration\n"); | ||
66 | return ret; | ||
67 | } | ||
68 | |||
69 | /* Set the codec system clock for DAC and ADC */ | 53 | /* Set the codec system clock for DAC and ADC */ |
70 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | 54 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, |
71 | SND_SOC_CLOCK_IN); | 55 | SND_SOC_CLOCK_IN); |
@@ -231,6 +215,8 @@ static struct snd_soc_dai_link omap3pandora_dai[] = { | |||
231 | .codec_dai_name = "twl4030-hifi", | 215 | .codec_dai_name = "twl4030-hifi", |
232 | .platform_name = "omap-pcm-audio", | 216 | .platform_name = "omap-pcm-audio", |
233 | .codec_name = "twl4030-codec", | 217 | .codec_name = "twl4030-codec", |
218 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
219 | SND_SOC_DAIFMT_CBS_CFS, | ||
234 | .ops = &omap3pandora_ops, | 220 | .ops = &omap3pandora_ops, |
235 | .init = omap3pandora_out_init, | 221 | .init = omap3pandora_out_init, |
236 | }, { | 222 | }, { |
@@ -240,6 +226,8 @@ static struct snd_soc_dai_link omap3pandora_dai[] = { | |||
240 | .codec_dai_name = "twl4030-hifi", | 226 | .codec_dai_name = "twl4030-hifi", |
241 | .platform_name = "omap-pcm-audio", | 227 | .platform_name = "omap-pcm-audio", |
242 | .codec_name = "twl4030-codec", | 228 | .codec_name = "twl4030-codec", |
229 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
230 | SND_SOC_DAIFMT_CBS_CFS, | ||
243 | .ops = &omap3pandora_ops, | 231 | .ops = &omap3pandora_ops, |
244 | .init = omap3pandora_in_init, | 232 | .init = omap3pandora_in_init, |
245 | } | 233 | } |
diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c index 7e75e775fb4a..597833246e3a 100644 --- a/sound/soc/omap/osk5912.c +++ b/sound/soc/omap/osk5912.c | |||
@@ -55,29 +55,8 @@ static int osk_hw_params(struct snd_pcm_substream *substream, | |||
55 | { | 55 | { |
56 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 56 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
57 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 57 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
58 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
59 | int err; | 58 | int err; |
60 | 59 | ||
61 | /* Set codec DAI configuration */ | ||
62 | err = snd_soc_dai_set_fmt(codec_dai, | ||
63 | SND_SOC_DAIFMT_DSP_B | | ||
64 | SND_SOC_DAIFMT_NB_NF | | ||
65 | SND_SOC_DAIFMT_CBM_CFM); | ||
66 | if (err < 0) { | ||
67 | printk(KERN_ERR "can't set codec DAI configuration\n"); | ||
68 | return err; | ||
69 | } | ||
70 | |||
71 | /* Set cpu DAI configuration */ | ||
72 | err = snd_soc_dai_set_fmt(cpu_dai, | ||
73 | SND_SOC_DAIFMT_DSP_B | | ||
74 | SND_SOC_DAIFMT_NB_NF | | ||
75 | SND_SOC_DAIFMT_CBM_CFM); | ||
76 | if (err < 0) { | ||
77 | printk(KERN_ERR "can't set cpu DAI configuration\n"); | ||
78 | return err; | ||
79 | } | ||
80 | |||
81 | /* Set the codec system clock for DAC and ADC */ | 60 | /* Set the codec system clock for DAC and ADC */ |
82 | err = | 61 | err = |
83 | snd_soc_dai_set_sysclk(codec_dai, 0, CODEC_CLOCK, SND_SOC_CLOCK_IN); | 62 | snd_soc_dai_set_sysclk(codec_dai, 0, CODEC_CLOCK, SND_SOC_CLOCK_IN); |
@@ -141,6 +120,8 @@ static struct snd_soc_dai_link osk_dai = { | |||
141 | .codec_dai_name = "tlv320aic23-hifi", | 120 | .codec_dai_name = "tlv320aic23-hifi", |
142 | .platform_name = "omap-pcm-audio", | 121 | .platform_name = "omap-pcm-audio", |
143 | .codec_name = "tlv320aic23-codec", | 122 | .codec_name = "tlv320aic23-codec", |
123 | .dai_fmt = SND_SOC_DAIFMT_DSP_B | SND_SOC_DAIFMT_NB_NF | | ||
124 | SND_SOC_DAIFMT_CBM_CFM, | ||
144 | .init = osk_tlv320aic23_init, | 125 | .init = osk_tlv320aic23_init, |
145 | .ops = &osk_ops, | 126 | .ops = &osk_ops, |
146 | }; | 127 | }; |
diff --git a/sound/soc/omap/overo.c b/sound/soc/omap/overo.c index bbcf380bfb56..739efe9e327a 100644 --- a/sound/soc/omap/overo.c +++ b/sound/soc/omap/overo.c | |||
@@ -38,29 +38,8 @@ static int overo_hw_params(struct snd_pcm_substream *substream, | |||
38 | { | 38 | { |
39 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 39 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
40 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 40 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
41 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
42 | int ret; | 41 | int ret; |
43 | 42 | ||
44 | /* Set codec DAI configuration */ | ||
45 | ret = snd_soc_dai_set_fmt(codec_dai, | ||
46 | SND_SOC_DAIFMT_I2S | | ||
47 | SND_SOC_DAIFMT_NB_NF | | ||
48 | SND_SOC_DAIFMT_CBM_CFM); | ||
49 | if (ret < 0) { | ||
50 | printk(KERN_ERR "can't set codec DAI configuration\n"); | ||
51 | return ret; | ||
52 | } | ||
53 | |||
54 | /* Set cpu DAI configuration */ | ||
55 | ret = snd_soc_dai_set_fmt(cpu_dai, | ||
56 | SND_SOC_DAIFMT_I2S | | ||
57 | SND_SOC_DAIFMT_NB_NF | | ||
58 | SND_SOC_DAIFMT_CBM_CFM); | ||
59 | if (ret < 0) { | ||
60 | printk(KERN_ERR "can't set cpu DAI configuration\n"); | ||
61 | return ret; | ||
62 | } | ||
63 | |||
64 | /* Set the codec system clock for DAC and ADC */ | 43 | /* Set the codec system clock for DAC and ADC */ |
65 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | 44 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, |
66 | SND_SOC_CLOCK_IN); | 45 | SND_SOC_CLOCK_IN); |
@@ -84,6 +63,8 @@ static struct snd_soc_dai_link overo_dai = { | |||
84 | .codec_dai_name = "twl4030-hifi", | 63 | .codec_dai_name = "twl4030-hifi", |
85 | .platform_name = "omap-pcm-audio", | 64 | .platform_name = "omap-pcm-audio", |
86 | .codec_name = "twl4030-codec", | 65 | .codec_name = "twl4030-codec", |
66 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
67 | SND_SOC_DAIFMT_CBM_CFM, | ||
87 | .ops = &overo_ops, | 68 | .ops = &overo_ops, |
88 | }; | 69 | }; |
89 | 70 | ||
diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c index 893300a53bab..7164db5fc38a 100644 --- a/sound/soc/omap/rx51.c +++ b/sound/soc/omap/rx51.c | |||
@@ -115,24 +115,6 @@ static int rx51_hw_params(struct snd_pcm_substream *substream, | |||
115 | { | 115 | { |
116 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 116 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
117 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 117 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
118 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
119 | int err; | ||
120 | |||
121 | /* Set codec DAI configuration */ | ||
122 | err = snd_soc_dai_set_fmt(codec_dai, | ||
123 | SND_SOC_DAIFMT_DSP_A | | ||
124 | SND_SOC_DAIFMT_IB_NF | | ||
125 | SND_SOC_DAIFMT_CBM_CFM); | ||
126 | if (err < 0) | ||
127 | return err; | ||
128 | |||
129 | /* Set cpu DAI configuration */ | ||
130 | err = snd_soc_dai_set_fmt(cpu_dai, | ||
131 | SND_SOC_DAIFMT_DSP_A | | ||
132 | SND_SOC_DAIFMT_IB_NF | | ||
133 | SND_SOC_DAIFMT_CBM_CFM); | ||
134 | if (err < 0) | ||
135 | return err; | ||
136 | 118 | ||
137 | /* Set the codec system clock for DAC and ADC */ | 119 | /* Set the codec system clock for DAC and ADC */ |
138 | return snd_soc_dai_set_sysclk(codec_dai, 0, 19200000, | 120 | return snd_soc_dai_set_sysclk(codec_dai, 0, 19200000, |
@@ -377,6 +359,8 @@ static struct snd_soc_dai_link rx51_dai[] = { | |||
377 | .codec_dai_name = "tlv320aic3x-hifi", | 359 | .codec_dai_name = "tlv320aic3x-hifi", |
378 | .platform_name = "omap-pcm-audio", | 360 | .platform_name = "omap-pcm-audio", |
379 | .codec_name = "tlv320aic3x-codec.2-0018", | 361 | .codec_name = "tlv320aic3x-codec.2-0018", |
362 | .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | | ||
363 | SND_SOC_DAIFMT_CBM_CFM, | ||
380 | .init = rx51_aic34_init, | 364 | .init = rx51_aic34_init, |
381 | .ops = &rx51_ops, | 365 | .ops = &rx51_ops, |
382 | }, | 366 | }, |
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 | }, |
diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c index 9a2666ffc16c..c1245623e6d3 100644 --- a/sound/soc/omap/zoom2.c +++ b/sound/soc/omap/zoom2.c | |||
@@ -44,29 +44,8 @@ static int zoom2_hw_params(struct snd_pcm_substream *substream, | |||
44 | { | 44 | { |
45 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 45 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
46 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 46 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
47 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
48 | int ret; | 47 | int ret; |
49 | 48 | ||
50 | /* Set codec DAI configuration */ | ||
51 | ret = snd_soc_dai_set_fmt(codec_dai, | ||
52 | SND_SOC_DAIFMT_I2S | | ||
53 | SND_SOC_DAIFMT_NB_NF | | ||
54 | SND_SOC_DAIFMT_CBM_CFM); | ||
55 | if (ret < 0) { | ||
56 | printk(KERN_ERR "can't set codec DAI configuration\n"); | ||
57 | return ret; | ||
58 | } | ||
59 | |||
60 | /* Set cpu DAI configuration */ | ||
61 | ret = snd_soc_dai_set_fmt(cpu_dai, | ||
62 | SND_SOC_DAIFMT_I2S | | ||
63 | SND_SOC_DAIFMT_NB_NF | | ||
64 | SND_SOC_DAIFMT_CBM_CFM); | ||
65 | if (ret < 0) { | ||
66 | printk(KERN_ERR "can't set cpu DAI configuration\n"); | ||
67 | return ret; | ||
68 | } | ||
69 | |||
70 | /* Set the codec system clock for DAC and ADC */ | 49 | /* Set the codec system clock for DAC and ADC */ |
71 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | 50 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, |
72 | SND_SOC_CLOCK_IN); | 51 | SND_SOC_CLOCK_IN); |
@@ -87,29 +66,8 @@ static int zoom2_hw_voice_params(struct snd_pcm_substream *substream, | |||
87 | { | 66 | { |
88 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 67 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
89 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | 68 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
90 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
91 | int ret; | 69 | int ret; |
92 | 70 | ||
93 | /* Set codec DAI configuration */ | ||
94 | ret = snd_soc_dai_set_fmt(codec_dai, | ||
95 | SND_SOC_DAIFMT_DSP_A | | ||
96 | SND_SOC_DAIFMT_IB_NF | | ||
97 | SND_SOC_DAIFMT_CBM_CFM); | ||
98 | if (ret) { | ||
99 | printk(KERN_ERR "can't set codec DAI configuration\n"); | ||
100 | return ret; | ||
101 | } | ||
102 | |||
103 | /* Set cpu DAI configuration */ | ||
104 | ret = snd_soc_dai_set_fmt(cpu_dai, | ||
105 | SND_SOC_DAIFMT_DSP_A | | ||
106 | SND_SOC_DAIFMT_IB_NF | | ||
107 | SND_SOC_DAIFMT_CBM_CFM); | ||
108 | if (ret < 0) { | ||
109 | printk(KERN_ERR "can't set cpu DAI configuration\n"); | ||
110 | return ret; | ||
111 | } | ||
112 | |||
113 | /* Set the codec system clock for DAC and ADC */ | 71 | /* Set the codec system clock for DAC and ADC */ |
114 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | 72 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, |
115 | SND_SOC_CLOCK_IN); | 73 | SND_SOC_CLOCK_IN); |
@@ -217,6 +175,8 @@ static struct snd_soc_dai_link zoom2_dai[] = { | |||
217 | .codec_dai_name = "twl4030-hifi", | 175 | .codec_dai_name = "twl4030-hifi", |
218 | .platform_name = "omap-pcm-audio", | 176 | .platform_name = "omap-pcm-audio", |
219 | .codec_name = "twl4030-codec", | 177 | .codec_name = "twl4030-codec", |
178 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
179 | SND_SOC_DAIFMT_CBM_CFM, | ||
220 | .init = zoom2_twl4030_init, | 180 | .init = zoom2_twl4030_init, |
221 | .ops = &zoom2_ops, | 181 | .ops = &zoom2_ops, |
222 | }, | 182 | }, |
@@ -227,6 +187,8 @@ static struct snd_soc_dai_link zoom2_dai[] = { | |||
227 | .codec_dai_name = "twl4030-voice", | 187 | .codec_dai_name = "twl4030-voice", |
228 | .platform_name = "omap-pcm-audio", | 188 | .platform_name = "omap-pcm-audio", |
229 | .codec_name = "twl4030-codec", | 189 | .codec_name = "twl4030-codec", |
190 | .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | | ||
191 | SND_SOC_DAIFMT_CBM_CFM, | ||
230 | .init = zoom2_twl4030_voice_init, | 192 | .init = zoom2_twl4030_voice_init, |
231 | .ops = &zoom2_voice_ops, | 193 | .ops = &zoom2_voice_ops, |
232 | }, | 194 | }, |