ASoC: JZ4740: Convert qi_lb60 codec to table based DAPM setup
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 12 Apr 2011 17:31:03 +0000 (19:31 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 13 Apr 2011 17:34:36 +0000 (10:34 -0700)
Use the newly introduced dapm_widgets, dpam_routes and fields of the
snd_soc_card struct to setup DAPM.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/jz4740/qi_lb60.c

index 49723e3e7e386ace2de3d0d3427276e1d7e5e8fd..875abc94a00b5cd9803ff7ca3f06712304df2236 100644 (file)
@@ -70,12 +70,6 @@ static int qi_lb60_codec_init(struct snd_soc_pcm_runtime *rtd)
                return ret;
        }
 
-       snd_soc_dapm_new_controls(dapm, qi_lb60_widgets,
-                                 ARRAY_SIZE(qi_lb60_widgets));
-       snd_soc_dapm_add_routes(dapm, qi_lb60_routes,
-                               ARRAY_SIZE(qi_lb60_routes));
-       snd_soc_dapm_sync(dapm);
-
        return 0;
 }
 
@@ -93,6 +87,11 @@ static struct snd_soc_card qi_lb60 = {
        .name = "QI LB60",
        .dai_link = &qi_lb60_dai,
        .num_links = 1,
+
+       .dapm_widgets = qi_lb60_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(qi_lb60_widgets),
+       .dapm_routes = qi_lb60_routes,
+       .num_dapm_routes = ARRAY_SIZE(qi_lb60_routes),
 };
 
 static struct platform_device *qi_lb60_snd_device;