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/ac97.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/ac97.c')
-rw-r--r-- | sound/soc/codecs/ac97.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index 11f84b6e5cb8..b0d4af145b87 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c | |||
@@ -41,6 +41,10 @@ static int ac97_prepare(struct snd_pcm_substream *substream, | |||
41 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\ | 41 | SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_44100 |\ |
42 | SNDRV_PCM_RATE_48000) | 42 | SNDRV_PCM_RATE_48000) |
43 | 43 | ||
44 | static struct snd_soc_dai_ops ac97_dai_ops = { | ||
45 | .prepare = ac97_prepare, | ||
46 | }; | ||
47 | |||
44 | struct snd_soc_dai ac97_dai = { | 48 | struct snd_soc_dai ac97_dai = { |
45 | .name = "AC97 HiFi", | 49 | .name = "AC97 HiFi", |
46 | .ac97_control = 1, | 50 | .ac97_control = 1, |
@@ -56,8 +60,7 @@ struct snd_soc_dai ac97_dai = { | |||
56 | .channels_max = 2, | 60 | .channels_max = 2, |
57 | .rates = STD_AC97_RATES, | 61 | .rates = STD_AC97_RATES, |
58 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, | 62 | .formats = SNDRV_PCM_FMTBIT_S16_LE,}, |
59 | .ops = { | 63 | .ops = &ac97_dai_ops, |
60 | .prepare = ac97_prepare,}, | ||
61 | }; | 64 | }; |
62 | EXPORT_SYMBOL_GPL(ac97_dai); | 65 | EXPORT_SYMBOL_GPL(ac97_dai); |
63 | 66 | ||