aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/s3c24xx/s3c2443-ac97.c
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2009-03-03 09:41:00 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-04 22:29:47 +0000
commit6335d05548eece40092000aa91b64a50310d69d5 (patch)
treeac72c74562f349879a127b4067827476a7875c88 /sound/soc/s3c24xx/s3c2443-ac97.c
parentASoC: fix typo and removed unneeded switch case for cs4270 (diff)
downloadlinux-dev-6335d05548eece40092000aa91b64a50310d69d5.tar.xz
linux-dev-6335d05548eece40092000aa91b64a50310d69d5.zip
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/s3c24xx/s3c2443-ac97.c')
-rw-r--r--sound/soc/s3c24xx/s3c2443-ac97.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c
index 5822d2dd49ba..83ea623234e7 100644
--- a/sound/soc/s3c24xx/s3c2443-ac97.c
+++ b/sound/soc/s3c24xx/s3c2443-ac97.c
@@ -355,6 +355,11 @@ static int s3c2443_ac97_mic_trigger(struct snd_pcm_substream *substream,
SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \
SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)
+static struct snd_soc_dai_ops s3c2443_ac97_dai_ops = {
+ .hw_params = s3c2443_ac97_hw_params,
+ .trigger = s3c2443_ac97_trigger,
+};
+
struct snd_soc_dai s3c2443_ac97_dai[] = {
{
.name = "s3c2443-ac97",
@@ -374,9 +379,7 @@ struct snd_soc_dai s3c2443_ac97_dai[] = {
.channels_max = 2,
.rates = s3c2443_AC97_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
- .ops = {
- .hw_params = s3c2443_ac97_hw_params,
- .trigger = s3c2443_ac97_trigger},
+ .ops = &s3c2443_ac97_dai_ops,
},
{
.name = "pxa2xx-ac97-mic",
@@ -388,9 +391,7 @@ struct snd_soc_dai s3c2443_ac97_dai[] = {
.channels_max = 1,
.rates = s3c2443_AC97_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
- .ops = {
- .hw_params = s3c2443_ac97_hw_mic_params,
- .trigger = s3c2443_ac97_mic_trigger,},
+ .ops = &s3c2443_ac97_dai_ops,
},
};
EXPORT_SYMBOL_GPL(s3c2443_ac97_dai);