Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 543f190a authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/topic/wm5100', 'asoc/topic/wm8523',...

Merge remote-tracking branches 'asoc/topic/wm5100', 'asoc/topic/wm8523', '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
+12 −12
Original line number Original line Diff line number Diff line
@@ -506,20 +506,20 @@ static const char *wm5100_lhpf_mode_text[] = {
	"Low-pass", "High-pass"
	"Low-pass", "High-pass"
};
};


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


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


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


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


static const struct snd_kcontrol_new wm5100_snd_controls[] = {
static const struct snd_kcontrol_new wm5100_snd_controls[] = {
+2 −2
Original line number Original line Diff line number Diff line
@@ -75,8 +75,8 @@ static const char *wm8523_zd_count_text[] = {
	"2048",
	"2048",
};
};


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


static const struct snd_kcontrol_new wm8523_controls[] = {
static const struct snd_kcontrol_new wm8523_controls[] = {
SOC_DOUBLE_R_TLV("Playback Volume", WM8523_DAC_GAINL, WM8523_DAC_GAINR,
SOC_DOUBLE_R_TLV("Playback Volume", WM8523_DAC_GAINL, WM8523_DAC_GAINR,
+2 −2
Original line number Original line Diff line number Diff line
@@ -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 char *wm8731_input_select[] = {"Line In", "Mic"};


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


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


+25 −25
Original line number Original line Diff line number Diff line
@@ -99,29 +99,29 @@ static const char *micbias_enum_text[] = {
	"100%",
	"100%",
};
};


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


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


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


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


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


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


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


static const char *alc_hold_text[] = {
static const char *alc_hold_text[] = {
	"0", "2.67ms", "5.33ms", "10.66ms", "21.32ms", "42.64ms", "85.28ms",
	"0", "2.67ms", "5.33ms", "10.66ms", "21.32ms", "42.64ms", "85.28ms",
@@ -129,24 +129,24 @@ static const char *alc_hold_text[] = {
	"10.916s", "21.832s", "43.691s"
	"10.916s", "21.832s", "43.691s"
};
};


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


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


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


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


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


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


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


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


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


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


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


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




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


static const struct snd_kcontrol_new rbypass_mux =
static const struct snd_kcontrol_new rbypass_mux =
	SOC_DAPM_ENUM("Left Bypass", rbypass_enum);
	SOC_DAPM_ENUM("Left Bypass", rbypass_enum);
@@ -644,7 +644,7 @@ static const struct regmap_config wm8737_regmap = {
	.volatile_reg = wm8737_volatile,
	.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,
static int wm8737_i2c_probe(struct i2c_client *i2c,
			    const struct i2c_device_id *id)
			    const struct i2c_device_id *id)
{
{
@@ -758,7 +758,7 @@ static struct spi_driver wm8737_spi_driver = {
static int __init wm8737_modinit(void)
static int __init wm8737_modinit(void)
{
{
	int ret;
	int ret;
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
#if IS_ENABLED(CONFIG_I2C)
	ret = i2c_add_driver(&wm8737_i2c_driver);
	ret = i2c_add_driver(&wm8737_i2c_driver);
	if (ret != 0) {
	if (ret != 0) {
		printk(KERN_ERR "Failed to register WM8737 I2C driver: %d\n",
		printk(KERN_ERR "Failed to register WM8737 I2C driver: %d\n",
@@ -781,7 +781,7 @@ static void __exit wm8737_exit(void)
#if defined(CONFIG_SPI_MASTER)
#if defined(CONFIG_SPI_MASTER)
	spi_unregister_driver(&wm8737_spi_driver);
	spi_unregister_driver(&wm8737_spi_driver);
#endif
#endif
#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
#if IS_ENABLED(CONFIG_I2C)
	i2c_del_driver(&wm8737_i2c_driver);
	i2c_del_driver(&wm8737_i2c_driver);
#endif
#endif
}
}
+17 −17
Original line number Original line Diff line number Diff line
@@ -44,7 +44,7 @@ struct wm8741_priv {
	struct regmap *regmap;
	struct regmap *regmap;
	struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
	struct regulator_bulk_data supplies[WM8741_NUM_SUPPLIES];
	unsigned int sysclk;
	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[] = {
static const struct reg_default wm8741_reg_defaults[] = {
@@ -122,74 +122,74 @@ static struct {
	{ 6, 768 },
	{ 6, 768 },
};
};


static unsigned int rates_11289[] = {
static const unsigned int rates_11289[] = {
	44100, 88235,
	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),
	.count	= ARRAY_SIZE(rates_11289),
	.list	= rates_11289,
	.list	= rates_11289,
};
};


static unsigned int rates_12288[] = {
static const unsigned int rates_12288[] = {
	32000, 48000, 96000,
	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_16384[] = {
static const unsigned int rates_16384[] = {
	32000,
	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),
	.count	= ARRAY_SIZE(rates_16384),
	.list	= rates_16384,
	.list	= rates_16384,
};
};


static unsigned int rates_16934[] = {
static const unsigned int rates_16934[] = {
	44100, 88235,
	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),
	.count	= ARRAY_SIZE(rates_16934),
	.list	= rates_16934,
	.list	= rates_16934,
};
};


static unsigned int rates_18432[] = {
static const unsigned int rates_18432[] = {
	48000, 96000,
	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),
	.count	= ARRAY_SIZE(rates_18432),
	.list	= rates_18432,
	.list	= rates_18432,
};
};


static unsigned int rates_22579[] = {
static const unsigned int rates_22579[] = {
	44100, 88235, 1764000
	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),
	.count	= ARRAY_SIZE(rates_22579),
	.list	= rates_22579,
	.list	= rates_22579,
};
};


static unsigned int rates_24576[] = {
static const unsigned int rates_24576[] = {
	32000, 48000, 96000, 192000
	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),
	.count	= ARRAY_SIZE(rates_24576),
	.list	= rates_24576,
	.list	= rates_24576,
};
};


static unsigned int rates_36864[] = {
static const unsigned int rates_36864[] = {
	48000, 96000, 19200
	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),
	.count	= ARRAY_SIZE(rates_36864),
	.list	= rates_36864,
	.list	= rates_36864,
};
};
Loading