2 * wm_adsp.h -- Wolfson ADSP support
4 * Copyright 2012 Wolfson Microelectronics plc
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
16 #include <sound/soc.h>
17 #include <sound/soc-dapm.h>
21 struct wm_adsp_region {
31 struct regmap *regmap;
35 const struct wm_adsp_region *mem;
39 #define WM_ADSP1(wname, num) \
40 { .id = snd_soc_dapm_pga, .name = wname, .reg = SND_SOC_NOPM, \
41 .shift = num, .event = wm_adsp1_event, \
42 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD }
44 #define WM_ADSP2(wname, num) \
45 { .id = snd_soc_dapm_pga, .name = wname, .reg = SND_SOC_NOPM, \
46 .shift = num, .event = wm_adsp2_event, \
47 .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD }
49 int wm_adsp1_event(struct snd_soc_dapm_widget *w,
50 struct snd_kcontrol *kcontrol, int event);
51 int wm_adsp2_event(struct snd_soc_dapm_widget *w,
52 struct snd_kcontrol *kcontrol, int event);