aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8750.c
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2009-03-02 20:41:00 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-04 17:29:47 -0500
commit6335d05548eece40092000aa91b64a50310d69d5 (patch)
treeac72c74562f349879a127b4067827476a7875c88 /sound/soc/codecs/wm8750.c
parentff09d49ad0176a5f52a398c137a7ff5f669d6be4 (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/wm8750.c')
-rw-r--r--sound/soc/codecs/wm8750.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/codecs/wm8750.c b/sound/soc/codecs/wm8750.c
index 96afb86addc6..b64509b01a49 100644
--- a/sound/soc/codecs/wm8750.c
+++ b/sound/soc/codecs/wm8750.c
@@ -679,6 +679,13 @@ static int wm8750_set_bias_level(struct snd_soc_codec *codec,
679#define WM8750_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 679#define WM8750_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
680 SNDRV_PCM_FMTBIT_S24_LE) 680 SNDRV_PCM_FMTBIT_S24_LE)
681 681
682static struct snd_soc_dai_ops wm8750_dai_ops = {
683 .hw_params = wm8750_pcm_hw_params,
684 .digital_mute = wm8750_mute,
685 .set_fmt = wm8750_set_dai_fmt,
686 .set_sysclk = wm8750_set_dai_sysclk,
687};
688
682struct snd_soc_dai wm8750_dai = { 689struct snd_soc_dai wm8750_dai = {
683 .name = "WM8750", 690 .name = "WM8750",
684 .playback = { 691 .playback = {
@@ -693,12 +700,7 @@ struct snd_soc_dai wm8750_dai = {
693 .channels_max = 2, 700 .channels_max = 2,
694 .rates = WM8750_RATES, 701 .rates = WM8750_RATES,
695 .formats = WM8750_FORMATS,}, 702 .formats = WM8750_FORMATS,},
696 .ops = { 703 .ops = &wm8750_dai_ops,
697 .hw_params = wm8750_pcm_hw_params,
698 .digital_mute = wm8750_mute,
699 .set_fmt = wm8750_set_dai_fmt,
700 .set_sysclk = wm8750_set_dai_sysclk,
701 },
702}; 704};
703EXPORT_SYMBOL_GPL(wm8750_dai); 705EXPORT_SYMBOL_GPL(wm8750_dai);
704 706