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/zoom2.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/zoom2.c')
-rw-r--r-- | sound/soc/omap/zoom2.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/sound/soc/omap/zoom2.c b/sound/soc/omap/zoom2.c index c1245623e6d3..8b1ebbce33aa 100644 --- a/sound/soc/omap/zoom2.c +++ b/sound/soc/omap/zoom2.c | |||
@@ -61,28 +61,6 @@ static struct snd_soc_ops zoom2_ops = { | |||
61 | .hw_params = zoom2_hw_params, | 61 | .hw_params = zoom2_hw_params, |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static int zoom2_hw_voice_params(struct snd_pcm_substream *substream, | ||
65 | struct snd_pcm_hw_params *params) | ||
66 | { | ||
67 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
68 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | ||
69 | int ret; | ||
70 | |||
71 | /* Set the codec system clock for DAC and ADC */ | ||
72 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 26000000, | ||
73 | SND_SOC_CLOCK_IN); | ||
74 | if (ret < 0) { | ||
75 | printk(KERN_ERR "can't set codec system clock\n"); | ||
76 | return ret; | ||
77 | } | ||
78 | |||
79 | return 0; | ||
80 | } | ||
81 | |||
82 | static struct snd_soc_ops zoom2_voice_ops = { | ||
83 | .hw_params = zoom2_hw_voice_params, | ||
84 | }; | ||
85 | |||
86 | /* Zoom2 machine DAPM */ | 64 | /* Zoom2 machine DAPM */ |
87 | static const struct snd_soc_dapm_widget zoom2_twl4030_dapm_widgets[] = { | 65 | static const struct snd_soc_dapm_widget zoom2_twl4030_dapm_widgets[] = { |
88 | SND_SOC_DAPM_MIC("Ext Mic", NULL), | 66 | SND_SOC_DAPM_MIC("Ext Mic", NULL), |
@@ -190,7 +168,7 @@ static struct snd_soc_dai_link zoom2_dai[] = { | |||
190 | .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | | 168 | .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | |
191 | SND_SOC_DAIFMT_CBM_CFM, | 169 | SND_SOC_DAIFMT_CBM_CFM, |
192 | .init = zoom2_twl4030_voice_init, | 170 | .init = zoom2_twl4030_voice_init, |
193 | .ops = &zoom2_voice_ops, | 171 | .ops = &zoom2_ops, |
194 | }, | 172 | }, |
195 | }; | 173 | }; |
196 | 174 | ||