aboutsummaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/twl4030.c12
-rw-r--r--sound/soc/pxa/pxa2xx-ac97.c16
-rw-r--r--sound/soc/s3c24xx/s3c64xx-i2s.c8
-rw-r--r--sound/soc/sh/hac.c12
-rw-r--r--sound/soc/soc-core.c3
5 files changed, 32 insertions, 19 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 86bb15cc82c..97738e2ece0 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -1383,6 +1383,12 @@ static int twl4030_set_dai_fmt(struct snd_soc_dai *codec_dai,
#define TWL4030_RATES (SNDRV_PCM_RATE_8000_48000)
#define TWL4030_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FORMAT_S24_LE)
+static struct snd_soc_dai_ops twl4030_dai_ops = {
+ .hw_params = twl4030_hw_params,
+ .set_sysclk = twl4030_set_dai_sysclk,
+ .set_fmt = twl4030_set_dai_fmt,
+};
+
struct snd_soc_dai twl4030_dai = {
.name = "twl4030",
.playback = {
@@ -1397,11 +1403,7 @@ struct snd_soc_dai twl4030_dai = {
.channels_max = 2,
.rates = TWL4030_RATES,
.formats = TWL4030_FORMATS,},
- .ops = {
- .hw_params = twl4030_hw_params,
- .set_sysclk = twl4030_set_dai_sysclk,
- .set_fmt = twl4030_set_dai_fmt,
- }
+ .ops = &twl4030_dai_ops,
};
EXPORT_SYMBOL_GPL(twl4030_dai);
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.c
index cf809049272..01c21c6cdbb 100644
--- a/sound/soc/pxa/pxa2xx-ac97.c
+++ b/sound/soc/pxa/pxa2xx-ac97.c
@@ -164,10 +164,18 @@ static int pxa2xx_ac97_hw_mic_params(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 pxa_ac97_dai_ops = {
+static struct snd_soc_dai_ops pxa_ac97_hifi_dai_ops = {
.hw_params = pxa2xx_ac97_hw_params,
};
+static struct snd_soc_dai_ops pxa_ac97_aux_dai_ops = {
+ .hw_params = pxa2xx_ac97_hw_aux_params,
+};
+
+static struct snd_soc_dai_ops pxa_ac97_mic_dai_ops = {
+ .hw_params = pxa2xx_ac97_hw_mic_params,
+};
+
/*
* There is only 1 physical AC97 interface for pxa2xx, but it
* has extra fifo's that can be used for aux DACs and ADCs.
@@ -193,7 +201,7 @@ struct snd_soc_dai pxa_ac97_dai[] = {
.channels_max = 2,
.rates = PXA2XX_AC97_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
- .ops = &pxa_ac97_dai_ops,
+ .ops = &pxa_ac97_hifi_dai_ops,
},
{
.name = "pxa2xx-ac97-aux",
@@ -211,7 +219,7 @@ struct snd_soc_dai pxa_ac97_dai[] = {
.channels_max = 1,
.rates = PXA2XX_AC97_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
- .ops = &pxa_ac97_dai_ops,
+ .ops = &pxa_ac97_aux_dai_ops,
},
{
.name = "pxa2xx-ac97-mic",
@@ -223,7 +231,7 @@ struct snd_soc_dai pxa_ac97_dai[] = {
.channels_max = 1,
.rates = PXA2XX_AC97_RATES,
.formats = SNDRV_PCM_FMTBIT_S16_LE,},
- .ops = &pxa_ac97_dai_ops,
+ .ops = &pxa_ac97_mic_dai_ops,
},
};
diff --git a/sound/soc/s3c24xx/s3c64xx-i2s.c b/sound/soc/s3c24xx/s3c64xx-i2s.c
index 6e1e85dc1ff..33c5de7e255 100644
--- a/sound/soc/s3c24xx/s3c64xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c64xx-i2s.c
@@ -177,6 +177,10 @@ static int s3c64xx_i2s_probe(struct platform_device *pdev,
#define S3C64XX_I2S_FMTS \
(SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE)
+static struct snd_soc_dai_ops s3c64xx_i2s_dai_ops = {
+ .set_sysclk = s3c64xx_i2s_set_sysclk,
+};
+
struct snd_soc_dai s3c64xx_i2s_dai = {
.name = "s3c64xx-i2s",
.id = 0,
@@ -193,9 +197,7 @@ struct snd_soc_dai s3c64xx_i2s_dai = {
.rates = S3C64XX_I2S_RATES,
.formats = S3C64XX_I2S_FMTS,
},
- .ops = {
- .set_sysclk = s3c64xx_i2s_set_sysclk,
- },
+ .ops = &s3c64xx_i2s_dai_ops,
};
EXPORT_SYMBOL_GPL(s3c64xx_i2s_dai);
diff --git a/sound/soc/sh/hac.c b/sound/soc/sh/hac.c
index eab31838bad..41db75af3c6 100644
--- a/sound/soc/sh/hac.c
+++ b/sound/soc/sh/hac.c
@@ -267,6 +267,10 @@ static int hac_hw_params(struct snd_pcm_substream *substream,
#define AC97_FMTS \
SNDRV_PCM_FMTBIT_S16_LE
+static struct snd_soc_dai_ops hac_dai_ops = {
+ .hw_params = hac_hw_params,
+};
+
struct snd_soc_dai sh4_hac_dai[] = {
{
.name = "HAC0",
@@ -284,9 +288,7 @@ struct snd_soc_dai sh4_hac_dai[] = {
.channels_min = 2,
.channels_max = 2,
},
- .ops = {
- .hw_params = hac_hw_params,
- },
+ .ops = &hac_dai_ops,
},
#ifdef CONFIG_CPU_SUBTYPE_SH7760
{
@@ -305,9 +307,7 @@ struct snd_soc_dai sh4_hac_dai[] = {
.channels_min = 2,
.channels_max = 2,
},
- .ops = {
- .hw_params = hac_hw_params,
- },
+ .ops = &hac_dai_ops,
},
#endif
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 16518329f6b..6e710f705a7 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1432,7 +1432,8 @@ void snd_soc_free_pcms(struct snd_soc_device *socdev)
#ifdef CONFIG_SND_SOC_AC97_BUS
for (i = 0; i < codec->num_dai; i++) {
codec_dai = &codec->dai[i];
- if (codec_dai->ac97_control && codec->ac97) {
+ if (codec_dai->ac97_control && codec->ac97 &&
+ strcmp(codec->name, "AC97") != 0) {
soc_ac97_dev_unregister(codec);
goto free_card;
}