aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/blackfin
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/blackfin
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/blackfin')
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index d1d95d2393fe..964824419678 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -287,6 +287,13 @@ static int bf5xx_i2s_resume(struct platform_device *pdev,
287#define BF5XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |\ 287#define BF5XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE |\
288 SNDRV_PCM_FMTBIT_S32_LE) 288 SNDRV_PCM_FMTBIT_S32_LE)
289 289
290static struct snd_soc_dai_ops bf5xx_i2s_dai_ops = {
291 .startup = bf5xx_i2s_startup,
292 .shutdown = bf5xx_i2s_shutdown,
293 .hw_params = bf5xx_i2s_hw_params,
294 .set_fmt = bf5xx_i2s_set_dai_fmt,
295};
296
290struct snd_soc_dai bf5xx_i2s_dai = { 297struct snd_soc_dai bf5xx_i2s_dai = {
291 .name = "bf5xx-i2s", 298 .name = "bf5xx-i2s",
292 .id = 0, 299 .id = 0,
@@ -304,12 +311,7 @@ struct snd_soc_dai bf5xx_i2s_dai = {
304 .channels_max = 2, 311 .channels_max = 2,
305 .rates = BF5XX_I2S_RATES, 312 .rates = BF5XX_I2S_RATES,
306 .formats = BF5XX_I2S_FORMATS,}, 313 .formats = BF5XX_I2S_FORMATS,},
307 .ops = { 314 .ops = &bf5xx_i2s_dai_ops,
308 .startup = bf5xx_i2s_startup,
309 .shutdown = bf5xx_i2s_shutdown,
310 .hw_params = bf5xx_i2s_hw_params,
311 .set_fmt = bf5xx_i2s_set_dai_fmt,
312 },
313}; 315};
314EXPORT_SYMBOL_GPL(bf5xx_i2s_dai); 316EXPORT_SYMBOL_GPL(bf5xx_i2s_dai);
315 317