summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm_adsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm_adsp.c')
-rw-r--r--sound/soc/codecs/wm_adsp.c52
1 files changed, 6 insertions, 46 deletions
diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index f9f90b0f5db4..0bb415a28723 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -458,57 +458,17 @@ static const struct soc_enum wm_adsp_fw_enum[] = {
SOC_ENUM_SINGLE(0, 3, ARRAY_SIZE(wm_adsp_fw_text), wm_adsp_fw_text),
};
-const struct snd_kcontrol_new wm_adsp1_fw_controls[] = {
+const struct snd_kcontrol_new wm_adsp_fw_controls[] = {
SOC_ENUM_EXT("DSP1 Firmware", wm_adsp_fw_enum[0],
wm_adsp_fw_get, wm_adsp_fw_put),
SOC_ENUM_EXT("DSP2 Firmware", wm_adsp_fw_enum[1],
wm_adsp_fw_get, wm_adsp_fw_put),
SOC_ENUM_EXT("DSP3 Firmware", wm_adsp_fw_enum[2],
wm_adsp_fw_get, wm_adsp_fw_put),
+ SOC_ENUM_EXT("DSP4 Firmware", wm_adsp_fw_enum[3],
+ wm_adsp_fw_get, wm_adsp_fw_put),
};
-EXPORT_SYMBOL_GPL(wm_adsp1_fw_controls);
-
-static const struct soc_enum wm_adsp2_rate_enum[] = {
- SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP1_CONTROL_1,
- ARIZONA_DSP1_RATE_SHIFT, 0xf,
- ARIZONA_RATE_ENUM_SIZE,
- arizona_rate_text, arizona_rate_val),
- SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP2_CONTROL_1,
- ARIZONA_DSP1_RATE_SHIFT, 0xf,
- ARIZONA_RATE_ENUM_SIZE,
- arizona_rate_text, arizona_rate_val),
- SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP3_CONTROL_1,
- ARIZONA_DSP1_RATE_SHIFT, 0xf,
- ARIZONA_RATE_ENUM_SIZE,
- arizona_rate_text, arizona_rate_val),
- SOC_VALUE_ENUM_SINGLE(ARIZONA_DSP4_CONTROL_1,
- ARIZONA_DSP1_RATE_SHIFT, 0xf,
- ARIZONA_RATE_ENUM_SIZE,
- arizona_rate_text, arizona_rate_val),
-};
-
-static const struct snd_kcontrol_new wm_adsp2_fw_controls[4][2] = {
- {
- SOC_ENUM_EXT("DSP1 Firmware", wm_adsp_fw_enum[0],
- wm_adsp_fw_get, wm_adsp_fw_put),
- SOC_ENUM("DSP1 Rate", wm_adsp2_rate_enum[0]),
- },
- {
- SOC_ENUM_EXT("DSP2 Firmware", wm_adsp_fw_enum[1],
- wm_adsp_fw_get, wm_adsp_fw_put),
- SOC_ENUM("DSP2 Rate", wm_adsp2_rate_enum[1]),
- },
- {
- SOC_ENUM_EXT("DSP3 Firmware", wm_adsp_fw_enum[2],
- wm_adsp_fw_get, wm_adsp_fw_put),
- SOC_ENUM("DSP3 Rate", wm_adsp2_rate_enum[2]),
- },
- {
- SOC_ENUM_EXT("DSP4 Firmware", wm_adsp_fw_enum[3],
- wm_adsp_fw_get, wm_adsp_fw_put),
- SOC_ENUM("DSP4 Rate", wm_adsp2_rate_enum[3]),
- },
-};
+EXPORT_SYMBOL_GPL(wm_adsp_fw_controls);
static struct wm_adsp_region const *wm_adsp_find_region(struct wm_adsp *dsp,
int type)
@@ -2125,8 +2085,8 @@ int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec)
wm_adsp2_init_debugfs(dsp, codec);
return snd_soc_add_codec_controls(codec,
- wm_adsp2_fw_controls[dsp->num - 1],
- ARRAY_SIZE(wm_adsp2_fw_controls[0]));
+ &wm_adsp_fw_controls[dsp->num - 1],
+ 1);
}
EXPORT_SYMBOL_GPL(wm_adsp2_codec_probe);