diff options
author | Eric Miao <eric.y.miao@gmail.com> | 2009-03-02 20:41:00 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-03-04 17:29:47 -0500 |
commit | 6335d05548eece40092000aa91b64a50310d69d5 (patch) | |
tree | ac72c74562f349879a127b4067827476a7875c88 /sound/soc/codecs/tlv320aic26.c | |
parent | ff09d49ad0176a5f52a398c137a7ff5f669d6be4 (diff) |
ASoC: make ops a pointer in 'struct snd_soc_dai'
Considering the fact that most cpu_dai or codec_dai are using a same
'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better
made a pointer instead, to make sharing easier and code a bit cleaner.
The patch below is rather preliminary since the asoc tree is being
actively developed, and this touches almost every piece of code,
(and possibly many others in development need to be changed as
well). Building of all codecs are OK, yet to every SoC, I didn't test
that.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/tlv320aic26.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic26.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index 229e464cf713..a7f333fc579e 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c | |||
@@ -270,6 +270,13 @@ static int aic26_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) | |||
270 | #define AIC26_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_BE |\ | 270 | #define AIC26_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_BE |\ |
271 | SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S32_BE) | 271 | SNDRV_PCM_FMTBIT_S24_BE | SNDRV_PCM_FMTBIT_S32_BE) |
272 | 272 | ||
273 | static struct snd_soc_dai_ops aic26_dai_ops = { | ||
274 | .hw_params = aic26_hw_params, | ||
275 | .digital_mute = aic26_mute, | ||
276 | .set_sysclk = aic26_set_sysclk, | ||
277 | .set_fmt = aic26_set_fmt, | ||
278 | }; | ||
279 | |||
273 | struct snd_soc_dai aic26_dai = { | 280 | struct snd_soc_dai aic26_dai = { |
274 | .name = "tlv320aic26", | 281 | .name = "tlv320aic26", |
275 | .playback = { | 282 | .playback = { |
@@ -286,12 +293,7 @@ struct snd_soc_dai aic26_dai = { | |||
286 | .rates = AIC26_RATES, | 293 | .rates = AIC26_RATES, |
287 | .formats = AIC26_FORMATS, | 294 | .formats = AIC26_FORMATS, |
288 | }, | 295 | }, |
289 | .ops = { | 296 | .ops = &aic26_dai_ops, |
290 | .hw_params = aic26_hw_params, | ||
291 | .digital_mute = aic26_mute, | ||
292 | .set_sysclk = aic26_set_sysclk, | ||
293 | .set_fmt = aic26_set_fmt, | ||
294 | }, | ||
295 | }; | 297 | }; |
296 | EXPORT_SYMBOL_GPL(aic26_dai); | 298 | EXPORT_SYMBOL_GPL(aic26_dai); |
297 | 299 | ||