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/wm8903.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/wm8903.c')
-rw-r--r-- | sound/soc/codecs/wm8903.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index c6fa8a71b4dd..8cf571f1a803 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c | |||
@@ -1497,6 +1497,15 @@ static int wm8903_hw_params(struct snd_pcm_substream *substream, | |||
1497 | SNDRV_PCM_FMTBIT_S20_3LE |\ | 1497 | SNDRV_PCM_FMTBIT_S20_3LE |\ |
1498 | SNDRV_PCM_FMTBIT_S24_LE) | 1498 | SNDRV_PCM_FMTBIT_S24_LE) |
1499 | 1499 | ||
1500 | static struct snd_soc_dai_ops wm8903_dai_ops = { | ||
1501 | .startup = wm8903_startup, | ||
1502 | .shutdown = wm8903_shutdown, | ||
1503 | .hw_params = wm8903_hw_params, | ||
1504 | .digital_mute = wm8903_digital_mute, | ||
1505 | .set_fmt = wm8903_set_dai_fmt, | ||
1506 | .set_sysclk = wm8903_set_dai_sysclk, | ||
1507 | }; | ||
1508 | |||
1500 | struct snd_soc_dai wm8903_dai = { | 1509 | struct snd_soc_dai wm8903_dai = { |
1501 | .name = "WM8903", | 1510 | .name = "WM8903", |
1502 | .playback = { | 1511 | .playback = { |
@@ -1513,14 +1522,7 @@ struct snd_soc_dai wm8903_dai = { | |||
1513 | .rates = WM8903_CAPTURE_RATES, | 1522 | .rates = WM8903_CAPTURE_RATES, |
1514 | .formats = WM8903_FORMATS, | 1523 | .formats = WM8903_FORMATS, |
1515 | }, | 1524 | }, |
1516 | .ops = { | 1525 | .ops = &wm8903_dai_ops, |
1517 | .startup = wm8903_startup, | ||
1518 | .shutdown = wm8903_shutdown, | ||
1519 | .hw_params = wm8903_hw_params, | ||
1520 | .digital_mute = wm8903_digital_mute, | ||
1521 | .set_fmt = wm8903_set_dai_fmt, | ||
1522 | .set_sysclk = wm8903_set_dai_sysclk | ||
1523 | } | ||
1524 | }; | 1526 | }; |
1525 | EXPORT_SYMBOL_GPL(wm8903_dai); | 1527 | EXPORT_SYMBOL_GPL(wm8903_dai); |
1526 | 1528 | ||