Commit 09e10d7f authored by Mark Brown's avatar Mark Brown

ASoC: Add WM8958 VSS support

With appropriate firmware the WM8958 can support Virtual Surround Sound or
VSS, widening the stereo audio image for improved user experience. Enable
support for this mode of operation when the appropriate firmware can be
loaded at runtime.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
parent f20d77ce
......@@ -32,6 +32,9 @@ struct wm8994_ldo_pdata {
#define WM8994_EQ_REGS 20
#define WM8958_MBC_CUTOFF_REGS 20
#define WM8958_MBC_COEFF_REGS 48
#define WM8958_MBC_COMBINED_REGS 56
#define WM8958_VSS_HPF_REGS 2
#define WM8958_VSS_REGS 148
/**
* DRC configurations are specified with a label and a set of register
......@@ -71,6 +74,31 @@ struct wm8958_mbc_cfg {
const char *name;
u16 cutoff_regs[WM8958_MBC_CUTOFF_REGS];
u16 coeff_regs[WM8958_MBC_COEFF_REGS];
/* Coefficient layout when using MBC+VSS firmware */
u16 combined_regs[WM8958_MBC_COMBINED_REGS];
};
/**
* VSS HPF configurations are specified with a label and two values to
* write. Configurations are expected to be generated using the
* multiband compressor configuration panel in WISCE - see
* http://www.wolfsonmicro.com/wisce/
*/
struct wm8958_vss_hpf_cfg {
const char *name;
u16 regs[WM8958_VSS_HPF_REGS];
};
/**
* VSS configurations are specified with a label and array of values
* to write. Configurations are expected to be generated using the
* multiband compressor configuration panel in WISCE - see
* http://www.wolfsonmicro.com/wisce/
*/
struct wm8958_vss_cfg {
const char *name;
u16 regs[WM8958_VSS_REGS];
};
struct wm8994_pdata {
......@@ -95,6 +123,12 @@ struct wm8994_pdata {
int num_mbc_cfgs;
struct wm8958_mbc_cfg *mbc_cfgs;
int num_vss_cfgs;
struct wm8958_vss_cfg *vss_cfgs;
int num_vss_hpf_cfgs;
struct wm8958_vss_hpf_cfg *vss_hpf_cfgs;
/* LINEOUT can be differential or single ended */
unsigned int lineout1_diff:1;
unsigned int lineout2_diff:1;
......
This diff is collapsed.
......@@ -3140,6 +3140,8 @@ static int wm8994_codec_remove(struct snd_soc_codec *codec)
}
if (wm8994->mbc)
release_firmware(wm8994->mbc);
if (wm8994->mbc_vss)
release_firmware(wm8994->mbc_vss);
kfree(wm8994->retune_mobile_texts);
kfree(wm8994->drc_texts);
kfree(wm8994);
......
......@@ -84,6 +84,9 @@ struct wm8994_priv {
int lrclk_shared[2];
int mbc_ena[3];
int hpf1_ena[3];
int hpf2_ena[3];
int vss_ena[3];
/* Platform dependant DRC configuration */
const char **drc_texts;
......@@ -101,6 +104,16 @@ struct wm8994_priv {
const char **mbc_texts;
struct soc_enum mbc_enum;
/* Platform dependant VSS configuration */
int vss_cfg;
const char **vss_texts;
struct soc_enum vss_enum;
/* Platform dependant VSS HPF configuration */
int vss_hpf_cfg;
const char **vss_hpf_texts;
struct soc_enum vss_hpf_enum;
struct wm8994_micdet micdet[2];
wm8958_micdet_cb jack_cb;
......@@ -119,6 +132,7 @@ struct wm8994_priv {
int dsp_active;
const struct firmware *cur_fw;
const struct firmware *mbc;
const struct firmware *mbc_vss;
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment