Unverified Commit 644ed467 authored by Mark Brown's avatar Mark Brown
Browse files

ASoC: Merge fixes

Needed for new development.
parents 6b183919 f69a10f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16247,7 +16247,7 @@ F: drivers/crypto/qat/
QCOM AUDIO (ASoC) DRIVERS
M:	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
M:	Banajit Goswami <bgoswami@codeaurora.org>
M:	Banajit Goswami <bgoswami@quicinc.com>
L:	alsa-devel@alsa-project.org (moderated for non-subscribers)
S:	Supported
F:	sound/soc/codecs/lpass-va-macro.c
+8 −7
Original line number Diff line number Diff line
@@ -1880,8 +1880,7 @@ static int _regmap_raw_write_impl(struct regmap *map, unsigned int reg,
 */
bool regmap_can_raw_write(struct regmap *map)
{
	return map->bus && map->bus->write && map->format.format_val &&
		map->format.format_reg;
	return map->write && map->format.format_val && map->format.format_reg;
}
EXPORT_SYMBOL_GPL(regmap_can_raw_write);

@@ -2155,10 +2154,9 @@ int regmap_noinc_write(struct regmap *map, unsigned int reg,
	size_t write_len;
	int ret;

	if (!map->bus)
		return -EINVAL;
	if (!map->bus->write)
	if (!map->write)
		return -ENOTSUPP;

	if (val_len % map->format.val_bytes)
		return -EINVAL;
	if (!IS_ALIGNED(reg, map->reg_stride))
@@ -2300,7 +2298,7 @@ int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
	 * Some devices don't support bulk write, for them we have a series of
	 * single write operations.
	 */
	if (!map->bus || !map->format.parse_inplace) {
	if (!map->write || !map->format.parse_inplace) {
		map->lock(map->lock_arg);
		for (i = 0; i < val_count; i++) {
			unsigned int ival;
@@ -2926,6 +2924,9 @@ int regmap_noinc_read(struct regmap *map, unsigned int reg,
	size_t read_len;
	int ret;

	if (!map->read)
		return -ENOTSUPP;

	if (val_len % map->format.val_bytes)
		return -EINVAL;
	if (!IS_ALIGNED(reg, map->reg_stride))
@@ -3039,7 +3040,7 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
	if (val_count == 0)
		return -EINVAL;

	if (map->format.parse_inplace && (vol || map->cache_type == REGCACHE_NONE)) {
	if (map->read && map->format.parse_inplace && (vol || map->cache_type == REGCACHE_NONE)) {
		ret = regmap_raw_read(map, reg, val, val_bytes * val_count);
		if (ret != 0)
			return ret;
+6 −6
Original line number Diff line number Diff line
@@ -333,7 +333,7 @@ static const struct snd_kcontrol_new cs35l41_aud_controls[] = {
	SOC_SINGLE("HW Noise Gate Enable", CS35L41_NG_CFG, 8, 63, 0),
	SOC_SINGLE("HW Noise Gate Delay", CS35L41_NG_CFG, 4, 7, 0),
	SOC_SINGLE("HW Noise Gate Threshold", CS35L41_NG_CFG, 0, 7, 0),
	SOC_SINGLE("Aux Noise Gate CH1 Enable",
	SOC_SINGLE("Aux Noise Gate CH1 Switch",
		   CS35L41_MIXER_NGATE_CH1_CFG, 16, 1, 0),
	SOC_SINGLE("Aux Noise Gate CH1 Entry Delay",
		   CS35L41_MIXER_NGATE_CH1_CFG, 8, 15, 0),
@@ -341,15 +341,15 @@ static const struct snd_kcontrol_new cs35l41_aud_controls[] = {
		   CS35L41_MIXER_NGATE_CH1_CFG, 0, 7, 0),
	SOC_SINGLE("Aux Noise Gate CH2 Entry Delay",
		   CS35L41_MIXER_NGATE_CH2_CFG, 8, 15, 0),
	SOC_SINGLE("Aux Noise Gate CH2 Enable",
	SOC_SINGLE("Aux Noise Gate CH2 Switch",
		   CS35L41_MIXER_NGATE_CH2_CFG, 16, 1, 0),
	SOC_SINGLE("Aux Noise Gate CH2 Threshold",
		   CS35L41_MIXER_NGATE_CH2_CFG, 0, 7, 0),
	SOC_SINGLE("SCLK Force", CS35L41_SP_FORMAT, CS35L41_SCLK_FRC_SHIFT, 1, 0),
	SOC_SINGLE("LRCLK Force", CS35L41_SP_FORMAT, CS35L41_LRCLK_FRC_SHIFT, 1, 0),
	SOC_SINGLE("Invert Class D", CS35L41_AMP_DIG_VOL_CTRL,
	SOC_SINGLE("SCLK Force Switch", CS35L41_SP_FORMAT, CS35L41_SCLK_FRC_SHIFT, 1, 0),
	SOC_SINGLE("LRCLK Force Switch", CS35L41_SP_FORMAT, CS35L41_LRCLK_FRC_SHIFT, 1, 0),
	SOC_SINGLE("Invert Class D Switch", CS35L41_AMP_DIG_VOL_CTRL,
		   CS35L41_AMP_INV_PCM_SHIFT, 1, 0),
	SOC_SINGLE("Amp Gain ZC", CS35L41_AMP_GAIN_CTRL,
	SOC_SINGLE("Amp Gain ZC Switch", CS35L41_AMP_GAIN_CTRL,
		   CS35L41_AMP_GAIN_ZC_SHIFT, 1, 0),
	WM_ADSP2_PRELOAD_SWITCH("DSP1", 1),
	WM_ADSP_FW_CONTROL("DSP1", 0),
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ static int rt711_sdca_index_write(struct rt711_sdca_priv *rt711,

	ret = regmap_write(regmap, addr, value);
	if (ret < 0)
		dev_err(rt711->component->dev,
		dev_err(&rt711->slave->dev,
			"Failed to set private value: %06x <= %04x ret=%d\n",
			addr, value, ret);

@@ -50,7 +50,7 @@ static int rt711_sdca_index_read(struct rt711_sdca_priv *rt711,

	ret = regmap_read(regmap, addr, value);
	if (ret < 0)
		dev_err(rt711->component->dev,
		dev_err(&rt711->slave->dev,
			"Failed to get private value: %06x => %04x ret=%d\n",
			addr, *value, ret);

+6 −2
Original line number Diff line number Diff line
@@ -413,6 +413,7 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol,
	unsigned int rnew = (!!ucontrol->value.integer.value[1]) << mc->rshift;
	unsigned int lold, rold;
	unsigned int lena, rena;
	bool change = false;
	int ret;

	snd_soc_dapm_mutex_lock(dapm);
@@ -440,8 +441,8 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol,
		goto err;
	}

	ret = regmap_update_bits(arizona->regmap, ARIZONA_DRE_ENABLE,
				 mask, lnew | rnew);
	ret = regmap_update_bits_check(arizona->regmap, ARIZONA_DRE_ENABLE,
				       mask, lnew | rnew, &change);
	if (ret) {
		dev_err(arizona->dev, "Failed to set DRE: %d\n", ret);
		goto err;
@@ -454,6 +455,9 @@ static int wm5110_put_dre(struct snd_kcontrol *kcontrol,
	if (!rnew && rold)
		wm5110_clear_pga_volume(arizona, mc->rshift);

	if (change)
		ret = 1;

err:
	snd_soc_dapm_mutex_unlock(dapm);

Loading