aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8731.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/wm8731.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/wm8731.c')
-rw-r--r--sound/soc/codecs/wm8731.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 9e7ebcc2c491..e043e3f60008 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -433,6 +433,15 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec,
433#define WM8731_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 433#define WM8731_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
434 SNDRV_PCM_FMTBIT_S24_LE) 434 SNDRV_PCM_FMTBIT_S24_LE)
435 435
436static struct snd_soc_dai_ops wm8731_dai_ops = {
437 .prepare = wm8731_pcm_prepare,
438 .hw_params = wm8731_hw_params,
439 .shutdown = wm8731_shutdown,
440 .digital_mute = wm8731_mute,
441 .set_sysclk = wm8731_set_dai_sysclk,
442 .set_fmt = wm8731_set_dai_fmt,
443};
444
436struct snd_soc_dai wm8731_dai = { 445struct snd_soc_dai wm8731_dai = {
437 .name = "WM8731", 446 .name = "WM8731",
438 .playback = { 447 .playback = {
@@ -447,14 +456,7 @@ struct snd_soc_dai wm8731_dai = {
447 .channels_max = 2, 456 .channels_max = 2,
448 .rates = WM8731_RATES, 457 .rates = WM8731_RATES,
449 .formats = WM8731_FORMATS,}, 458 .formats = WM8731_FORMATS,},
450 .ops = { 459 .ops = &wm8731_dai_ops,
451 .prepare = wm8731_pcm_prepare,
452 .hw_params = wm8731_hw_params,
453 .shutdown = wm8731_shutdown,
454 .digital_mute = wm8731_mute,
455 .set_sysclk = wm8731_set_dai_sysclk,
456 .set_fmt = wm8731_set_dai_fmt,
457 }
458}; 460};
459EXPORT_SYMBOL_GPL(wm8731_dai); 461EXPORT_SYMBOL_GPL(wm8731_dai);
460 462