From 336d0442b9f03a0389baaf09e39880fdd1873cc3 Mon Sep 17 00:00:00 2001 From: Richard Fitzgerald Date: Thu, 18 Jun 2015 13:43:19 +0100 Subject: ASoC: wm_adsp: Move DSP Rate controls into the codec The rate controls are codec-specific, it's not possible to generically say what the range or the meaning of each control is (or even if they exist at all) - that depends on the particular codec. This is currently being handled for Arizona codecs by putting an Arizona-specific table of controls inside the wm_adsp driver. This creates a dependency between wm_adsp and arizona.c, and is an awkward solution if the ADSP is used in another family of codecs Fix this by moving the Arizona-specific rate controls into the Arizona codec drivers. Signed-off-by: Richard Fitzgerald Signed-off-by: Mark Brown --- sound/soc/codecs/wm5102.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sound/soc/codecs/wm5102.c') diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c index 2f9c88f9fc8f..559cbe2c8dc1 100644 --- a/sound/soc/codecs/wm5102.c +++ b/sound/soc/codecs/wm5102.c @@ -1880,6 +1880,11 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec) if (ret) return ret; + ret = snd_soc_add_codec_controls(codec, + arizona_adsp2_rate_controls, 1); + if (ret) + return ret; + arizona_init_spk(codec); arizona_init_gpio(codec); -- cgit v1.2.1