diff options
author | Jarkko Nikula <jarkko.nikula@bitmer.com> | 2011-09-30 09:07:46 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-02 14:57:08 -0400 |
commit | a3c6dac201005077f78ea5b18c89e6cd568e2d85 (patch) | |
tree | 3aaf576c63106d03749334d33c5b9a7566d6d344 /sound/soc/omap/sdp3430.c | |
parent | cf9feff28fc1f00c82fb0cc016307d4c65da132a (diff) |
ASoC: omap: Use single hw_params callback in sdp3430 and zoom2
There is no need to use two hw_params callbacks in sdp3430 and zoom2 as
thet are now identical. Use instead the same snd_soc_ops structure and
hw_params callback for both DAI links.
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 | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/sound/soc/omap/sdp3430.c b/sound/soc/omap/sdp3430.c index 2ff5f7bff891..269aded8a6be 100644 --- a/sound/soc/omap/sdp3430.c +++ b/sound/soc/omap/sdp3430.c | |||
@@ -70,28 +70,6 @@ static struct snd_soc_ops sdp3430_ops = { | |||
70 | .hw_params = sdp3430_hw_params, | 70 | .hw_params = sdp3430_hw_params, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | static int sdp3430_hw_voice_params(struct snd_pcm_substream *substream, | ||
74 | struct snd_pcm_hw_params *params) | ||
75 | { | ||
76 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
77 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | ||
78 | int ret; | ||
79 | |||
80 | /* Set the codec system clock for DAC and ADC */ | ||
81 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | ||
82 | SND_SOC_CLOCK_IN); | ||
83 | if (ret < 0) { | ||
84 | printk(KERN_ERR "can't set codec system clock\n"); | ||
85 | return ret; | ||
86 | } | ||
87 | |||
88 | return 0; | ||
89 | } | ||
90 | |||
91 | static struct snd_soc_ops sdp3430_voice_ops = { | ||
92 | .hw_params = sdp3430_hw_voice_params, | ||
93 | }; | ||
94 | |||
95 | /* Headset jack */ | 73 | /* Headset jack */ |
96 | static struct snd_soc_jack hs_jack; | 74 | static struct snd_soc_jack hs_jack; |
97 | 75 | ||
@@ -240,7 +218,7 @@ static struct snd_soc_dai_link sdp3430_dai[] = { | |||
240 | .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | | 218 | .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | |
241 | SND_SOC_DAIFMT_CBM_CFM, | 219 | SND_SOC_DAIFMT_CBM_CFM, |
242 | .init = sdp3430_twl4030_voice_init, | 220 | .init = sdp3430_twl4030_voice_init, |
243 | .ops = &sdp3430_voice_ops, | 221 | .ops = &sdp3430_ops, |
244 | }, | 222 | }, |
245 | }; | 223 | }; |
246 | 224 | ||