aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/au1x
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/au1x
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/au1x')
-rw-r--r--sound/soc/au1x/psc-ac97.c10
-rw-r--r--sound/soc/au1x/psc-i2s.c12
2 files changed, 13 insertions, 9 deletions
diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c
index f0e30aec7f23..479d7bdf1865 100644
--- a/sound/soc/au1x/psc-ac97.c
+++ b/sound/soc/au1x/psc-ac97.c
@@ -342,6 +342,11 @@ static int au1xpsc_ac97_resume(struct snd_soc_dai *dai)
342 return 0; 342 return 0;
343} 343}
344 344
345static struct snd_soc_dai_ops au1xpsc_ac97_dai_ops = {
346 .trigger = au1xpsc_ac97_trigger,
347 .hw_params = au1xpsc_ac97_hw_params,
348};
349
345struct snd_soc_dai au1xpsc_ac97_dai = { 350struct snd_soc_dai au1xpsc_ac97_dai = {
346 .name = "au1xpsc_ac97", 351 .name = "au1xpsc_ac97",
347 .ac97_control = 1, 352 .ac97_control = 1,
@@ -361,10 +366,7 @@ struct snd_soc_dai au1xpsc_ac97_dai = {
361 .channels_min = 2, 366 .channels_min = 2,
362 .channels_max = 2, 367 .channels_max = 2,
363 }, 368 },
364 .ops = { 369 .ops = &au1xpsc_ac97_dai_ops,
365 .trigger = au1xpsc_ac97_trigger,
366 .hw_params = au1xpsc_ac97_hw_params,
367 },
368}; 370};
369EXPORT_SYMBOL_GPL(au1xpsc_ac97_dai); 371EXPORT_SYMBOL_GPL(au1xpsc_ac97_dai);
370 372
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index f916de4400ed..bb589327ee32 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -367,6 +367,12 @@ static int au1xpsc_i2s_resume(struct snd_soc_dai *cpu_dai)
367 return 0; 367 return 0;
368} 368}
369 369
370static struct snd_soc_dai_ops au1xpsc_i2s_dai_ops = {
371 .trigger = au1xpsc_i2s_trigger,
372 .hw_params = au1xpsc_i2s_hw_params,
373 .set_fmt = au1xpsc_i2s_set_fmt,
374};
375
370struct snd_soc_dai au1xpsc_i2s_dai = { 376struct snd_soc_dai au1xpsc_i2s_dai = {
371 .name = "au1xpsc_i2s", 377 .name = "au1xpsc_i2s",
372 .probe = au1xpsc_i2s_probe, 378 .probe = au1xpsc_i2s_probe,
@@ -385,11 +391,7 @@ struct snd_soc_dai au1xpsc_i2s_dai = {
385 .channels_min = 2, 391 .channels_min = 2,
386 .channels_max = 8, /* 2 without external help */ 392 .channels_max = 8, /* 2 without external help */
387 }, 393 },
388 .ops = { 394 .ops = &au1xpsc_i2s_dai_ops,
389 .trigger = au1xpsc_i2s_trigger,
390 .hw_params = au1xpsc_i2s_hw_params,
391 .set_fmt = au1xpsc_i2s_set_fmt,
392 },
393}; 395};
394EXPORT_SYMBOL(au1xpsc_i2s_dai); 396EXPORT_SYMBOL(au1xpsc_i2s_dai);
395 397