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/tlv320aic23.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/tlv320aic23.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic23.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c index 8b20c360adf5..c3f4afb5d017 100644 --- a/sound/soc/codecs/tlv320aic23.c +++ b/sound/soc/codecs/tlv320aic23.c | |||
@@ -580,6 +580,15 @@ static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, | |||
580 | #define AIC23_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ | 580 | #define AIC23_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ |
581 | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) | 581 | SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) |
582 | 582 | ||
583 | static struct snd_soc_dai_ops tlv320aic23_dai_ops = { | ||
584 | .prepare = tlv320aic23_pcm_prepare, | ||
585 | .hw_params = tlv320aic23_hw_params, | ||
586 | .shutdown = tlv320aic23_shutdown, | ||
587 | .digital_mute = tlv320aic23_mute, | ||
588 | .set_fmt = tlv320aic23_set_dai_fmt, | ||
589 | .set_sysclk = tlv320aic23_set_dai_sysclk, | ||
590 | }; | ||
591 | |||
583 | struct snd_soc_dai tlv320aic23_dai = { | 592 | struct snd_soc_dai tlv320aic23_dai = { |
584 | .name = "tlv320aic23", | 593 | .name = "tlv320aic23", |
585 | .playback = { | 594 | .playback = { |
@@ -594,14 +603,7 @@ struct snd_soc_dai tlv320aic23_dai = { | |||
594 | .channels_max = 2, | 603 | .channels_max = 2, |
595 | .rates = AIC23_RATES, | 604 | .rates = AIC23_RATES, |
596 | .formats = AIC23_FORMATS,}, | 605 | .formats = AIC23_FORMATS,}, |
597 | .ops = { | 606 | .ops = &tlv320aic23_dai_ops, |
598 | .prepare = tlv320aic23_pcm_prepare, | ||
599 | .hw_params = tlv320aic23_hw_params, | ||
600 | .shutdown = tlv320aic23_shutdown, | ||
601 | .digital_mute = tlv320aic23_mute, | ||
602 | .set_fmt = tlv320aic23_set_dai_fmt, | ||
603 | .set_sysclk = tlv320aic23_set_dai_sysclk, | ||
604 | } | ||
605 | }; | 607 | }; |
606 | EXPORT_SYMBOL_GPL(tlv320aic23_dai); | 608 | EXPORT_SYMBOL_GPL(tlv320aic23_dai); |
607 | 609 | ||