ASoC: Fixes for v6.1
Some more fixes for v6.1, some of these are very old and were originally intended to get sent for v5.18 but got lost in the shuffle when there was an issue with Linus not liking my branching strategy and I rebuilt bits of my workflow. The ops changes have been validated by people looking at real hardware and are how things getting dropped got noticed. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmOHg3AACgkQJNaLcl1U h9AO+gf8C1E6GHk6UI3mU/xYCap0KgJavCVEJKExal2/pgCtCheC8OutFRAepsEM mnbhfNImFEEkD/3YfdhH22XqavDE+fN0DSfFhkdiEbsfPTrHhc+PeWU8aQzEyOxT tND7X01tmkWojmmoWJcVAv/z7hW1vF3FE/RUOiXHi3M7LhlJiSMy2ZkxHC9AEIz/ 3jyahc2LbzZ5SuIo+c8kSoErg/mZ8zI2KlAGx3afpFAHUiGkSVWmhl4XOQ+1lozQ dv4JtPMDx7SsM06GXUcvVTf6RI8QZQq6ohfz02BK7+NqD+odRrg3WlbabcTLvi1k LpNg5saPWYx8JVwHu9ggLtNfE5TAVQ== =T8ew -----END PGP SIGNATURE----- Merge tag 'asoc-fix-v6.1-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.1 Some more fixes for v6.1, some of these are very old and were originally intended to get sent for v5.18 but got lost in the shuffle when there was an issue with Linus not liking my branching strategy and I rebuilt bits of my workflow. The ops changes have been validated by people looking at real hardware and are how things getting dropped got noticed.
This commit is contained in:
commit
b47068b4aa
|
@ -143,7 +143,7 @@ static const struct snd_kcontrol_new cs42l51_snd_controls[] = {
|
|||
0, 0xA0, 96, adc_att_tlv),
|
||||
SOC_DOUBLE_R_SX_TLV("PGA Volume",
|
||||
CS42L51_ALC_PGA_CTL, CS42L51_ALC_PGB_CTL,
|
||||
0, 0x19, 30, pga_tlv),
|
||||
0, 0x1A, 30, pga_tlv),
|
||||
SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0),
|
||||
SOC_SINGLE("Auto-Mute Switch", CS42L51_DAC_CTL, 2, 1, 0),
|
||||
SOC_SINGLE("Soft Ramp Switch", CS42L51_DAC_CTL, 1, 1, 0),
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include <dt-bindings/sound/tlv320adc3xxx.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/io.h>
|
||||
|
@ -1025,7 +1026,9 @@ static const struct gpio_chip adc3xxx_gpio_chip = {
|
|||
|
||||
static void adc3xxx_free_gpio(struct adc3xxx *adc3xxx)
|
||||
{
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
gpiochip_remove(&adc3xxx->gpio_chip);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void adc3xxx_init_gpio(struct adc3xxx *adc3xxx)
|
||||
|
|
|
@ -194,6 +194,25 @@ static int fsl_micfil_reset(struct device *dev)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* SRES is self-cleared bit, but REG_MICFIL_CTRL1 is defined
|
||||
* as non-volatile register, so SRES still remain in regmap
|
||||
* cache after set, that every update of REG_MICFIL_CTRL1,
|
||||
* software reset happens. so clear it explicitly.
|
||||
*/
|
||||
ret = regmap_clear_bits(micfil->regmap, REG_MICFIL_CTRL1,
|
||||
MICFIL_CTRL1_SRES);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Set SRES should clear CHnF flags, But even add delay here
|
||||
* the CHnF may not be cleared sometimes, so clear CHnF explicitly.
|
||||
*/
|
||||
ret = regmap_write_bits(micfil->regmap, REG_MICFIL_STAT, 0xFF, 0xFF);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -452,7 +452,7 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
|
|||
val = ucontrol->value.integer.value[0];
|
||||
if (mc->platform_max && val > mc->platform_max)
|
||||
return -EINVAL;
|
||||
if (val > max - min)
|
||||
if (val > max)
|
||||
return -EINVAL;
|
||||
val_mask = mask << shift;
|
||||
val = (val + min) & mask;
|
||||
|
@ -464,10 +464,15 @@ int snd_soc_put_volsw_sx(struct snd_kcontrol *kcontrol,
|
|||
ret = err;
|
||||
|
||||
if (snd_soc_volsw_is_stereo(mc)) {
|
||||
unsigned int val2;
|
||||
unsigned int val2 = ucontrol->value.integer.value[1];
|
||||
|
||||
if (mc->platform_max && val2 > mc->platform_max)
|
||||
return -EINVAL;
|
||||
if (val2 > max)
|
||||
return -EINVAL;
|
||||
|
||||
val_mask = mask << rshift;
|
||||
val2 = (ucontrol->value.integer.value[1] + min) & mask;
|
||||
val2 = (val2 + min) & mask;
|
||||
val2 = val2 << rshift;
|
||||
|
||||
err = snd_soc_component_update_bits(component, reg2, val_mask,
|
||||
|
|
Loading…
Reference in New Issue