aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic3x.c
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/codecs/tlv320aic3x.c
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/codecs/tlv320aic3x.c')
-rw-r--r--sound/soc/codecs/tlv320aic3x.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index d638e3f0728b..ab099f482487 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1088,6 +1088,13 @@ EXPORT_SYMBOL_GPL(aic3x_button_pressed);
1088#define AIC3X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 1088#define AIC3X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
1089 SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE) 1089 SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE)
1090 1090
1091static struct snd_soc_dai_ops aic3x_dai_ops = {
1092 .hw_params = aic3x_hw_params,
1093 .digital_mute = aic3x_mute,
1094 .set_sysclk = aic3x_set_dai_sysclk,
1095 .set_fmt = aic3x_set_dai_fmt,
1096};
1097
1091struct snd_soc_dai aic3x_dai = { 1098struct snd_soc_dai aic3x_dai = {
1092 .name = "tlv320aic3x", 1099 .name = "tlv320aic3x",
1093 .playback = { 1100 .playback = {
@@ -1102,12 +1109,7 @@ struct snd_soc_dai aic3x_dai = {
1102 .channels_max = 2, 1109 .channels_max = 2,
1103 .rates = AIC3X_RATES, 1110 .rates = AIC3X_RATES,
1104 .formats = AIC3X_FORMATS,}, 1111 .formats = AIC3X_FORMATS,},
1105 .ops = { 1112 .ops = &aic3x_dai_ops,
1106 .hw_params = aic3x_hw_params,
1107 .digital_mute = aic3x_mute,
1108 .set_sysclk = aic3x_set_dai_sysclk,
1109 .set_fmt = aic3x_set_dai_fmt,
1110 }
1111}; 1113};
1112EXPORT_SYMBOL_GPL(aic3x_dai); 1114EXPORT_SYMBOL_GPL(aic3x_dai);
1113 1115