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/wm8900.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/wm8900.c')
-rw-r--r-- | sound/soc/codecs/wm8900.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c index da5ca64f89bb..46c5ea1ff921 100644 --- a/sound/soc/codecs/wm8900.c +++ b/sound/soc/codecs/wm8900.c | |||
@@ -1088,6 +1088,14 @@ static int wm8900_digital_mute(struct snd_soc_dai *codec_dai, int mute) | |||
1088 | (SNDRV_PCM_FORMAT_S16_LE | SNDRV_PCM_FORMAT_S20_3LE | \ | 1088 | (SNDRV_PCM_FORMAT_S16_LE | SNDRV_PCM_FORMAT_S20_3LE | \ |
1089 | SNDRV_PCM_FORMAT_S24_LE) | 1089 | SNDRV_PCM_FORMAT_S24_LE) |
1090 | 1090 | ||
1091 | static struct snd_soc_dai_ops wm8900_dai_ops = { | ||
1092 | .hw_params = wm8900_hw_params, | ||
1093 | .set_clkdiv = wm8900_set_dai_clkdiv, | ||
1094 | .set_pll = wm8900_set_dai_pll, | ||
1095 | .set_fmt = wm8900_set_dai_fmt, | ||
1096 | .digital_mute = wm8900_digital_mute, | ||
1097 | }; | ||
1098 | |||
1091 | struct snd_soc_dai wm8900_dai = { | 1099 | struct snd_soc_dai wm8900_dai = { |
1092 | .name = "WM8900 HiFi", | 1100 | .name = "WM8900 HiFi", |
1093 | .playback = { | 1101 | .playback = { |
@@ -1104,13 +1112,7 @@ struct snd_soc_dai wm8900_dai = { | |||
1104 | .rates = WM8900_RATES, | 1112 | .rates = WM8900_RATES, |
1105 | .formats = WM8900_PCM_FORMATS, | 1113 | .formats = WM8900_PCM_FORMATS, |
1106 | }, | 1114 | }, |
1107 | .ops = { | 1115 | .ops = &wm8900_dai_ops, |
1108 | .hw_params = wm8900_hw_params, | ||
1109 | .set_clkdiv = wm8900_set_dai_clkdiv, | ||
1110 | .set_pll = wm8900_set_dai_pll, | ||
1111 | .set_fmt = wm8900_set_dai_fmt, | ||
1112 | .digital_mute = wm8900_digital_mute, | ||
1113 | }, | ||
1114 | }; | 1116 | }; |
1115 | EXPORT_SYMBOL_GPL(wm8900_dai); | 1117 | EXPORT_SYMBOL_GPL(wm8900_dai); |
1116 | 1118 | ||