diff options
Diffstat (limited to 'sound/soc/omap/omap3pandora.c')
-rw-r--r-- | sound/soc/omap/omap3pandora.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/sound/soc/omap/omap3pandora.c b/sound/soc/omap/omap3pandora.c index 87ce842fa2e..9eecac135bb 100644 --- a/sound/soc/omap/omap3pandora.c +++ b/sound/soc/omap/omap3pandora.c | |||
@@ -43,12 +43,14 @@ | |||
43 | 43 | ||
44 | static struct regulator *omap3pandora_dac_reg; | 44 | static struct regulator *omap3pandora_dac_reg; |
45 | 45 | ||
46 | static int omap3pandora_cmn_hw_params(struct snd_pcm_substream *substream, | 46 | static int omap3pandora_hw_params(struct snd_pcm_substream *substream, |
47 | struct snd_pcm_hw_params *params, unsigned int fmt) | 47 | struct snd_pcm_hw_params *params) |
48 | { | 48 | { |
49 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 49 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
50 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 50 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; |
51 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 51 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; |
52 | int fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
53 | SND_SOC_DAIFMT_CBS_CFS; | ||
52 | int ret; | 54 | int ret; |
53 | 55 | ||
54 | /* Set codec DAI configuration */ | 56 | /* Set codec DAI configuration */ |
@@ -91,24 +93,6 @@ static int omap3pandora_cmn_hw_params(struct snd_pcm_substream *substream, | |||
91 | return 0; | 93 | return 0; |
92 | } | 94 | } |
93 | 95 | ||
94 | static int omap3pandora_out_hw_params(struct snd_pcm_substream *substream, | ||
95 | struct snd_pcm_hw_params *params) | ||
96 | { | ||
97 | return omap3pandora_cmn_hw_params(substream, params, | ||
98 | SND_SOC_DAIFMT_I2S | | ||
99 | SND_SOC_DAIFMT_IB_NF | | ||
100 | SND_SOC_DAIFMT_CBS_CFS); | ||
101 | } | ||
102 | |||
103 | static int omap3pandora_in_hw_params(struct snd_pcm_substream *substream, | ||
104 | struct snd_pcm_hw_params *params) | ||
105 | { | ||
106 | return omap3pandora_cmn_hw_params(substream, params, | ||
107 | SND_SOC_DAIFMT_I2S | | ||
108 | SND_SOC_DAIFMT_NB_NF | | ||
109 | SND_SOC_DAIFMT_CBS_CFS); | ||
110 | } | ||
111 | |||
112 | static int omap3pandora_dac_event(struct snd_soc_dapm_widget *w, | 96 | static int omap3pandora_dac_event(struct snd_soc_dapm_widget *w, |
113 | struct snd_kcontrol *k, int event) | 97 | struct snd_kcontrol *k, int event) |
114 | { | 98 | { |
@@ -231,12 +215,8 @@ static int omap3pandora_in_init(struct snd_soc_codec *codec) | |||
231 | return snd_soc_dapm_sync(codec); | 215 | return snd_soc_dapm_sync(codec); |
232 | } | 216 | } |
233 | 217 | ||
234 | static struct snd_soc_ops omap3pandora_out_ops = { | 218 | static struct snd_soc_ops omap3pandora_ops = { |
235 | .hw_params = omap3pandora_out_hw_params, | 219 | .hw_params = omap3pandora_hw_params, |
236 | }; | ||
237 | |||
238 | static struct snd_soc_ops omap3pandora_in_ops = { | ||
239 | .hw_params = omap3pandora_in_hw_params, | ||
240 | }; | 220 | }; |
241 | 221 | ||
242 | /* Digital audio interface glue - connects codec <--> CPU */ | 222 | /* Digital audio interface glue - connects codec <--> CPU */ |
@@ -246,14 +226,14 @@ static struct snd_soc_dai_link omap3pandora_dai[] = { | |||
246 | .stream_name = "HiFi Out", | 226 | .stream_name = "HiFi Out", |
247 | .cpu_dai = &omap_mcbsp_dai[0], | 227 | .cpu_dai = &omap_mcbsp_dai[0], |
248 | .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI], | 228 | .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI], |
249 | .ops = &omap3pandora_out_ops, | 229 | .ops = &omap3pandora_ops, |
250 | .init = omap3pandora_out_init, | 230 | .init = omap3pandora_out_init, |
251 | }, { | 231 | }, { |
252 | .name = "TWL4030", | 232 | .name = "TWL4030", |
253 | .stream_name = "Line/Mic In", | 233 | .stream_name = "Line/Mic In", |
254 | .cpu_dai = &omap_mcbsp_dai[1], | 234 | .cpu_dai = &omap_mcbsp_dai[1], |
255 | .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI], | 235 | .codec_dai = &twl4030_dai[TWL4030_DAI_HIFI], |
256 | .ops = &omap3pandora_in_ops, | 236 | .ops = &omap3pandora_ops, |
257 | .init = omap3pandora_in_init, | 237 | .init = omap3pandora_in_init, |
258 | } | 238 | } |
259 | }; | 239 | }; |