Commit 139f4b83 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/topic/wm8961', 'asoc/topic/wm8962',...

Merge remote-tracking branches 'asoc/topic/wm8961', 'asoc/topic/wm8962', 'asoc/topic/wm8974', 'asoc/topic/wm8983', 'asoc/topic/wm8988', 'asoc/topic/wm8990', 'asoc/topic/wm8991', 'asoc/topic/wm8993' and 'asoc/topic/wm8994' into asoc-next
...@@ -317,15 +317,15 @@ static const char *adc_hpf_text[] = { ...@@ -317,15 +317,15 @@ static const char *adc_hpf_text[] = {
"Hi-fi", "Voice 1", "Voice 2", "Voice 3", "Hi-fi", "Voice 1", "Voice 2", "Voice 3",
}; };
static const struct soc_enum adc_hpf = static SOC_ENUM_SINGLE_DECL(adc_hpf,
SOC_ENUM_SINGLE(WM8961_ADC_DAC_CONTROL_2, 7, 4, adc_hpf_text); WM8961_ADC_DAC_CONTROL_2, 7, adc_hpf_text);
static const char *dac_deemph_text[] = { static const char *dac_deemph_text[] = {
"None", "32kHz", "44.1kHz", "48kHz", "None", "32kHz", "44.1kHz", "48kHz",
}; };
static const struct soc_enum dac_deemph = static SOC_ENUM_SINGLE_DECL(dac_deemph,
SOC_ENUM_SINGLE(WM8961_ADC_DAC_CONTROL_1, 1, 4, dac_deemph_text); WM8961_ADC_DAC_CONTROL_1, 1, dac_deemph_text);
static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1); static const DECLARE_TLV_DB_SCALE(out_tlv, -12100, 100, 1);
static const DECLARE_TLV_DB_SCALE(hp_sec_tlv, -700, 100, 0); static const DECLARE_TLV_DB_SCALE(hp_sec_tlv, -700, 100, 0);
...@@ -385,11 +385,11 @@ static const char *sidetone_text[] = { ...@@ -385,11 +385,11 @@ static const char *sidetone_text[] = {
"None", "Left", "Right" "None", "Left", "Right"
}; };
static const struct soc_enum dacl_sidetone = static SOC_ENUM_SINGLE_DECL(dacl_sidetone,
SOC_ENUM_SINGLE(WM8961_DSP_SIDETONE_0, 2, 3, sidetone_text); WM8961_DSP_SIDETONE_0, 2, sidetone_text);
static const struct soc_enum dacr_sidetone = static SOC_ENUM_SINGLE_DECL(dacr_sidetone,
SOC_ENUM_SINGLE(WM8961_DSP_SIDETONE_1, 2, 3, sidetone_text); WM8961_DSP_SIDETONE_1, 2, sidetone_text);
static const struct snd_kcontrol_new dacl_mux = static const struct snd_kcontrol_new dacl_mux =
SOC_DAPM_ENUM("DACL Sidetone", dacl_sidetone); SOC_DAPM_ENUM("DACL Sidetone", dacl_sidetone);
......
...@@ -1479,7 +1479,9 @@ static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0); ...@@ -1479,7 +1479,9 @@ static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
static int wm8962_dsp2_write_config(struct snd_soc_codec *codec) static int wm8962_dsp2_write_config(struct snd_soc_codec *codec)
{ {
return regcache_sync_region(codec->control_data, struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
return regcache_sync_region(wm8962->regmap,
WM8962_HDBASS_AI_1, WM8962_MAX_REGISTER); WM8962_HDBASS_AI_1, WM8962_MAX_REGISTER);
} }
...@@ -1658,16 +1660,16 @@ static const char *cap_hpf_mode_text[] = { ...@@ -1658,16 +1660,16 @@ static const char *cap_hpf_mode_text[] = {
"Hi-fi", "Application" "Hi-fi", "Application"
}; };
static const struct soc_enum cap_hpf_mode = static SOC_ENUM_SINGLE_DECL(cap_hpf_mode,
SOC_ENUM_SINGLE(WM8962_ADC_DAC_CONTROL_2, 10, 2, cap_hpf_mode_text); WM8962_ADC_DAC_CONTROL_2, 10, cap_hpf_mode_text);
static const char *cap_lhpf_mode_text[] = { static const char *cap_lhpf_mode_text[] = {
"LPF", "HPF" "LPF", "HPF"
}; };
static const struct soc_enum cap_lhpf_mode = static SOC_ENUM_SINGLE_DECL(cap_lhpf_mode,
SOC_ENUM_SINGLE(WM8962_LHPF1, 1, 2, cap_lhpf_mode_text); WM8962_LHPF1, 1, cap_lhpf_mode_text);
static const struct snd_kcontrol_new wm8962_snd_controls[] = { static const struct snd_kcontrol_new wm8962_snd_controls[] = {
SOC_DOUBLE("Input Mixer Switch", WM8962_INPUT_MIXER_CONTROL_1, 3, 2, 1, 1), SOC_DOUBLE("Input Mixer Switch", WM8962_INPUT_MIXER_CONTROL_1, 3, 2, 1, 1),
...@@ -2014,40 +2016,40 @@ static int dsp2_event(struct snd_soc_dapm_widget *w, ...@@ -2014,40 +2016,40 @@ static int dsp2_event(struct snd_soc_dapm_widget *w,
static const char *st_text[] = { "None", "Left", "Right" }; static const char *st_text[] = { "None", "Left", "Right" };
static const struct soc_enum str_enum = static SOC_ENUM_SINGLE_DECL(str_enum,
SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_1, 2, 3, st_text); WM8962_DAC_DSP_MIXING_1, 2, st_text);
static const struct snd_kcontrol_new str_mux = static const struct snd_kcontrol_new str_mux =
SOC_DAPM_ENUM("Right Sidetone", str_enum); SOC_DAPM_ENUM("Right Sidetone", str_enum);
static const struct soc_enum stl_enum = static SOC_ENUM_SINGLE_DECL(stl_enum,
SOC_ENUM_SINGLE(WM8962_DAC_DSP_MIXING_2, 2, 3, st_text); WM8962_DAC_DSP_MIXING_2, 2, st_text);
static const struct snd_kcontrol_new stl_mux = static const struct snd_kcontrol_new stl_mux =
SOC_DAPM_ENUM("Left Sidetone", stl_enum); SOC_DAPM_ENUM("Left Sidetone", stl_enum);
static const char *outmux_text[] = { "DAC", "Mixer" }; static const char *outmux_text[] = { "DAC", "Mixer" };
static const struct soc_enum spkoutr_enum = static SOC_ENUM_SINGLE_DECL(spkoutr_enum,
SOC_ENUM_SINGLE(WM8962_SPEAKER_MIXER_2, 7, 2, outmux_text); WM8962_SPEAKER_MIXER_2, 7, outmux_text);
static const struct snd_kcontrol_new spkoutr_mux = static const struct snd_kcontrol_new spkoutr_mux =
SOC_DAPM_ENUM("SPKOUTR Mux", spkoutr_enum); SOC_DAPM_ENUM("SPKOUTR Mux", spkoutr_enum);
static const struct soc_enum spkoutl_enum = static SOC_ENUM_SINGLE_DECL(spkoutl_enum,
SOC_ENUM_SINGLE(WM8962_SPEAKER_MIXER_1, 7, 2, outmux_text); WM8962_SPEAKER_MIXER_1, 7, outmux_text);
static const struct snd_kcontrol_new spkoutl_mux = static const struct snd_kcontrol_new spkoutl_mux =
SOC_DAPM_ENUM("SPKOUTL Mux", spkoutl_enum); SOC_DAPM_ENUM("SPKOUTL Mux", spkoutl_enum);
static const struct soc_enum hpoutr_enum = static SOC_ENUM_SINGLE_DECL(hpoutr_enum,
SOC_ENUM_SINGLE(WM8962_HEADPHONE_MIXER_2, 7, 2, outmux_text); WM8962_HEADPHONE_MIXER_2, 7, outmux_text);
static const struct snd_kcontrol_new hpoutr_mux = static const struct snd_kcontrol_new hpoutr_mux =
SOC_DAPM_ENUM("HPOUTR Mux", hpoutr_enum); SOC_DAPM_ENUM("HPOUTR Mux", hpoutr_enum);
static const struct soc_enum hpoutl_enum = static SOC_ENUM_SINGLE_DECL(hpoutl_enum,
SOC_ENUM_SINGLE(WM8962_HEADPHONE_MIXER_1, 7, 2, outmux_text); WM8962_HEADPHONE_MIXER_1, 7, outmux_text);
static const struct snd_kcontrol_new hpoutl_mux = static const struct snd_kcontrol_new hpoutl_mux =
SOC_DAPM_ENUM("HPOUTL Mux", hpoutl_enum); SOC_DAPM_ENUM("HPOUTL Mux", hpoutl_enum);
...@@ -2884,9 +2886,13 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source, ...@@ -2884,9 +2886,13 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
snd_soc_write(codec, WM8962_FLL_CONTROL_7, fll_div.lambda); snd_soc_write(codec, WM8962_FLL_CONTROL_7, fll_div.lambda);
snd_soc_write(codec, WM8962_FLL_CONTROL_8, fll_div.n); snd_soc_write(codec, WM8962_FLL_CONTROL_8, fll_div.n);
try_wait_for_completion(&wm8962->fll_lock); reinit_completion(&wm8962->fll_lock);
pm_runtime_get_sync(codec->dev); ret = pm_runtime_get_sync(codec->dev);
if (ret < 0) {
dev_err(codec->dev, "Failed to resume device: %d\n", ret);
return ret;
}
snd_soc_update_bits(codec, WM8962_FLL_CONTROL_1, snd_soc_update_bits(codec, WM8962_FLL_CONTROL_1,
WM8962_FLL_FRAC | WM8962_FLL_REFCLK_SRC_MASK | WM8962_FLL_FRAC | WM8962_FLL_REFCLK_SRC_MASK |
...@@ -2894,8 +2900,6 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source, ...@@ -2894,8 +2900,6 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
dev_dbg(codec->dev, "FLL configured for %dHz->%dHz\n", Fref, Fout); dev_dbg(codec->dev, "FLL configured for %dHz->%dHz\n", Fref, Fout);
ret = 0;
/* This should be a massive overestimate but go even /* This should be a massive overestimate but go even
* higher if we'll error out * higher if we'll error out
*/ */
...@@ -2909,14 +2913,17 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source, ...@@ -2909,14 +2913,17 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
if (timeout == 0 && wm8962->irq) { if (timeout == 0 && wm8962->irq) {
dev_err(codec->dev, "FLL lock timed out"); dev_err(codec->dev, "FLL lock timed out");
ret = -ETIMEDOUT; snd_soc_update_bits(codec, WM8962_FLL_CONTROL_1,
WM8962_FLL_ENA, 0);
pm_runtime_put(codec->dev);
return -ETIMEDOUT;
} }
wm8962->fll_fref = Fref; wm8962->fll_fref = Fref;
wm8962->fll_fout = Fout; wm8962->fll_fout = Fout;
wm8962->fll_src = source; wm8962->fll_src = source;
return ret; return 0;
} }
static int wm8962_mute(struct snd_soc_dai *dai, int mute) static int wm8962_mute(struct snd_soc_dai *dai, int mute)
...@@ -3003,9 +3010,16 @@ static irqreturn_t wm8962_irq(int irq, void *data) ...@@ -3003,9 +3010,16 @@ static irqreturn_t wm8962_irq(int irq, void *data)
unsigned int active; unsigned int active;
int reg, ret; int reg, ret;
ret = pm_runtime_get_sync(dev);
if (ret < 0) {
dev_err(dev, "Failed to resume: %d\n", ret);
return IRQ_NONE;
}
ret = regmap_read(wm8962->regmap, WM8962_INTERRUPT_STATUS_2_MASK, ret = regmap_read(wm8962->regmap, WM8962_INTERRUPT_STATUS_2_MASK,
&mask); &mask);
if (ret != 0) { if (ret != 0) {
pm_runtime_put(dev);
dev_err(dev, "Failed to read interrupt mask: %d\n", dev_err(dev, "Failed to read interrupt mask: %d\n",
ret); ret);
return IRQ_NONE; return IRQ_NONE;
...@@ -3013,14 +3027,17 @@ static irqreturn_t wm8962_irq(int irq, void *data) ...@@ -3013,14 +3027,17 @@ static irqreturn_t wm8962_irq(int irq, void *data)
ret = regmap_read(wm8962->regmap, WM8962_INTERRUPT_STATUS_2, &active); ret = regmap_read(wm8962->regmap, WM8962_INTERRUPT_STATUS_2, &active);
if (ret != 0) { if (ret != 0) {
pm_runtime_put(dev);
dev_err(dev, "Failed to read interrupt: %d\n", ret); dev_err(dev, "Failed to read interrupt: %d\n", ret);
return IRQ_NONE; return IRQ_NONE;
} }
active &= ~mask; active &= ~mask;
if (!active) if (!active) {
pm_runtime_put(dev);
return IRQ_NONE; return IRQ_NONE;
}
/* Acknowledge the interrupts */ /* Acknowledge the interrupts */
ret = regmap_write(wm8962->regmap, WM8962_INTERRUPT_STATUS_2, active); ret = regmap_write(wm8962->regmap, WM8962_INTERRUPT_STATUS_2, active);
...@@ -3070,6 +3087,8 @@ static irqreturn_t wm8962_irq(int irq, void *data) ...@@ -3070,6 +3087,8 @@ static irqreturn_t wm8962_irq(int irq, void *data)
msecs_to_jiffies(250)); msecs_to_jiffies(250));
} }
pm_runtime_put(dev);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
......
...@@ -84,8 +84,8 @@ static const struct soc_enum wm8974_enum[] = { ...@@ -84,8 +84,8 @@ static const struct soc_enum wm8974_enum[] = {
static const char *wm8974_auxmode_text[] = { "Buffer", "Mixer" }; static const char *wm8974_auxmode_text[] = { "Buffer", "Mixer" };
static const struct soc_enum wm8974_auxmode = static SOC_ENUM_SINGLE_DECL(wm8974_auxmode,
SOC_ENUM_SINGLE(WM8974_INPUT, 3, 2, wm8974_auxmode_text); WM8974_INPUT, 3, wm8974_auxmode_text);
static const DECLARE_TLV_DB_SCALE(digital_tlv, -12750, 50, 1); static const DECLARE_TLV_DB_SCALE(digital_tlv, -12750, 50, 1);
static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0); static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
......
...@@ -1124,7 +1124,7 @@ static struct spi_driver wm8983_spi_driver = { ...@@ -1124,7 +1124,7 @@ static struct spi_driver wm8983_spi_driver = {
}; };
#endif #endif
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) #if IS_ENABLED(CONFIG_I2C)
static int wm8983_i2c_probe(struct i2c_client *i2c, static int wm8983_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
...@@ -1177,7 +1177,7 @@ static int __init wm8983_modinit(void) ...@@ -1177,7 +1177,7 @@ static int __init wm8983_modinit(void)
{ {
int ret = 0; int ret = 0;
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) #if IS_ENABLED(CONFIG_I2C)
ret = i2c_add_driver(&wm8983_i2c_driver); ret = i2c_add_driver(&wm8983_i2c_driver);
if (ret) { if (ret) {
printk(KERN_ERR "Failed to register wm8983 I2C driver: %d\n", printk(KERN_ERR "Failed to register wm8983 I2C driver: %d\n",
...@@ -1197,7 +1197,7 @@ module_init(wm8983_modinit); ...@@ -1197,7 +1197,7 @@ module_init(wm8983_modinit);
static void __exit wm8983_exit(void) static void __exit wm8983_exit(void)
{ {
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) #if IS_ENABLED(CONFIG_I2C)
i2c_del_driver(&wm8983_i2c_driver); i2c_del_driver(&wm8983_i2c_driver);
#endif #endif
#if defined(CONFIG_SPI_MASTER) #if defined(CONFIG_SPI_MASTER)
......
...@@ -116,7 +116,7 @@ static bool wm8988_writeable(struct device *dev, unsigned int reg) ...@@ -116,7 +116,7 @@ static bool wm8988_writeable(struct device *dev, unsigned int reg)
struct wm8988_priv { struct wm8988_priv {
struct regmap *regmap; struct regmap *regmap;
unsigned int sysclk; unsigned int sysclk;
struct snd_pcm_hw_constraint_list *sysclk_constraints; const struct snd_pcm_hw_constraint_list *sysclk_constraints;
}; };
#define wm8988_reset(c) snd_soc_write(c, WM8988_RESET, 0) #define wm8988_reset(c) snd_soc_write(c, WM8988_RESET, 0)
...@@ -126,46 +126,46 @@ struct wm8988_priv { ...@@ -126,46 +126,46 @@ struct wm8988_priv {
*/ */
static const char *bass_boost_txt[] = {"Linear Control", "Adaptive Boost"}; static const char *bass_boost_txt[] = {"Linear Control", "Adaptive Boost"};
static const struct soc_enum bass_boost = static SOC_ENUM_SINGLE_DECL(bass_boost,
SOC_ENUM_SINGLE(WM8988_BASS, 7, 2, bass_boost_txt); WM8988_BASS, 7, bass_boost_txt);
static const char *bass_filter_txt[] = { "130Hz @ 48kHz", "200Hz @ 48kHz" }; static const char *bass_filter_txt[] = { "130Hz @ 48kHz", "200Hz @ 48kHz" };
static const struct soc_enum bass_filter = static SOC_ENUM_SINGLE_DECL(bass_filter,
SOC_ENUM_SINGLE(WM8988_BASS, 6, 2, bass_filter_txt); WM8988_BASS, 6, bass_filter_txt);
static const char *treble_txt[] = {"8kHz", "4kHz"}; static const char *treble_txt[] = {"8kHz", "4kHz"};
static const struct soc_enum treble = static SOC_ENUM_SINGLE_DECL(treble,
SOC_ENUM_SINGLE(WM8988_TREBLE, 6, 2, treble_txt); WM8988_TREBLE, 6, treble_txt);
static const char *stereo_3d_lc_txt[] = {"200Hz", "500Hz"}; static const char *stereo_3d_lc_txt[] = {"200Hz", "500Hz"};
static const struct soc_enum stereo_3d_lc = static SOC_ENUM_SINGLE_DECL(stereo_3d_lc,
SOC_ENUM_SINGLE(WM8988_3D, 5, 2, stereo_3d_lc_txt); WM8988_3D, 5, stereo_3d_lc_txt);
static const char *stereo_3d_uc_txt[] = {"2.2kHz", "1.5kHz"}; static const char *stereo_3d_uc_txt[] = {"2.2kHz", "1.5kHz"};
static const struct soc_enum stereo_3d_uc = static SOC_ENUM_SINGLE_DECL(stereo_3d_uc,
SOC_ENUM_SINGLE(WM8988_3D, 6, 2, stereo_3d_uc_txt); WM8988_3D, 6, stereo_3d_uc_txt);
static const char *stereo_3d_func_txt[] = {"Capture", "Playback"}; static const char *stereo_3d_func_txt[] = {"Capture", "Playback"};
static const struct soc_enum stereo_3d_func = static SOC_ENUM_SINGLE_DECL(stereo_3d_func,
SOC_ENUM_SINGLE(WM8988_3D, 7, 2, stereo_3d_func_txt); WM8988_3D, 7, stereo_3d_func_txt);
static const char *alc_func_txt[] = {"Off", "Right", "Left", "Stereo"}; static const char *alc_func_txt[] = {"Off", "Right", "Left", "Stereo"};
static const struct soc_enum alc_func = static SOC_ENUM_SINGLE_DECL(alc_func,
SOC_ENUM_SINGLE(WM8988_ALC1, 7, 4, alc_func_txt); WM8988_ALC1, 7, alc_func_txt);
static const char *ng_type_txt[] = {"Constant PGA Gain", static const char *ng_type_txt[] = {"Constant PGA Gain",
"Mute ADC Output"}; "Mute ADC Output"};
static const struct soc_enum ng_type = static SOC_ENUM_SINGLE_DECL(ng_type,
SOC_ENUM_SINGLE(WM8988_NGATE, 1, 2, ng_type_txt); WM8988_NGATE, 1, ng_type_txt);
static const char *deemph_txt[] = {"None", "32Khz", "44.1Khz", "48Khz"}; static const char *deemph_txt[] = {"None", "32Khz", "44.1Khz", "48Khz"};
static const struct soc_enum deemph = static SOC_ENUM_SINGLE_DECL(deemph,
SOC_ENUM_SINGLE(WM8988_ADCDAC, 1, 4, deemph_txt); WM8988_ADCDAC, 1, deemph_txt);
static const char *adcpol_txt[] = {"Normal", "L Invert", "R Invert", static const char *adcpol_txt[] = {"Normal", "L Invert", "R Invert",
"L + R Invert"}; "L + R Invert"};
static const struct soc_enum adcpol = static SOC_ENUM_SINGLE_DECL(adcpol,
SOC_ENUM_SINGLE(WM8988_ADCDAC, 5, 4, adcpol_txt); WM8988_ADCDAC, 5, adcpol_txt);
static const DECLARE_TLV_DB_SCALE(pga_tlv, -1725, 75, 0); static const DECLARE_TLV_DB_SCALE(pga_tlv, -1725, 75, 0);
static const DECLARE_TLV_DB_SCALE(adc_tlv, -9750, 50, 1); static const DECLARE_TLV_DB_SCALE(adc_tlv, -9750, 50, 1);
...@@ -317,16 +317,16 @@ static const struct snd_kcontrol_new wm8988_right_pga_controls = ...@@ -317,16 +317,16 @@ static const struct snd_kcontrol_new wm8988_right_pga_controls =
/* Differential Mux */ /* Differential Mux */
static const char *wm8988_diff_sel[] = {"Line 1", "Line 2"}; static const char *wm8988_diff_sel[] = {"Line 1", "Line 2"};
static const struct soc_enum diffmux = static SOC_ENUM_SINGLE_DECL(diffmux,
SOC_ENUM_SINGLE(WM8988_ADCIN, 8, 2, wm8988_diff_sel); WM8988_ADCIN, 8, wm8988_diff_sel);
static const struct snd_kcontrol_new wm8988_diffmux_controls = static const struct snd_kcontrol_new wm8988_diffmux_controls =
SOC_DAPM_ENUM("Route", diffmux); SOC_DAPM_ENUM("Route", diffmux);
/* Mono ADC Mux */ /* Mono ADC Mux */
static const char *wm8988_mono_mux[] = {"Stereo", "Mono (Left)", static const char *wm8988_mono_mux[] = {"Stereo", "Mono (Left)",
"Mono (Right)", "Digital Mono"}; "Mono (Right)", "Digital Mono"};
static const struct soc_enum monomux = static SOC_ENUM_SINGLE_DECL(monomux,
SOC_ENUM_SINGLE(WM8988_ADCIN, 6, 4, wm8988_mono_mux); WM8988_ADCIN, 6, wm8988_mono_mux);
static const struct snd_kcontrol_new wm8988_monomux_controls = static const struct snd_kcontrol_new wm8988_monomux_controls =
SOC_DAPM_ENUM("Route", monomux); SOC_DAPM_ENUM("Route", monomux);
...@@ -521,30 +521,30 @@ static inline int get_coeff(int mclk, int rate) ...@@ -521,30 +521,30 @@ static inline int get_coeff(int mclk, int rate)
/* The set of rates we can generate from the above for each SYSCLK */ /* The set of rates we can generate from the above for each SYSCLK */
static unsigned int rates_12288[] = { static const unsigned int rates_12288[] = {
8000, 12000, 16000, 24000, 24000, 32000, 48000, 96000, 8000, 12000, 16000, 24000, 24000, 32000, 48000, 96000,
}; };
static struct snd_pcm_hw_constraint_list constraints_12288 = { static const struct snd_pcm_hw_constraint_list constraints_12288 = {
.count = ARRAY_SIZE(rates_12288), .count = ARRAY_SIZE(rates_12288),
.list = rates_12288, .list = rates_12288,
}; };
static unsigned int rates_112896[] = { static const unsigned int rates_112896[] = {
8000, 11025, 22050, 44100, 8000, 11025, 22050, 44100,
}; };
static struct snd_pcm_hw_constraint_list constraints_112896 = { static const struct snd_pcm_hw_constraint_list constraints_112896 = {
.count = ARRAY_SIZE(rates_112896), .count = ARRAY_SIZE(rates_112896),
.list = rates_112896, .list = rates_112896,
}; };
static unsigned int rates_12[] = { static const unsigned int rates_12[] = {
8000, 11025, 12000, 16000, 22050, 2400, 32000, 41100, 48000, 8000, 11025, 12000, 16000, 22050, 2400, 32000, 41100, 48000,
48000, 88235, 96000, 48000, 88235, 96000,
}; };
static struct snd_pcm_hw_constraint_list constraints_12 = { static const struct snd_pcm_hw_constraint_list constraints_12 = {
.count = ARRAY_SIZE(rates_12), .count = ARRAY_SIZE(rates_12),
.list = rates_12, .list = rates_12,
}; };
......
...@@ -157,25 +157,22 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, ...@@ -157,25 +157,22 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
static const char *wm8990_digital_sidetone[] = static const char *wm8990_digital_sidetone[] =
{"None", "Left ADC", "Right ADC", "Reserved"}; {"None", "Left ADC", "Right ADC", "Reserved"};
static const struct soc_enum wm8990_left_digital_sidetone_enum = static SOC_ENUM_SINGLE_DECL(wm8990_left_digital_sidetone_enum,
SOC_ENUM_SINGLE(WM8990_DIGITAL_SIDE_TONE, WM8990_DIGITAL_SIDE_TONE,
WM8990_ADC_TO_DACL_SHIFT, WM8990_ADC_TO_DACL_SHIFT,
WM8990_ADC_TO_DACL_MASK,
wm8990_digital_sidetone); wm8990_digital_sidetone);
static const struct soc_enum wm8990_right_digital_sidetone_enum = static SOC_ENUM_SINGLE_DECL(wm8990_right_digital_sidetone_enum,
SOC_ENUM_SINGLE(WM8990_DIGITAL_SIDE_TONE, WM8990_DIGITAL_SIDE_TONE,
WM8990_ADC_TO_DACR_SHIFT, WM8990_ADC_TO_DACR_SHIFT,
WM8990_ADC_TO_DACR_MASK,
wm8990_digital_sidetone); wm8990_digital_sidetone);
static const char *wm8990_adcmode[] = static const char *wm8990_adcmode[] =
{"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"}; {"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"};
static const struct soc_enum wm8990_right_adcmode_enum = static SOC_ENUM_SINGLE_DECL(wm8990_right_adcmode_enum,
SOC_ENUM_SINGLE(WM8990_ADC_CTRL, WM8990_ADC_CTRL,
WM8990_ADC_HPF_CUT_SHIFT, WM8990_ADC_HPF_CUT_SHIFT,
WM8990_ADC_HPF_CUT_MASK,
wm8990_adcmode); wm8990_adcmode);
static const struct snd_kcontrol_new wm8990_snd_controls[] = { static const struct snd_kcontrol_new wm8990_snd_controls[] = {
...@@ -475,9 +472,9 @@ SOC_DAPM_SINGLE("RINPGA34 Switch", WM8990_INPUT_MIXER3, WM8990_L34MNB_BIT, ...@@ -475,9 +472,9 @@ SOC_DAPM_SINGLE("RINPGA34 Switch", WM8990_INPUT_MIXER3, WM8990_L34MNB_BIT,
static const char *wm8990_ainlmux[] = static const char *wm8990_ainlmux[] =
{"INMIXL Mix", "RXVOICE Mix", "DIFFINL Mix"}; {"INMIXL Mix", "RXVOICE Mix", "DIFFINL Mix"};
static const struct soc_enum wm8990_ainlmux_enum = static SOC_ENUM_SINGLE_DECL(wm8990_ainlmux_enum,
SOC_ENUM_SINGLE(WM8990_INPUT_MIXER1, WM8990_AINLMODE_SHIFT, WM8990_INPUT_MIXER1, WM8990_AINLMODE_SHIFT,
ARRAY_SIZE(wm8990_ainlmux), wm8990_ainlmux); wm8990_ainlmux);
static const struct snd_kcontrol_new wm8990_dapm_ainlmux_controls = static const struct snd_kcontrol_new wm8990_dapm_ainlmux_controls =
SOC_DAPM_ENUM("Route", wm8990_ainlmux_enum); SOC_DAPM_ENUM("Route", wm8990_ainlmux_enum);
...@@ -488,9 +485,9 @@ SOC_DAPM_ENUM("Route", wm8990_ainlmux_enum); ...@@ -488,9 +485,9 @@ SOC_DAPM_ENUM("Route", wm8990_ainlmux_enum);
static const char *wm8990_ainrmux[] = static const char *wm8990_ainrmux[] =
{"INMIXR Mix", "RXVOICE Mix", "DIFFINR Mix"}; {"INMIXR Mix", "RXVOICE Mix", "DIFFINR Mix"};
static const struct soc_enum wm8990_ainrmux_enum = static SOC_ENUM_SINGLE_DECL(wm8990_ainrmux_enum,
SOC_ENUM_SINGLE(WM8990_INPUT_MIXER1, WM8990_AINRMODE_SHIFT, WM8990_INPUT_MIXER1, WM8990_AINRMODE_SHIFT,
ARRAY_SIZE(wm8990_ainrmux), wm8990_ainrmux); wm8990_ainrmux);
static const struct snd_kcontrol_new wm8990_dapm_ainrmux_controls = static const struct snd_kcontrol_new wm8990_dapm_ainrmux_controls =
SOC_DAPM_ENUM("Route", wm8990_ainrmux_enum); SOC_DAPM_ENUM("Route", wm8990_ainrmux_enum);
......
...@@ -171,25 +171,22 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, ...@@ -171,25 +171,22 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
static const char *wm8991_digital_sidetone[] = static const char *wm8991_digital_sidetone[] =
{"None", "Left ADC", "Right ADC", "Reserved"}; {"None", "Left ADC", "Right ADC", "Reserved"};
static const struct soc_enum wm8991_left_digital_sidetone_enum = static SOC_ENUM_SINGLE_DECL(wm8991_left_digital_sidetone_enum,
SOC_ENUM_SINGLE(WM8991_DIGITAL_SIDE_TONE, WM8991_DIGITAL_SIDE_TONE,
WM8991_ADC_TO_DACL_SHIFT, WM8991_ADC_TO_DACL_SHIFT,
WM8991_ADC_TO_DACL_MASK,
wm8991_digital_sidetone); wm8991_digital_sidetone);
static const struct soc_enum wm8991_right_digital_sidetone_enum = static SOC_ENUM_SINGLE_DECL(wm8991_right_digital_sidetone_enum,
SOC_ENUM_SINGLE(WM8991_DIGITAL_SIDE_TONE, WM8991_DIGITAL_SIDE_TONE,
WM8991_ADC_TO_DACR_SHIFT, WM8991_ADC_TO_DACR_SHIFT,
WM8991_ADC_TO_DACR_MASK,
wm8991_digital_sidetone); wm8991_digital_sidetone);
static const char *wm8991_adcmode[] = static const char *wm8991_adcmode[] =
{"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"}; {"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"};
static const struct soc_enum wm8991_right_adcmode_enum = static SOC_ENUM_SINGLE_DECL(wm8991_right_adcmode_enum,
SOC_ENUM_SINGLE(WM8991_ADC_CTRL, WM8991_ADC_CTRL,
WM8991_ADC_HPF_CUT_SHIFT, WM8991_ADC_HPF_CUT_SHIFT,
WM8991_ADC_HPF_CUT_MASK,
wm8991_adcmode); wm8991_adcmode);
static const struct snd_kcontrol_new wm8991_snd_controls[] = { static const struct snd_kcontrol_new wm8991_snd_controls[] = {
...@@ -486,9 +483,9 @@ static const struct snd_kcontrol_new wm8991_dapm_inmixr_controls[] = { ...@@ -486,9 +483,9 @@ static const struct snd_kcontrol_new wm8991_dapm_inmixr_controls[] = {
static const char *wm8991_ainlmux[] = static const char *wm8991_ainlmux[] =
{"INMIXL Mix", "RXVOICE Mix", "DIFFINL Mix"}; {"INMIXL Mix", "RXVOICE Mix", "DIFFINL Mix"};
static const struct soc_enum wm8991_ainlmux_enum = static SOC_ENUM_SINGLE_DECL(wm8991_ainlmux_enum,
SOC_ENUM_SINGLE(WM8991_INPUT_MIXER1, WM8991_AINLMODE_SHIFT, WM8991_INPUT_MIXER1, WM8991_AINLMODE_SHIFT,
ARRAY_SIZE(wm8991_ainlmux), wm8991_ainlmux); wm8991_ainlmux);
static const struct snd_kcontrol_new wm8991_dapm_ainlmux_controls = static const struct snd_kcontrol_new wm8991_dapm_ainlmux_controls =
SOC_DAPM_ENUM("Route", wm8991_ainlmux_enum); SOC_DAPM_ENUM("Route", wm8991_ainlmux_enum);
...@@ -499,9 +496,9 @@ static const struct snd_kcontrol_new wm8991_dapm_ainlmux_controls = ...@@ -499,9 +496,9 @@ static const struct snd_kcontrol_new wm8991_dapm_ainlmux_controls =
static const char *wm8991_ainrmux[] = static const char *wm8991_ainrmux[] =
{"INMIXR Mix", "RXVOICE Mix", "DIFFINR Mix"}; {"INMIXR Mix", "RXVOICE Mix", "DIFFINR Mix"};
static const struct soc_enum wm8991_ainrmux_enum = static SOC_ENUM_SINGLE_DECL(wm8991_ainrmux_enum,
SOC_ENUM_SINGLE(WM8991_INPUT_MIXER1, WM8991_AINRMODE_SHIFT, WM8991_INPUT_MIXER1, WM8991_AINRMODE_SHIFT,
ARRAY_SIZE(wm8991_ainrmux), wm8991_ainrmux); wm8991_ainrmux);
static const struct snd_kcontrol_new wm8991_dapm_ainrmux_controls = static const struct snd_kcontrol_new wm8991_dapm_ainrmux_controls =
SOC_DAPM_ENUM("Route", wm8991_ainrmux_enum); SOC_DAPM_ENUM("Route", wm8991_ainrmux_enum);
...@@ -1251,11 +1248,8 @@ static int wm8991_remove(struct snd_soc_codec *codec) ...@@ -1251,11 +1248,8 @@ static int wm8991_remove(struct snd_soc_codec *codec)
static int wm8991_probe(struct snd_soc_codec *codec) static int wm8991_probe(struct snd_soc_codec *codec)
{ {
struct wm8991_priv *wm8991;
int ret; int ret;
wm8991 = snd_soc_codec_get_drvdata(codec);
ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP); ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_REGMAP);
if (ret < 0) { if (ret < 0) {
dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret); dev_err(codec->dev, "Failed to set cache i/o: %d\n", ret);
......
...@@ -646,8 +646,8 @@ static const char *dac_deemph_text[] = { ...@@ -646,8 +646,8 @@ static const char *dac_deemph_text[] = {
"48kHz", "48kHz",
}; };
static const struct soc_enum dac_deemph = static SOC_ENUM_SINGLE_DECL(dac_deemph,
SOC_ENUM_SINGLE(WM8993_DAC_CTRL, 4, 4, dac_deemph_text); WM8993_DAC_CTRL, 4, dac_deemph_text);
static const char *adc_hpf_text[] = { static const char *adc_hpf_text[] = {
"Hi-Fi", "Hi-Fi",
...@@ -656,16 +656,16 @@ static const char *adc_hpf_text[] = { ...@@ -656,16 +656,16 @@ static const char *adc_hpf_text[] = {
"Voice 3", "Voice 3",
}; };
static const struct soc_enum adc_hpf = static SOC_ENUM_SINGLE_DECL(adc_hpf,
SOC_ENUM_SINGLE(WM8993_ADC_CTRL, 5, 4, adc_hpf_text); WM8993_ADC_CTRL, 5, adc_hpf_text);
static const char *drc_path_text[] = { static const char *drc_path_text[] = {
"ADC", "ADC",
"DAC" "DAC"
}; };
static const struct soc_enum drc_path = static SOC_ENUM_SINGLE_DECL(drc_path,
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_1, 14, 2, drc_path_text); WM8993_DRC_CONTROL_1, 14, drc_path_text);
static const char *drc_r0_text[] = { static const char *drc_r0_text[] = {
"1", "1",
...@@ -676,8 +676,8 @@ static const char *drc_r0_text[] = { ...@@ -676,8 +676,8 @@ static const char *drc_r0_text[] = {
"0", "0",
}; };
static const struct soc_enum drc_r0 = static SOC_ENUM_SINGLE_DECL(drc_r0,
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_3, 8, 6, drc_r0_text); WM8993_DRC_CONTROL_3, 8, drc_r0_text);
static const char *drc_r1_text[] = { static const char *drc_r1_text[] = {
"1", "1",
...@@ -687,8 +687,8 @@ static const char *drc_r1_text[] = { ...@@ -687,8 +687,8 @@ static const char *drc_r1_text[] = {
"0", "0",
}; };
static const struct soc_enum drc_r1 = static SOC_ENUM_SINGLE_DECL(drc_r1,
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_4, 13, 5, drc_r1_text); WM8993_DRC_CONTROL_4, 13, drc_r1_text);
static const char *drc_attack_text[] = { static const char *drc_attack_text[] = {
"Reserved", "Reserved",
...@@ -705,8 +705,8 @@ static const char *drc_attack_text[] = { ...@@ -705,8 +705,8 @@ static const char *drc_attack_text[] = {
"185.6ms", "185.6ms",
}; };
static const struct soc_enum drc_attack = static SOC_ENUM_SINGLE_DECL(drc_attack,
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_2, 12, 12, drc_attack_text); WM8993_DRC_CONTROL_2, 12, drc_attack_text);
static const char *drc_decay_text[] = { static const char *drc_decay_text[] = {
"186ms", "186ms",
...@@ -720,16 +720,16 @@ static const char *drc_decay_text[] = { ...@@ -720,16 +720,16 @@ static const char *drc_decay_text[] = {
"47.56ms", "47.56ms",
}; };
static const struct soc_enum drc_decay = static SOC_ENUM_SINGLE_DECL(drc_decay,
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_2, 8, 9, drc_decay_text); WM8993_DRC_CONTROL_2, 8, drc_decay_text);
static const char *drc_ff_text[] = { static const char *drc_ff_text[] = {
"5 samples", "5 samples",
"9 samples", "9 samples",
}; };
static const struct soc_enum drc_ff = static SOC_ENUM_SINGLE_DECL(drc_ff,
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_3, 7, 2, drc_ff_text); WM8993_DRC_CONTROL_3, 7, drc_ff_text);
static const char *drc_qr_rate_text[] = { static const char *drc_qr_rate_text[] = {
"0.725ms", "0.725ms",
...@@ -737,8 +737,8 @@ static const char *drc_qr_rate_text[] = { ...@@ -737,8 +737,8 @@ static const char *drc_qr_rate_text[] = {
"5.8ms", "5.8ms",
}; };
static const struct soc_enum drc_qr_rate = static SOC_ENUM_SINGLE_DECL(drc_qr_rate,
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_3, 0, 3, drc_qr_rate_text); WM8993_DRC_CONTROL_3, 0, drc_qr_rate_text);
static const char *drc_smooth_text[] = { static const char *drc_smooth_text[] = {
"Low", "Low",
...@@ -746,8 +746,8 @@ static const char *drc_smooth_text[] = { ...@@ -746,8 +746,8 @@ static const char *drc_smooth_text[] = {
"High", "High",
}; };
static const struct soc_enum drc_smooth = static SOC_ENUM_SINGLE_DECL(drc_smooth,
SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_1, 4, 3, drc_smooth_text); WM8993_DRC_CONTROL_1, 4, drc_smooth_text);
static const struct snd_kcontrol_new wm8993_snd_controls[] = { static const struct snd_kcontrol_new wm8993_snd_controls[] = {
SOC_DOUBLE_TLV("Digital Sidetone Volume", WM8993_DIGITAL_SIDE_TONE, SOC_DOUBLE_TLV("Digital Sidetone Volume", WM8993_DIGITAL_SIDE_TONE,
...@@ -841,26 +841,26 @@ static const char *aif_text[] = { ...@@ -841,26 +841,26 @@ static const char *aif_text[] = {
"Left", "Right" "Left", "Right"
}; };
static const struct soc_enum aifoutl_enum = static SOC_ENUM_SINGLE_DECL(aifoutl_enum,
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_1, 15, 2, aif_text); WM8993_AUDIO_INTERFACE_1, 15, aif_text);
static const struct snd_kcontrol_new aifoutl_mux = static const struct snd_kcontrol_new aifoutl_mux =
SOC_DAPM_ENUM("AIFOUTL Mux", aifoutl_enum); SOC_DAPM_ENUM("AIFOUTL Mux", aifoutl_enum);
static const struct soc_enum aifoutr_enum = static SOC_ENUM_SINGLE_DECL(aifoutr_enum,
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_1, 14, 2, aif_text); WM8993_AUDIO_INTERFACE_1, 14, aif_text);
static const struct snd_kcontrol_new aifoutr_mux = static const struct snd_kcontrol_new aifoutr_mux =
SOC_DAPM_ENUM("AIFOUTR Mux", aifoutr_enum); SOC_DAPM_ENUM("AIFOUTR Mux", aifoutr_enum);
static const struct soc_enum aifinl_enum = static SOC_ENUM_SINGLE_DECL(aifinl_enum,
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_2, 15, 2, aif_text); WM8993_AUDIO_INTERFACE_2, 15, aif_text);
static const struct snd_kcontrol_new aifinl_mux = static const struct snd_kcontrol_new aifinl_mux =
SOC_DAPM_ENUM("AIFINL Mux", aifinl_enum); SOC_DAPM_ENUM("AIFINL Mux", aifinl_enum);
static const struct soc_enum aifinr_enum = static SOC_ENUM_SINGLE_DECL(aifinr_enum,
SOC_ENUM_SINGLE(WM8993_AUDIO_INTERFACE_2, 14, 2, aif_text); WM8993_AUDIO_INTERFACE_2, 14, aif_text);
static const struct snd_kcontrol_new aifinr_mux = static const struct snd_kcontrol_new aifinr_mux =
SOC_DAPM_ENUM("AIFINR Mux", aifinr_enum); SOC_DAPM_ENUM("AIFINR Mux", aifinr_enum);
...@@ -869,14 +869,14 @@ static const char *sidetone_text[] = { ...@@ -869,14 +869,14 @@ static const char *sidetone_text[] = {
"None", "Left", "Right" "None", "Left", "Right"
}; };
static const struct soc_enum sidetonel_enum = static SOC_ENUM_SINGLE_DECL(sidetonel_enum,
SOC_ENUM_SINGLE(WM8993_DIGITAL_SIDE_TONE, 2, 3, sidetone_text); WM8993_DIGITAL_SIDE_TONE, 2, sidetone_text);
static const struct snd_kcontrol_new sidetonel_mux = static const struct snd_kcontrol_new sidetonel_mux =
SOC_DAPM_ENUM("Left Sidetone", sidetonel_enum); SOC_DAPM_ENUM("Left Sidetone", sidetonel_enum);
static const struct soc_enum sidetoner_enum = static SOC_ENUM_SINGLE_DECL(sidetoner_enum,
SOC_ENUM_SINGLE(WM8993_DIGITAL_SIDE_TONE, 0, 3, sidetone_text); WM8993_DIGITAL_SIDE_TONE, 0, sidetone_text);
static const struct snd_kcontrol_new sidetoner_mux = static const struct snd_kcontrol_new sidetoner_mux =
SOC_DAPM_ENUM("Right Sidetone", sidetoner_enum); SOC_DAPM_ENUM("Right Sidetone", sidetoner_enum);
...@@ -1559,8 +1559,6 @@ static int wm8993_probe(struct snd_soc_codec *codec) ...@@ -1559,8 +1559,6 @@ static int wm8993_probe(struct snd_soc_codec *codec)
static int wm8993_remove(struct snd_soc_codec *codec) static int wm8993_remove(struct snd_soc_codec *codec)
{ {
struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec);
wm8993_set_bias_level(codec, SND_SOC_BIAS_OFF); wm8993_set_bias_level(codec, SND_SOC_BIAS_OFF);
return 0; return 0;
} }
......
...@@ -50,16 +50,16 @@ static const char *speaker_ref_text[] = { ...@@ -50,16 +50,16 @@ static const char *speaker_ref_text[] = {
"VMID", "VMID",
}; };
static const struct soc_enum speaker_ref = static SOC_ENUM_SINGLE_DECL(speaker_ref,
SOC_ENUM_SINGLE(WM8993_SPEAKER_MIXER, 8, 2, speaker_ref_text); WM8993_SPEAKER_MIXER, 8, speaker_ref_text);
static const char *speaker_mode_text[] = { static const char *speaker_mode_text[] = {
"Class D", "Class D",
"Class AB", "Class AB",
}; };
static const struct soc_enum speaker_mode = static SOC_ENUM_SINGLE_DECL(speaker_mode,
SOC_ENUM_SINGLE(WM8993_SPKMIXR_ATTENUATION, 8, 2, speaker_mode_text); WM8993_SPKMIXR_ATTENUATION, 8, speaker_mode_text);
static void wait_for_dc_servo(struct snd_soc_codec *codec, unsigned int op) static void wait_for_dc_servo(struct snd_soc_codec *codec, unsigned int op)
{ {
...@@ -735,15 +735,15 @@ static const char *hp_mux_text[] = { ...@@ -735,15 +735,15 @@ static const char *hp_mux_text[] = {
"DAC", "DAC",
}; };
static const struct soc_enum hpl_enum = static SOC_ENUM_SINGLE_DECL(hpl_enum,
SOC_ENUM_SINGLE(WM8993_OUTPUT_MIXER1, 8, 2, hp_mux_text); WM8993_OUTPUT_MIXER1, 8, hp_mux_text);
const struct snd_kcontrol_new wm_hubs_hpl_mux = const struct snd_kcontrol_new wm_hubs_hpl_mux =
WM_HUBS_ENUM_W("Left Headphone Mux", hpl_enum); WM_HUBS_ENUM_W("Left Headphone Mux", hpl_enum);
EXPORT_SYMBOL_GPL(wm_hubs_hpl_mux); EXPORT_SYMBOL_GPL(wm_hubs_hpl_mux);
static const struct soc_enum hpr_enum = static SOC_ENUM_SINGLE_DECL(hpr_enum,
SOC_ENUM_SINGLE(WM8993_OUTPUT_MIXER2, 8, 2, hp_mux_text); WM8993_OUTPUT_MIXER2, 8, hp_mux_text);
const struct snd_kcontrol_new wm_hubs_hpr_mux = const struct snd_kcontrol_new wm_hubs_hpr_mux =
WM_HUBS_ENUM_W("Right Headphone Mux", hpr_enum); WM_HUBS_ENUM_W("Right Headphone Mux", hpr_enum);
......
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