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/uda134x.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/uda134x.c')
-rw-r--r-- | sound/soc/codecs/uda134x.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c index 661599295ca7..ddefb8f80145 100644 --- a/sound/soc/codecs/uda134x.c +++ b/sound/soc/codecs/uda134x.c | |||
@@ -431,6 +431,15 @@ SOC_ENUM("PCM Playback De-emphasis", uda134x_mixer_enum[1]), | |||
431 | SOC_SINGLE("DC Filter Enable Switch", UDA134X_STATUS0, 0, 1, 0), | 431 | SOC_SINGLE("DC Filter Enable Switch", UDA134X_STATUS0, 0, 1, 0), |
432 | }; | 432 | }; |
433 | 433 | ||
434 | static struct snd_soc_dai_ops uda134x_dai_ops = { | ||
435 | .startup = uda134x_startup, | ||
436 | .shutdown = uda134x_shutdown, | ||
437 | .hw_params = uda134x_hw_params, | ||
438 | .digital_mute = uda134x_mute, | ||
439 | .set_sysclk = uda134x_set_dai_sysclk, | ||
440 | .set_fmt = uda134x_set_dai_fmt, | ||
441 | }; | ||
442 | |||
434 | struct snd_soc_dai uda134x_dai = { | 443 | struct snd_soc_dai uda134x_dai = { |
435 | .name = "UDA134X", | 444 | .name = "UDA134X", |
436 | /* playback capabilities */ | 445 | /* playback capabilities */ |
@@ -450,14 +459,7 @@ struct snd_soc_dai uda134x_dai = { | |||
450 | .formats = UDA134X_FORMATS, | 459 | .formats = UDA134X_FORMATS, |
451 | }, | 460 | }, |
452 | /* pcm operations */ | 461 | /* pcm operations */ |
453 | .ops = { | 462 | .ops = &uda134x_dai_ops, |
454 | .startup = uda134x_startup, | ||
455 | .shutdown = uda134x_shutdown, | ||
456 | .hw_params = uda134x_hw_params, | ||
457 | .digital_mute = uda134x_mute, | ||
458 | .set_sysclk = uda134x_set_dai_sysclk, | ||
459 | .set_fmt = uda134x_set_dai_fmt, | ||
460 | } | ||
461 | }; | 463 | }; |
462 | EXPORT_SYMBOL(uda134x_dai); | 464 | EXPORT_SYMBOL(uda134x_dai); |
463 | 465 | ||