summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/uda1380.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-11 19:51:31 +0300
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-11 19:51:31 +0300
commit65ec1cd1e2c6228752d2f167b01e6d291014d249 (patch)
tree8a54ef7d2a0d4770b49779114f9e1ac654363bdd /sound/soc/codecs/uda1380.c
parent5314adc3612d893c7cc526b3312d124805e45bc3 (diff)
parent6335d05548eece40092000aa91b64a50310d69d5 (diff)
downloadlinux-65ec1cd1e2c6228752d2f167b01e6d291014d249.tar.xz
ASoC: Merge dai_ops factor out
Merge Eric Maio's patch to merge snd_soc_dai_ops out of line. Fixed merge issues and updated drivers, plus an issue with the ops for the two s3c2443 AC97 DAIs having been merged. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/uda1380.c')
-rw-r--r--sound/soc/codecs/uda1380.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 1b10f488328c..5b21594e0e58 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -579,6 +579,27 @@ static int uda1380_set_bias_level(struct snd_soc_codec *codec,
SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |\
SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)
+static struct snd_soc_dai_ops uda1380_dai_ops = {
+ .hw_params = uda1380_pcm_hw_params,
+ .shutdown = uda1380_pcm_shutdown,
+ .trigger = uda1380_trigger,
+ .set_fmt = uda1380_set_dai_fmt_both,
+};
+
+static struct snd_soc_dai_ops uda1380_dai_ops_playback = {
+ .hw_params = uda1380_pcm_hw_params,
+ .shutdown = uda1380_pcm_shutdown,
+ .trigger = uda1380_trigger,
+ .set_fmt = uda1380_set_dai_fmt_playback,
+};
+
+static struct snd_soc_dai_ops uda1380_dai_ops_capture = {
+ .hw_params = uda1380_pcm_hw_params,
+ .shutdown = uda1380_pcm_shutdown,
+ .trigger = uda1380_trigger,
+ .set_fmt = uda1380_set_dai_fmt_capture,
+};
+
struct snd_soc_dai uda1380_dai[] = {
{
.name = "UDA1380",
@@ -594,12 +615,7 @@ struct snd_soc_dai uda1380_dai[] = {
.channels_max = 2,
.rates = UDA1380_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
- .ops = {
- .trigger = uda1380_trigger,
- .hw_params = uda1380_pcm_hw_params,
- .shutdown = uda1380_pcm_shutdown,
- .set_fmt = uda1380_set_dai_fmt_both,
- },
+ .ops = &uda1380_dai_ops,
},
{ /* playback only - dual interface */
.name = "UDA1380",
@@ -610,12 +626,7 @@ struct snd_soc_dai uda1380_dai[] = {
.rates = UDA1380_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,
},
- .ops = {
- .trigger = uda1380_trigger,
- .hw_params = uda1380_pcm_hw_params,
- .shutdown = uda1380_pcm_shutdown,
- .set_fmt = uda1380_set_dai_fmt_playback,
- },
+ .ops = &uda1380_dai_ops_playback,
},
{ /* capture only - dual interface*/
.name = "UDA1380",
@@ -626,12 +637,7 @@ struct snd_soc_dai uda1380_dai[] = {
.rates = UDA1380_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,
},
- .ops = {
- .trigger = uda1380_trigger,
- .hw_params = uda1380_pcm_hw_params,
- .shutdown = uda1380_pcm_shutdown,
- .set_fmt = uda1380_set_dai_fmt_capture,
- },
+ .ops = &uda1380_dai_ops_capture,
},
};
EXPORT_SYMBOL_GPL(uda1380_dai);