Merge remote-tracking branches 'asoc/fix/audmux', 'asoc/fix/cs42l52', 'asoc/fix/fsl-esai', 'asoc/fix/fsl-spdif', 'asoc/fix/rcar', 'asoc/fix/tlv320aic31xx' and 'asoc/fix/wm8962' into asoc-linus
This commit is contained in:
Коммит
f9a405961e
|
@ -13,6 +13,9 @@ Required properties:
|
|||
"ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP)
|
||||
|
||||
- reg - <int> - I2C slave address
|
||||
- HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply,
|
||||
DVDD-supply : power supplies for the device as covered in
|
||||
Documentation/devicetree/bindings/regulator/regulator.txt
|
||||
|
||||
|
||||
Optional properties:
|
||||
|
@ -24,9 +27,6 @@ Optional properties:
|
|||
3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD
|
||||
If this node is not mentioned or if the value is unknown, then
|
||||
micbias is set to 2.0V.
|
||||
- HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply,
|
||||
DVDD-supply : power supplies for the device as covered in
|
||||
Documentation/devicetree/bindings/regulator/regulator.txt
|
||||
|
||||
CODEC output pins:
|
||||
* HPL
|
||||
|
|
|
@ -1229,8 +1229,10 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client,
|
|||
}
|
||||
|
||||
if (cs42l52->pdata.reset_gpio) {
|
||||
ret = gpio_request_one(cs42l52->pdata.reset_gpio,
|
||||
GPIOF_OUT_INIT_HIGH, "CS42L52 /RST");
|
||||
ret = devm_gpio_request_one(&i2c_client->dev,
|
||||
cs42l52->pdata.reset_gpio,
|
||||
GPIOF_OUT_INIT_HIGH,
|
||||
"CS42L52 /RST");
|
||||
if (ret < 0) {
|
||||
dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n",
|
||||
cs42l52->pdata.reset_gpio, ret);
|
||||
|
|
|
@ -376,7 +376,7 @@ static int aic31xx_dapm_power_event(struct snd_soc_dapm_widget *w,
|
|||
reg = AIC31XX_ADCFLAG;
|
||||
break;
|
||||
default:
|
||||
dev_err(w->codec->dev, "Unknown widget '%s' calling %s/n",
|
||||
dev_err(w->codec->dev, "Unknown widget '%s' calling %s\n",
|
||||
w->name, __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -154,6 +154,7 @@ static struct reg_default wm8962_reg[] = {
|
|||
{ 40, 0x0000 }, /* R40 - SPKOUTL volume */
|
||||
{ 41, 0x0000 }, /* R41 - SPKOUTR volume */
|
||||
|
||||
{ 49, 0x0010 }, /* R49 - Class D Control 1 */
|
||||
{ 51, 0x0003 }, /* R51 - Class D Control 2 */
|
||||
|
||||
{ 56, 0x0506 }, /* R56 - Clocking 4 */
|
||||
|
@ -795,7 +796,6 @@ static bool wm8962_volatile_register(struct device *dev, unsigned int reg)
|
|||
case WM8962_ALC2:
|
||||
case WM8962_THERMAL_SHUTDOWN_STATUS:
|
||||
case WM8962_ADDITIONAL_CONTROL_4:
|
||||
case WM8962_CLASS_D_CONTROL_1:
|
||||
case WM8962_DC_SERVO_6:
|
||||
case WM8962_INTERRUPT_STATUS_1:
|
||||
case WM8962_INTERRUPT_STATUS_2:
|
||||
|
@ -2929,13 +2929,22 @@ static int wm8962_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
|
|||
static int wm8962_mute(struct snd_soc_dai *dai, int mute)
|
||||
{
|
||||
struct snd_soc_codec *codec = dai->codec;
|
||||
int val;
|
||||
int val, ret;
|
||||
|
||||
if (mute)
|
||||
val = WM8962_DAC_MUTE;
|
||||
val = WM8962_DAC_MUTE | WM8962_DAC_MUTE_ALT;
|
||||
else
|
||||
val = 0;
|
||||
|
||||
/**
|
||||
* The DAC mute bit is mirrored in two registers, update both to keep
|
||||
* the register cache consistent.
|
||||
*/
|
||||
ret = snd_soc_update_bits(codec, WM8962_CLASS_D_CONTROL_1,
|
||||
WM8962_DAC_MUTE_ALT, val);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return snd_soc_update_bits(codec, WM8962_ADC_DAC_CONTROL_1,
|
||||
WM8962_DAC_MUTE, val);
|
||||
}
|
||||
|
|
|
@ -1954,6 +1954,10 @@
|
|||
#define WM8962_SPKOUTL_ENA_MASK 0x0040 /* SPKOUTL_ENA */
|
||||
#define WM8962_SPKOUTL_ENA_SHIFT 6 /* SPKOUTL_ENA */
|
||||
#define WM8962_SPKOUTL_ENA_WIDTH 1 /* SPKOUTL_ENA */
|
||||
#define WM8962_DAC_MUTE_ALT 0x0010 /* DAC_MUTE */
|
||||
#define WM8962_DAC_MUTE_ALT_MASK 0x0010 /* DAC_MUTE */
|
||||
#define WM8962_DAC_MUTE_ALT_SHIFT 4 /* DAC_MUTE */
|
||||
#define WM8962_DAC_MUTE_ALT_WIDTH 1 /* DAC_MUTE */
|
||||
#define WM8962_SPKOUTL_PGA_MUTE 0x0002 /* SPKOUTL_PGA_MUTE */
|
||||
#define WM8962_SPKOUTL_PGA_MUTE_MASK 0x0002 /* SPKOUTL_PGA_MUTE */
|
||||
#define WM8962_SPKOUTL_PGA_MUTE_SHIFT 1 /* SPKOUTL_PGA_MUTE */
|
||||
|
|
|
@ -258,10 +258,16 @@ static int fsl_esai_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (ratio == 1) {
|
||||
/* Only EXTAL source can be output directly without using PSR and PM */
|
||||
if (ratio == 1 && clksrc == esai_priv->extalclk) {
|
||||
/* Bypass all the dividers if not being needed */
|
||||
ecr |= tx ? ESAI_ECR_ETO : ESAI_ECR_ERO;
|
||||
goto out;
|
||||
} else if (ratio < 2) {
|
||||
/* The ratio should be no less than 2 if using other sources */
|
||||
dev_err(dai->dev, "failed to derive required HCK%c rate\n",
|
||||
tx ? 'T' : 'R');
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = fsl_esai_divisor_cal(dai, tx, ratio, false, 0);
|
||||
|
@ -307,7 +313,8 @@ static int fsl_esai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (esai_priv->sck_div[tx] && (ratio > 16 || ratio == 0)) {
|
||||
/* The ratio should be contented by FP alone if bypassing PM and PSR */
|
||||
if (!esai_priv->sck_div[tx] && (ratio > 16 || ratio == 0)) {
|
||||
dev_err(dai->dev, "the ratio is out of range (1 ~ 16)\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -454,12 +461,6 @@ static int fsl_esai_startup(struct snd_pcm_substream *substream,
|
|||
}
|
||||
|
||||
if (!dai->active) {
|
||||
/* Reset Port C */
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_PRRC,
|
||||
ESAI_PRRC_PDC_MASK, ESAI_PRRC_PDC(ESAI_GPIO));
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_PCRC,
|
||||
ESAI_PCRC_PC_MASK, ESAI_PCRC_PC(ESAI_GPIO));
|
||||
|
||||
/* Set synchronous mode */
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_SAICR,
|
||||
ESAI_SAICR_SYNC, esai_priv->synchronous ?
|
||||
|
@ -519,6 +520,11 @@ static int fsl_esai_hw_params(struct snd_pcm_substream *substream,
|
|||
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_xCR(tx), mask, val);
|
||||
|
||||
/* Remove ESAI personal reset by configuring ESAI_PCRC and ESAI_PRRC */
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_PRRC,
|
||||
ESAI_PRRC_PDC_MASK, ESAI_PRRC_PDC(ESAI_GPIO));
|
||||
regmap_update_bits(esai_priv->regmap, REG_ESAI_PCRC,
|
||||
ESAI_PCRC_PC_MASK, ESAI_PCRC_PC(ESAI_GPIO));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -144,8 +144,8 @@ enum spdif_gainsel {
|
|||
|
||||
/* SPDIF Clock register */
|
||||
#define STC_SYSCLK_DIV_OFFSET 11
|
||||
#define STC_SYSCLK_DIV_MASK (0x1ff << STC_TXCLK_SRC_OFFSET)
|
||||
#define STC_SYSCLK_DIV(x) ((((x) - 1) << STC_TXCLK_DIV_OFFSET) & STC_SYSCLK_DIV_MASK)
|
||||
#define STC_SYSCLK_DIV_MASK (0x1ff << STC_SYSCLK_DIV_OFFSET)
|
||||
#define STC_SYSCLK_DIV(x) ((((x) - 1) << STC_SYSCLK_DIV_OFFSET) & STC_SYSCLK_DIV_MASK)
|
||||
#define STC_TXCLK_SRC_OFFSET 8
|
||||
#define STC_TXCLK_SRC_MASK (0x7 << STC_TXCLK_SRC_OFFSET)
|
||||
#define STC_TXCLK_SRC_SET(x) ((x << STC_TXCLK_SRC_OFFSET) & STC_TXCLK_SRC_MASK)
|
||||
|
|
|
@ -197,13 +197,12 @@ static void rsnd_dma_complete(void *data)
|
|||
* rsnd_dai_pointer_update() will be called twice,
|
||||
* ant it will breaks io->byte_pos
|
||||
*/
|
||||
|
||||
rsnd_dai_pointer_update(io, io->byte_per_period);
|
||||
|
||||
if (dma->submit_loop)
|
||||
rsnd_dma_continue(dma);
|
||||
|
||||
rsnd_unlock(priv, flags);
|
||||
|
||||
rsnd_dai_pointer_update(io, io->byte_per_period);
|
||||
}
|
||||
|
||||
static void __rsnd_dma_start(struct rsnd_dma *dma)
|
||||
|
|
|
@ -258,7 +258,7 @@ static int rsnd_src_init(struct rsnd_mod *mod,
|
|||
{
|
||||
struct rsnd_src *src = rsnd_mod_to_src(mod);
|
||||
|
||||
clk_enable(src->clk);
|
||||
clk_prepare_enable(src->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -269,7 +269,7 @@ static int rsnd_src_quit(struct rsnd_mod *mod,
|
|||
{
|
||||
struct rsnd_src *src = rsnd_mod_to_src(mod);
|
||||
|
||||
clk_disable(src->clk);
|
||||
clk_disable_unprepare(src->clk);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ static void rsnd_ssi_hw_start(struct rsnd_ssi *ssi,
|
|||
u32 cr;
|
||||
|
||||
if (0 == ssi->usrcnt) {
|
||||
clk_enable(ssi->clk);
|
||||
clk_prepare_enable(ssi->clk);
|
||||
|
||||
if (rsnd_dai_is_clk_master(rdai)) {
|
||||
if (rsnd_ssi_clk_from_parent(ssi))
|
||||
|
@ -230,7 +230,7 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi,
|
|||
rsnd_ssi_master_clk_stop(ssi);
|
||||
}
|
||||
|
||||
clk_disable(ssi->clk);
|
||||
clk_disable_unprepare(ssi->clk);
|
||||
}
|
||||
|
||||
dev_dbg(dev, "ssi%d hw stopped\n", rsnd_mod_id(&ssi->mod));
|
||||
|
|
Загрузка…
Ссылка в новой задаче