ASoC: ac97: Provide stub DAPM integration
authorMark Brown <broonie@linaro.org>
Mon, 19 Aug 2013 11:18:07 +0000 (12:18 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 19 Aug 2013 11:18:40 +0000 (12:18 +0100)
Ensure continued operation with DAPM being mandatory.

Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/ac97.c

index ec7351803c245b7ba209a582e0d82fc958effb24..8d9ba4ba4bfe0b2fece2dc5c30f955fd5d6dcc00 100644 (file)
 #include <sound/initval.h>
 #include <sound/soc.h>
 
+static const struct snd_soc_dapm_widget ac97_widgets[] = {
+       SND_SOC_DAPM_INPUT("RX"),
+       SND_SOC_DAPM_OUTPUT("TX"),
+};
+
+static const struct snd_soc_dapm_route ac97_routes[] = {
+       { "AC97 Capture", NULL, "RX" },
+       { "TX", NULL, "AC97 Playback" },
+};
+
 static int ac97_prepare(struct snd_pcm_substream *substream,
                        struct snd_soc_dai *dai)
 {
@@ -117,6 +127,11 @@ static struct snd_soc_codec_driver soc_codec_dev_ac97 = {
        .probe =        ac97_soc_probe,
        .suspend =      ac97_soc_suspend,
        .resume =       ac97_soc_resume,
+
+       .dapm_widgets = ac97_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(ac97_widgets),
+       .dapm_routes = ac97_routes,
+       .num_dapm_routes = ARRAY_SIZE(ac97_routes),
 };
 
 static int ac97_probe(struct platform_device *pdev)