diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-11-28 11:28:06 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-28 13:57:37 -0500 |
commit | b90d4183f70e8a922db781b7ecfc823d37a3202a (patch) | |
tree | 8d8e78d0d37d85fe032a8dfc4453e9662f2cba10 /sound/soc | |
parent | ba0a7e024d2a0ccdb887cda149f3e11f1ce27101 (diff) |
ASoC: ad193x: Use table based DAPM and controls setup
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/ad193x.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c index 1901cd222233..1dfda5ca2789 100644 --- a/sound/soc/codecs/ad193x.c +++ b/sound/soc/codecs/ad193x.c | |||
@@ -345,7 +345,6 @@ static struct snd_soc_dai_driver ad193x_dai = { | |||
345 | static int ad193x_probe(struct snd_soc_codec *codec) | 345 | static int ad193x_probe(struct snd_soc_codec *codec) |
346 | { | 346 | { |
347 | struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec); | 347 | struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec); |
348 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
349 | int ret; | 348 | int ret; |
350 | 349 | ||
351 | codec->control_data = ad193x->regmap; | 350 | codec->control_data = ad193x->regmap; |
@@ -371,17 +370,17 @@ static int ad193x_probe(struct snd_soc_codec *codec) | |||
371 | snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, 0x99); /* mclk=24.576Mhz: 0x9D; mclk=12.288Mhz: 0x99 */ | 370 | snd_soc_write(codec, AD193X_PLL_CLK_CTRL0, 0x99); /* mclk=24.576Mhz: 0x9D; mclk=12.288Mhz: 0x99 */ |
372 | snd_soc_write(codec, AD193X_PLL_CLK_CTRL1, 0x04); | 371 | snd_soc_write(codec, AD193X_PLL_CLK_CTRL1, 0x04); |
373 | 372 | ||
374 | snd_soc_add_controls(codec, ad193x_snd_controls, | ||
375 | ARRAY_SIZE(ad193x_snd_controls)); | ||
376 | snd_soc_dapm_new_controls(dapm, ad193x_dapm_widgets, | ||
377 | ARRAY_SIZE(ad193x_dapm_widgets)); | ||
378 | snd_soc_dapm_add_routes(dapm, audio_paths, ARRAY_SIZE(audio_paths)); | ||
379 | |||
380 | return ret; | 373 | return ret; |
381 | } | 374 | } |
382 | 375 | ||
383 | static struct snd_soc_codec_driver soc_codec_dev_ad193x = { | 376 | static struct snd_soc_codec_driver soc_codec_dev_ad193x = { |
384 | .probe = ad193x_probe, | 377 | .probe = ad193x_probe, |
378 | .controls = ad193x_snd_controls, | ||
379 | .num_controls = ARRAY_SIZE(ad193x_snd_controls), | ||
380 | .dapm_widgets = ad193x_dapm_widgets, | ||
381 | .num_dapm_widgets = ARRAY_SIZE(ad193x_dapm_widgets), | ||
382 | .dapm_routes = audio_paths, | ||
383 | .num_dapm_routes = ARRAY_SIZE(audio_paths), | ||
385 | }; | 384 | }; |
386 | 385 | ||
387 | #if defined(CONFIG_SPI_MASTER) | 386 | #if defined(CONFIG_SPI_MASTER) |