ASoC: ak4104: Add stub DAPM support
authorMark Brown <broonie@linaro.org>
Wed, 7 Aug 2013 18:01:40 +0000 (19:01 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 12 Aug 2013 10:22:39 +0000 (11:22 +0100)
This makes it easer to integrate the device with other on-board components
and ensures correct operation following removal of support for non-DAPM
CODECs.

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

index c7cfdf957e4dac91c04ffad2f9e2d2dc1e2434aa..9a7c89b9cb35520c9e45cd06a34c5d40bfaee67d 100644 (file)
@@ -51,6 +51,14 @@ struct ak4104_private {
        struct regmap *regmap;
 };
 
+static const struct snd_soc_dapm_widget ak4104_dapm_widgets[] = {
+SND_SOC_DAPM_OUTPUT("TX"),
+};
+
+static const struct snd_soc_dapm_route ak4104_dapm_routes[] = {
+       { "TX", NULL, "Playback" },
+};
+
 static int ak4104_set_dai_fmt(struct snd_soc_dai *codec_dai,
                              unsigned int format)
 {
@@ -214,6 +222,11 @@ static int ak4104_remove(struct snd_soc_codec *codec)
 static struct snd_soc_codec_driver soc_codec_device_ak4104 = {
        .probe =        ak4104_probe,
        .remove =       ak4104_remove,
+
+       .dapm_widgets = ak4104_dapm_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(ak4104_dapm_widgets),
+       .dapm_routes = ak4104_dapm_routes,
+       .num_dapm_routes = ARRAY_SIZE(ak4104_dapm_routes),
 };
 
 static const struct regmap_config ak4104_regmap = {
This page took 0.026689 seconds and 5 git commands to generate.