Commit 42e0ebde authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/fix/nau8825', 'asoc/fix/rt5645',...

Merge remote-tracking branches 'asoc/fix/nau8825', 'asoc/fix/rt5645', 'asoc/fix/tlv320aic3x' and 'asoc/fix/topology' into asoc-linus
...@@ -561,9 +561,9 @@ static void nau8825_xtalk_prepare(struct nau8825 *nau8825) ...@@ -561,9 +561,9 @@ static void nau8825_xtalk_prepare(struct nau8825 *nau8825)
nau8825_xtalk_backup(nau8825); nau8825_xtalk_backup(nau8825);
/* Config IIS as master to output signal by codec */ /* Config IIS as master to output signal by codec */
regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2,
NAU8825_I2S_MS_MASK | NAU8825_I2S_DRV_MASK | NAU8825_I2S_MS_MASK | NAU8825_I2S_LRC_DIV_MASK |
NAU8825_I2S_BLK_DIV_MASK, NAU8825_I2S_MS_MASTER | NAU8825_I2S_BLK_DIV_MASK, NAU8825_I2S_MS_MASTER |
(0x2 << NAU8825_I2S_DRV_SFT) | 0x1); (0x2 << NAU8825_I2S_LRC_DIV_SFT) | 0x1);
/* Ramp up headphone volume to 0dB to get better performance and /* Ramp up headphone volume to 0dB to get better performance and
* avoid pop noise in headphone. * avoid pop noise in headphone.
*/ */
...@@ -657,7 +657,7 @@ static void nau8825_xtalk_clean(struct nau8825 *nau8825) ...@@ -657,7 +657,7 @@ static void nau8825_xtalk_clean(struct nau8825 *nau8825)
NAU8825_IRQ_RMS_EN, NAU8825_IRQ_RMS_EN); NAU8825_IRQ_RMS_EN, NAU8825_IRQ_RMS_EN);
/* Recover default value for IIS */ /* Recover default value for IIS */
regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2,
NAU8825_I2S_MS_MASK | NAU8825_I2S_DRV_MASK | NAU8825_I2S_MS_MASK | NAU8825_I2S_LRC_DIV_MASK |
NAU8825_I2S_BLK_DIV_MASK, NAU8825_I2S_MS_SLAVE); NAU8825_I2S_BLK_DIV_MASK, NAU8825_I2S_MS_SLAVE);
/* Restore value of specific register for cross talk */ /* Restore value of specific register for cross talk */
nau8825_xtalk_restore(nau8825); nau8825_xtalk_restore(nau8825);
...@@ -2006,7 +2006,8 @@ static void nau8825_fll_apply(struct nau8825 *nau8825, ...@@ -2006,7 +2006,8 @@ static void nau8825_fll_apply(struct nau8825 *nau8825,
NAU8825_FLL_INTEGER_MASK, fll_param->fll_int); NAU8825_FLL_INTEGER_MASK, fll_param->fll_int);
/* FLL pre-scaler */ /* FLL pre-scaler */
regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL4, regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL4,
NAU8825_FLL_REF_DIV_MASK, fll_param->clk_ref_div); NAU8825_FLL_REF_DIV_MASK,
fll_param->clk_ref_div << NAU8825_FLL_REF_DIV_SFT);
/* select divided VCO input */ /* select divided VCO input */
regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5, regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5,
NAU8825_FLL_CLK_SW_MASK, NAU8825_FLL_CLK_SW_REF); NAU8825_FLL_CLK_SW_MASK, NAU8825_FLL_CLK_SW_REF);
......
...@@ -137,7 +137,8 @@ ...@@ -137,7 +137,8 @@
#define NAU8825_FLL_CLK_SRC_FS (0x3 << NAU8825_FLL_CLK_SRC_SFT) #define NAU8825_FLL_CLK_SRC_FS (0x3 << NAU8825_FLL_CLK_SRC_SFT)
/* FLL4 (0x07) */ /* FLL4 (0x07) */
#define NAU8825_FLL_REF_DIV_MASK (0x3 << 10) #define NAU8825_FLL_REF_DIV_SFT 10
#define NAU8825_FLL_REF_DIV_MASK (0x3 << NAU8825_FLL_REF_DIV_SFT)
/* FLL5 (0x08) */ /* FLL5 (0x08) */
#define NAU8825_FLL_PDB_DAC_EN (0x1 << 15) #define NAU8825_FLL_PDB_DAC_EN (0x1 << 15)
...@@ -247,8 +248,8 @@ ...@@ -247,8 +248,8 @@
/* I2S_PCM_CTRL2 (0x1d) */ /* I2S_PCM_CTRL2 (0x1d) */
#define NAU8825_I2S_TRISTATE (1 << 15) /* 0 - normal mode, 1 - Hi-Z output */ #define NAU8825_I2S_TRISTATE (1 << 15) /* 0 - normal mode, 1 - Hi-Z output */
#define NAU8825_I2S_DRV_SFT 12 #define NAU8825_I2S_LRC_DIV_SFT 12
#define NAU8825_I2S_DRV_MASK (0x3 << NAU8825_I2S_DRV_SFT) #define NAU8825_I2S_LRC_DIV_MASK (0x3 << NAU8825_I2S_LRC_DIV_SFT)
#define NAU8825_I2S_MS_SFT 3 #define NAU8825_I2S_MS_SFT 3
#define NAU8825_I2S_MS_MASK (1 << NAU8825_I2S_MS_SFT) #define NAU8825_I2S_MS_MASK (1 << NAU8825_I2S_MS_SFT)
#define NAU8825_I2S_MS_MASTER (1 << NAU8825_I2S_MS_SFT) #define NAU8825_I2S_MS_MASTER (1 << NAU8825_I2S_MS_SFT)
......
...@@ -3833,6 +3833,9 @@ static int rt5645_i2c_probe(struct i2c_client *i2c, ...@@ -3833,6 +3833,9 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
} }
} }
regmap_update_bits(rt5645->regmap, RT5645_ADDA_CLK1,
RT5645_I2S_PD1_MASK, RT5645_I2S_PD1_2);
if (rt5645->pdata.jd_invert) { if (rt5645->pdata.jd_invert) {
regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2, regmap_update_bits(rt5645->regmap, RT5645_IRQ_CTRL2,
RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV); RT5645_JD_1_1_MASK, RT5645_JD_1_1_INV);
......
...@@ -126,6 +126,16 @@ static const struct reg_default aic3x_reg[] = { ...@@ -126,6 +126,16 @@ static const struct reg_default aic3x_reg[] = {
{ 108, 0x00 }, { 109, 0x00 }, { 108, 0x00 }, { 109, 0x00 },
}; };
static bool aic3x_volatile_reg(struct device *dev, unsigned int reg)
{
switch (reg) {
case AIC3X_RESET:
return true;
default:
return false;
}
}
static const struct regmap_config aic3x_regmap = { static const struct regmap_config aic3x_regmap = {
.reg_bits = 8, .reg_bits = 8,
.val_bits = 8, .val_bits = 8,
...@@ -133,6 +143,9 @@ static const struct regmap_config aic3x_regmap = { ...@@ -133,6 +143,9 @@ static const struct regmap_config aic3x_regmap = {
.max_register = DAC_ICC_ADJ, .max_register = DAC_ICC_ADJ,
.reg_defaults = aic3x_reg, .reg_defaults = aic3x_reg,
.num_reg_defaults = ARRAY_SIZE(aic3x_reg), .num_reg_defaults = ARRAY_SIZE(aic3x_reg),
.volatile_reg = aic3x_volatile_reg,
.cache_type = REGCACHE_RBTREE, .cache_type = REGCACHE_RBTREE,
}; };
......
...@@ -514,13 +514,12 @@ static void remove_widget(struct snd_soc_component *comp, ...@@ -514,13 +514,12 @@ static void remove_widget(struct snd_soc_component *comp,
== SND_SOC_TPLG_TYPE_MIXER) == SND_SOC_TPLG_TYPE_MIXER)
kfree(kcontrol->tlv.p); kfree(kcontrol->tlv.p);
snd_ctl_remove(card, kcontrol);
/* Private value is used as struct soc_mixer_control /* Private value is used as struct soc_mixer_control
* for volume mixers or soc_bytes_ext for bytes * for volume mixers or soc_bytes_ext for bytes
* controls. * controls.
*/ */
kfree((void *)kcontrol->private_value); kfree((void *)kcontrol->private_value);
snd_ctl_remove(card, kcontrol);
} }
kfree(w->kcontrol_news); kfree(w->kcontrol_news);
} }
......
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