These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / sound / soc / codecs / wm_adsp.h
index a4f6b64..2d117cf 100644 (file)
@@ -18,8 +18,6 @@
 
 #include "wmfw.h"
 
-struct regulator;
-
 struct wm_adsp_region {
        int type;
        unsigned int base;
@@ -30,7 +28,6 @@ struct wm_adsp_alg_region {
        unsigned int alg;
        int type;
        unsigned int base;
-       size_t len;
 };
 
 struct wm_adsp {
@@ -49,37 +46,49 @@ struct wm_adsp {
        struct list_head alg_regions;
 
        int fw_id;
+       int fw_id_version;
 
        const struct wm_adsp_region *mem;
        int num_mems;
 
        int fw;
+       int fw_ver;
        bool running;
 
-       struct regulator *dvfs;
-
        struct list_head ctl_list;
 
        struct work_struct boot_work;
+
+#ifdef CONFIG_DEBUG_FS
+       struct dentry *debugfs_root;
+       struct mutex debugfs_lock;
+       char *wmfw_file_name;
+       char *bin_file_name;
+#endif
+
 };
 
 #define WM_ADSP1(wname, num) \
        SND_SOC_DAPM_PGA_E(wname, SND_SOC_NOPM, num, 0, NULL, 0, \
                wm_adsp1_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD)
 
-#define WM_ADSP2(wname, num) \
+#define WM_ADSP2_E(wname, num, event_fn) \
 {      .id = snd_soc_dapm_dai_link, .name = wname " Preloader", \
-       .reg = SND_SOC_NOPM, .shift = num, .event = wm_adsp2_early_event, \
-       .event_flags = SND_SOC_DAPM_PRE_PMU }, \
+       .reg = SND_SOC_NOPM, .shift = num, .event = event_fn, \
+       .event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD }, \
 {      .id = snd_soc_dapm_out_drv, .name = wname, \
        .reg = SND_SOC_NOPM, .shift = num, .event = wm_adsp2_event, \
        .event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD }
 
-extern const struct snd_kcontrol_new wm_adsp1_fw_controls[];
-extern const struct snd_kcontrol_new wm_adsp2_fw_controls[];
+#define WM_ADSP2(wname, num) \
+       WM_ADSP2_E(wname, num, wm_adsp2_early_event)
+
+extern const struct snd_kcontrol_new wm_adsp_fw_controls[];
 
-int wm_adsp1_init(struct wm_adsp *adsp);
-int wm_adsp2_init(struct wm_adsp *adsp, bool dvfs);
+int wm_adsp1_init(struct wm_adsp *dsp);
+int wm_adsp2_init(struct wm_adsp *dsp);
+int wm_adsp2_codec_probe(struct wm_adsp *dsp, struct snd_soc_codec *codec);
+int wm_adsp2_codec_remove(struct wm_adsp *dsp, struct snd_soc_codec *codec);
 int wm_adsp1_event(struct snd_soc_dapm_widget *w,
                   struct snd_kcontrol *kcontrol, int event);
 int wm_adsp2_early_event(struct snd_soc_dapm_widget *w,