summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-02-24 19:14:09 -0800
committerStefan Agner <stefan.agner@toradex.com>2016-02-25 15:14:14 -0800
commita9e6324c87ee7357211714d95da44036bbca9789 (patch)
tree5aec891c3a7aa51eb0e2ac9bb081387ebc82aef1 /sound
parent6a809632388255a171f94bca1c463ec04ec057a8 (diff)
ASoC: fsl_sai_ac97: mark DAI always as active
The function snd_soc_register_card in soc-core.c selects the sleep pinctrl state if a DAI is not marked as active. Since an AC97 controller needs the link also for bus control, we should not use the sleep pinctrl state during normal operation. Work around this by increment the active field on probe. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/fsl_sai_ac97.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_sai_ac97.c b/sound/soc/fsl/fsl_sai_ac97.c
index 6ded58db4e15..3bd483256c62 100644
--- a/sound/soc/fsl/fsl_sai_ac97.c
+++ b/sound/soc/fsl/fsl_sai_ac97.c
@@ -495,13 +495,27 @@ static int fsl_sai_dai_probe(struct snd_soc_dai *cpu_dai)
snd_soc_dai_set_drvdata(cpu_dai, sai);
+ /*
+ * Mark DAI as active since we use it for AC97 control messages,
+ * otherwise snd_soc_register_card would request pinctrl state
+ * "sleep"...
+ */
+ cpu_dai->active++;
+
return 0;
}
+static int fsl_sai_dai_remove(struct snd_soc_dai *cpu_dai)
+{
+ cpu_dai->active--;
+
+ return 0;
+}
static struct snd_soc_dai_driver fsl_sai_ac97_dai = {
.name = "fsl-sai-ac97-pcm",
.bus_control = true,
.probe = fsl_sai_dai_probe,
+ .remove = fsl_sai_dai_remove,
.playback = {
.stream_name = "PCM Playback",
.channels_min = 2,