Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/wm5100', 'asoc/topic/wm852…
Browse files Browse the repository at this point in the history
…3', 'asoc/topic/wm8731', 'asoc/topic/wm8737', 'asoc/topic/wm8741', 'asoc/topic/wm8753', 'asoc/topic/wm8903', 'asoc/topic/wm8904', 'asoc/topic/wm8940' and 'asoc/topic/wm8955' into asoc-next
  • Loading branch information
Mark Brown committed Mar 12, 2014
11 parents ba67761 + 0224ba6 + fed08d9 + 9e74b14 + ca27581 + 70bad2c + 48b5e1f + a21bc5c + d12bfd6 + 47ef342 + 54db41c commit 543f190
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 165 deletions.
24 changes: 12 additions & 12 deletions sound/soc/codecs/wm5100.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,21 +506,21 @@ static const char *wm5100_lhpf_mode_text[] = {
"Low-pass", "High-pass"
};

static const struct soc_enum wm5100_lhpf1_mode =
SOC_ENUM_SINGLE(WM5100_HPLPF1_1, WM5100_LHPF1_MODE_SHIFT, 2,
wm5100_lhpf_mode_text);
static SOC_ENUM_SINGLE_DECL(wm5100_lhpf1_mode,
WM5100_HPLPF1_1, WM5100_LHPF1_MODE_SHIFT,
wm5100_lhpf_mode_text);

static const struct soc_enum wm5100_lhpf2_mode =
SOC_ENUM_SINGLE(WM5100_HPLPF2_1, WM5100_LHPF2_MODE_SHIFT, 2,
wm5100_lhpf_mode_text);
static SOC_ENUM_SINGLE_DECL(wm5100_lhpf2_mode,
WM5100_HPLPF2_1, WM5100_LHPF2_MODE_SHIFT,
wm5100_lhpf_mode_text);

static const struct soc_enum wm5100_lhpf3_mode =
SOC_ENUM_SINGLE(WM5100_HPLPF3_1, WM5100_LHPF3_MODE_SHIFT, 2,
wm5100_lhpf_mode_text);
static SOC_ENUM_SINGLE_DECL(wm5100_lhpf3_mode,
WM5100_HPLPF3_1, WM5100_LHPF3_MODE_SHIFT,
wm5100_lhpf_mode_text);

static const struct soc_enum wm5100_lhpf4_mode =
SOC_ENUM_SINGLE(WM5100_HPLPF4_1, WM5100_LHPF4_MODE_SHIFT, 2,
wm5100_lhpf_mode_text);
static SOC_ENUM_SINGLE_DECL(wm5100_lhpf4_mode,
WM5100_HPLPF4_1, WM5100_LHPF4_MODE_SHIFT,
wm5100_lhpf_mode_text);

static const struct snd_kcontrol_new wm5100_snd_controls[] = {
SOC_SINGLE("IN1 High Performance Switch", WM5100_IN1L_CONTROL,
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8523.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ static const char *wm8523_zd_count_text[] = {
"2048",
};

static const struct soc_enum wm8523_zc_count =
SOC_ENUM_SINGLE(WM8523_ZERO_DETECT, 0, 2, wm8523_zd_count_text);
static SOC_ENUM_SINGLE_DECL(wm8523_zc_count, WM8523_ZERO_DETECT, 0,
wm8523_zd_count_text);

static const struct snd_kcontrol_new wm8523_controls[] = {
SOC_DOUBLE_R_TLV("Playback Volume", WM8523_DAC_GAINL, WM8523_DAC_GAINR,
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm8731.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ static bool wm8731_writeable(struct device *dev, unsigned int reg)

static const char *wm8731_input_select[] = {"Line In", "Mic"};

static const struct soc_enum wm8731_insel_enum =
SOC_ENUM_SINGLE(WM8731_APANA, 2, 2, wm8731_input_select);
static SOC_ENUM_SINGLE_DECL(wm8731_insel_enum,
WM8731_APANA, 2, wm8731_input_select);

static int wm8731_deemph[] = { 0, 32000, 44100, 48000 };

Expand Down
50 changes: 25 additions & 25 deletions sound/soc/codecs/wm8737.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,54 +99,54 @@ static const char *micbias_enum_text[] = {
"100%",
};

static const struct soc_enum micbias_enum =
SOC_ENUM_SINGLE(WM8737_MIC_PREAMP_CONTROL, 0, 4, micbias_enum_text);
static SOC_ENUM_SINGLE_DECL(micbias_enum,
WM8737_MIC_PREAMP_CONTROL, 0, micbias_enum_text);

static const char *low_cutoff_text[] = {
"Low", "High"
};

static const struct soc_enum low_3d =
SOC_ENUM_SINGLE(WM8737_3D_ENHANCE, 6, 2, low_cutoff_text);
static SOC_ENUM_SINGLE_DECL(low_3d,
WM8737_3D_ENHANCE, 6, low_cutoff_text);

static const char *high_cutoff_text[] = {
"High", "Low"
};

static const struct soc_enum high_3d =
SOC_ENUM_SINGLE(WM8737_3D_ENHANCE, 5, 2, high_cutoff_text);
static SOC_ENUM_SINGLE_DECL(high_3d,
WM8737_3D_ENHANCE, 5, high_cutoff_text);

static const char *alc_fn_text[] = {
"Disabled", "Right", "Left", "Stereo"
};

static const struct soc_enum alc_fn =
SOC_ENUM_SINGLE(WM8737_ALC1, 7, 4, alc_fn_text);
static SOC_ENUM_SINGLE_DECL(alc_fn,
WM8737_ALC1, 7, alc_fn_text);

static const char *alc_hold_text[] = {
"0", "2.67ms", "5.33ms", "10.66ms", "21.32ms", "42.64ms", "85.28ms",
"170.56ms", "341.12ms", "682.24ms", "1.364s", "2.728s", "5.458s",
"10.916s", "21.832s", "43.691s"
};

static const struct soc_enum alc_hold =
SOC_ENUM_SINGLE(WM8737_ALC2, 0, 16, alc_hold_text);
static SOC_ENUM_SINGLE_DECL(alc_hold,
WM8737_ALC2, 0, alc_hold_text);

static const char *alc_atk_text[] = {
"8.4ms", "16.8ms", "33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms",
"1.075s", "2.15s", "4.3s", "8.6s"
};

static const struct soc_enum alc_atk =
SOC_ENUM_SINGLE(WM8737_ALC3, 0, 11, alc_atk_text);
static SOC_ENUM_SINGLE_DECL(alc_atk,
WM8737_ALC3, 0, alc_atk_text);

static const char *alc_dcy_text[] = {
"33.6ms", "67.2ms", "134.4ms", "268.8ms", "537.6ms", "1.075s", "2.15s",
"4.3s", "8.6s", "17.2s", "34.41s"
};

static const struct soc_enum alc_dcy =
SOC_ENUM_SINGLE(WM8737_ALC3, 4, 11, alc_dcy_text);
static SOC_ENUM_SINGLE_DECL(alc_dcy,
WM8737_ALC3, 4, alc_dcy_text);

static const struct snd_kcontrol_new wm8737_snd_controls[] = {
SOC_DOUBLE_R_TLV("Mic Boost Volume", WM8737_AUDIO_PATH_L, WM8737_AUDIO_PATH_R,
Expand Down Expand Up @@ -191,8 +191,8 @@ static const char *linsel_text[] = {
"LINPUT1", "LINPUT2", "LINPUT3", "LINPUT1 DC",
};

static const struct soc_enum linsel_enum =
SOC_ENUM_SINGLE(WM8737_AUDIO_PATH_L, 7, 4, linsel_text);
static SOC_ENUM_SINGLE_DECL(linsel_enum,
WM8737_AUDIO_PATH_L, 7, linsel_text);

static const struct snd_kcontrol_new linsel_mux =
SOC_DAPM_ENUM("LINSEL", linsel_enum);
Expand All @@ -202,8 +202,8 @@ static const char *rinsel_text[] = {
"RINPUT1", "RINPUT2", "RINPUT3", "RINPUT1 DC",
};

static const struct soc_enum rinsel_enum =
SOC_ENUM_SINGLE(WM8737_AUDIO_PATH_R, 7, 4, rinsel_text);
static SOC_ENUM_SINGLE_DECL(rinsel_enum,
WM8737_AUDIO_PATH_R, 7, rinsel_text);

static const struct snd_kcontrol_new rinsel_mux =
SOC_DAPM_ENUM("RINSEL", rinsel_enum);
Expand All @@ -212,15 +212,15 @@ static const char *bypass_text[] = {
"Direct", "Preamp"
};

static const struct soc_enum lbypass_enum =
SOC_ENUM_SINGLE(WM8737_MIC_PREAMP_CONTROL, 2, 2, bypass_text);
static SOC_ENUM_SINGLE_DECL(lbypass_enum,
WM8737_MIC_PREAMP_CONTROL, 2, bypass_text);

static const struct snd_kcontrol_new lbypass_mux =
SOC_DAPM_ENUM("Left Bypass", lbypass_enum);


static const struct soc_enum rbypass_enum =
SOC_ENUM_SINGLE(WM8737_MIC_PREAMP_CONTROL, 3, 2, bypass_text);
static SOC_ENUM_SINGLE_DECL(rbypass_enum,
WM8737_MIC_PREAMP_CONTROL, 3, bypass_text);

static const struct snd_kcontrol_new rbypass_mux =
SOC_DAPM_ENUM("Left Bypass", rbypass_enum);
Expand Down Expand Up @@ -644,7 +644,7 @@ static const struct regmap_config wm8737_regmap = {
.volatile_reg = wm8737_volatile,
};

#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
#if IS_ENABLED(CONFIG_I2C)
static int wm8737_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
Expand Down Expand Up @@ -758,7 +758,7 @@ static struct spi_driver wm8737_spi_driver = {
static int __init wm8737_modinit(void)
{
int ret;
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
#if IS_ENABLED(CONFIG_I2C)
ret = i2c_add_driver(&wm8737_i2c_driver);
if (ret != 0) {
printk(KERN_ERR "Failed to register WM8737 I2C driver: %d\n",
Expand All @@ -781,7 +781,7 @@ static void __exit wm8737_exit(void)
#if defined(CONFIG_SPI_MASTER)
spi_unregister_driver(&wm8737_spi_driver);
#endif
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
#if IS_ENABLED(CONFIG_I2C)
i2c_del_driver(&wm8737_i2c_driver);
#endif
}
Expand Down
34 changes: 17 additions & 17 deletions sound/soc/codecs/wm8741.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct wm8741_priv {
struct regmap *regmap;
struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
unsigned int sysclk;
struct snd_pcm_hw_constraint_list *sysclk_constraints;
const struct snd_pcm_hw_constraint_list *sysclk_constraints;
};

static const struct reg_default wm8741_reg_defaults[] = {
Expand Down Expand Up @@ -122,74 +122,74 @@ static struct {
{ 6, 768 },
};

static unsigned int rates_11289[] = {
static const unsigned int rates_11289[] = {
44100, 88235,
};

static struct snd_pcm_hw_constraint_list constraints_11289 = {
static const struct snd_pcm_hw_constraint_list constraints_11289 = {
.count = ARRAY_SIZE(rates_11289),
.list = rates_11289,
};

static unsigned int rates_12288[] = {
static const unsigned int rates_12288[] = {
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),
.list = rates_12288,
};

static unsigned int rates_16384[] = {
static const unsigned int rates_16384[] = {
32000,
};

static struct snd_pcm_hw_constraint_list constraints_16384 = {
static const struct snd_pcm_hw_constraint_list constraints_16384 = {
.count = ARRAY_SIZE(rates_16384),
.list = rates_16384,
};

static unsigned int rates_16934[] = {
static const unsigned int rates_16934[] = {
44100, 88235,
};

static struct snd_pcm_hw_constraint_list constraints_16934 = {
static const struct snd_pcm_hw_constraint_list constraints_16934 = {
.count = ARRAY_SIZE(rates_16934),
.list = rates_16934,
};

static unsigned int rates_18432[] = {
static const unsigned int rates_18432[] = {
48000, 96000,
};

static struct snd_pcm_hw_constraint_list constraints_18432 = {
static const struct snd_pcm_hw_constraint_list constraints_18432 = {
.count = ARRAY_SIZE(rates_18432),
.list = rates_18432,
};

static unsigned int rates_22579[] = {
static const unsigned int rates_22579[] = {
44100, 88235, 1764000
};

static struct snd_pcm_hw_constraint_list constraints_22579 = {
static const struct snd_pcm_hw_constraint_list constraints_22579 = {
.count = ARRAY_SIZE(rates_22579),
.list = rates_22579,
};

static unsigned int rates_24576[] = {
static const unsigned int rates_24576[] = {
32000, 48000, 96000, 192000
};

static struct snd_pcm_hw_constraint_list constraints_24576 = {
static const struct snd_pcm_hw_constraint_list constraints_24576 = {
.count = ARRAY_SIZE(rates_24576),
.list = rates_24576,
};

static unsigned int rates_36864[] = {
static const unsigned int rates_36864[] = {
48000, 96000, 19200
};

static struct snd_pcm_hw_constraint_list constraints_36864 = {
static const struct snd_pcm_hw_constraint_list constraints_36864 = {
.count = ARRAY_SIZE(rates_36864),
.list = rates_36864,
};
Expand Down
1 change: 0 additions & 1 deletion sound/soc/codecs/wm8753.c
Original file line number Diff line number Diff line change
Expand Up @@ -1440,7 +1440,6 @@ static void wm8753_work(struct work_struct *work)
static int wm8753_suspend(struct snd_soc_codec *codec)
{
wm8753_set_bias_level(codec, SND_SOC_BIAS_OFF);
codec->cache_sync = 1;
return 0;
}

Expand Down
Loading

0 comments on commit 543f190

Please sign in to comment.