Loading sound/soc/codecs/cs35l41-lib.c +8 −2 Original line number Diff line number Diff line Loading @@ -37,8 +37,8 @@ static const struct reg_default cs35l41_reg[] = { { CS35L41_DAC_PCM1_SRC, 0x00000008 }, { CS35L41_ASP_TX1_SRC, 0x00000018 }, { CS35L41_ASP_TX2_SRC, 0x00000019 }, { CS35L41_ASP_TX3_SRC, 0x00000020 }, { CS35L41_ASP_TX4_SRC, 0x00000021 }, { CS35L41_ASP_TX3_SRC, 0x00000000 }, { CS35L41_ASP_TX4_SRC, 0x00000000 }, { CS35L41_DSP1_RX1_SRC, 0x00000008 }, { CS35L41_DSP1_RX2_SRC, 0x00000009 }, { CS35L41_DSP1_RX3_SRC, 0x00000018 }, Loading Loading @@ -644,6 +644,8 @@ static const struct reg_sequence cs35l41_reva0_errata_patch[] = { { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 }, { CS35L41_PWR_CTRL2, 0x00000000 }, { CS35L41_AMP_GAIN_CTRL, 0x00000000 }, { CS35L41_ASP_TX3_SRC, 0x00000000 }, { CS35L41_ASP_TX4_SRC, 0x00000000 }, }; static const struct reg_sequence cs35l41_revb0_errata_patch[] = { Loading @@ -655,6 +657,8 @@ static const struct reg_sequence cs35l41_revb0_errata_patch[] = { { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 }, { CS35L41_PWR_CTRL2, 0x00000000 }, { CS35L41_AMP_GAIN_CTRL, 0x00000000 }, { CS35L41_ASP_TX3_SRC, 0x00000000 }, { CS35L41_ASP_TX4_SRC, 0x00000000 }, }; static const struct reg_sequence cs35l41_revb2_errata_patch[] = { Loading @@ -666,6 +670,8 @@ static const struct reg_sequence cs35l41_revb2_errata_patch[] = { { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 }, { CS35L41_PWR_CTRL2, 0x00000000 }, { CS35L41_AMP_GAIN_CTRL, 0x00000000 }, { CS35L41_ASP_TX3_SRC, 0x00000000 }, { CS35L41_ASP_TX4_SRC, 0x00000000 }, }; static const struct reg_sequence cs35l41_fs_errata_patch[] = { Loading sound/soc/codecs/cs47l15.c +4 −1 Original line number Diff line number Diff line Loading @@ -122,6 +122,9 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, snd_soc_kcontrol_component(kcontrol); struct cs47l15 *cs47l15 = snd_soc_component_get_drvdata(component); if (!!ucontrol->value.integer.value[0] == cs47l15->in1_lp_mode) return 0; switch (ucontrol->value.integer.value[0]) { case 0: /* Set IN1 to normal mode */ Loading Loading @@ -150,7 +153,7 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, break; } return 0; return 1; } static const struct snd_kcontrol_new cs47l15_snd_controls[] = { Loading sound/soc/codecs/madera.c +10 −4 Original line number Diff line number Diff line Loading @@ -618,7 +618,13 @@ int madera_out1_demux_put(struct snd_kcontrol *kcontrol, end: snd_soc_dapm_mutex_unlock(dapm); return snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL); ret = snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL); if (ret < 0) { dev_err(madera->dev, "Failed to update demux power state: %d\n", ret); return ret; } return change; } EXPORT_SYMBOL_GPL(madera_out1_demux_put); Loading Loading @@ -893,7 +899,7 @@ static int madera_adsp_rate_put(struct snd_kcontrol *kcontrol, struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; const int adsp_num = e->shift_l; const unsigned int item = ucontrol->value.enumerated.item[0]; int ret; int ret = 0; if (item >= e->items) return -EINVAL; Loading @@ -910,10 +916,10 @@ static int madera_adsp_rate_put(struct snd_kcontrol *kcontrol, "Cannot change '%s' while in use by active audio paths\n", kcontrol->id.name); ret = -EBUSY; } else { } else if (priv->adsp_rate_cache[adsp_num] != e->values[item]) { /* Volatile register so defer until the codec is powered up */ priv->adsp_rate_cache[adsp_num] = e->values[item]; ret = 0; ret = 1; } mutex_unlock(&priv->rate_lock); Loading sound/soc/codecs/sgtl5000.c +9 −0 Original line number Diff line number Diff line Loading @@ -1795,6 +1795,9 @@ static int sgtl5000_i2c_remove(struct i2c_client *client) { struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client); regmap_write(sgtl5000->regmap, SGTL5000_CHIP_DIG_POWER, SGTL5000_DIG_POWER_DEFAULT); regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, SGTL5000_ANA_POWER_DEFAULT); clk_disable_unprepare(sgtl5000->mclk); regulator_bulk_disable(sgtl5000->num_supplies, sgtl5000->supplies); regulator_bulk_free(sgtl5000->num_supplies, sgtl5000->supplies); Loading @@ -1802,6 +1805,11 @@ static int sgtl5000_i2c_remove(struct i2c_client *client) return 0; } static void sgtl5000_i2c_shutdown(struct i2c_client *client) { sgtl5000_i2c_remove(client); } static const struct i2c_device_id sgtl5000_id[] = { {"sgtl5000", 0}, {}, Loading @@ -1822,6 +1830,7 @@ static struct i2c_driver sgtl5000_i2c_driver = { }, .probe_new = sgtl5000_i2c_probe, .remove = sgtl5000_i2c_remove, .shutdown = sgtl5000_i2c_shutdown, .id_table = sgtl5000_id, }; Loading sound/soc/codecs/sgtl5000.h +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ /* * SGTL5000_CHIP_DIG_POWER */ #define SGTL5000_DIG_POWER_DEFAULT 0x0000 #define SGTL5000_ADC_EN 0x0040 #define SGTL5000_DAC_EN 0x0020 #define SGTL5000_DAP_POWERUP 0x0010 Loading Loading
sound/soc/codecs/cs35l41-lib.c +8 −2 Original line number Diff line number Diff line Loading @@ -37,8 +37,8 @@ static const struct reg_default cs35l41_reg[] = { { CS35L41_DAC_PCM1_SRC, 0x00000008 }, { CS35L41_ASP_TX1_SRC, 0x00000018 }, { CS35L41_ASP_TX2_SRC, 0x00000019 }, { CS35L41_ASP_TX3_SRC, 0x00000020 }, { CS35L41_ASP_TX4_SRC, 0x00000021 }, { CS35L41_ASP_TX3_SRC, 0x00000000 }, { CS35L41_ASP_TX4_SRC, 0x00000000 }, { CS35L41_DSP1_RX1_SRC, 0x00000008 }, { CS35L41_DSP1_RX2_SRC, 0x00000009 }, { CS35L41_DSP1_RX3_SRC, 0x00000018 }, Loading Loading @@ -644,6 +644,8 @@ static const struct reg_sequence cs35l41_reva0_errata_patch[] = { { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 }, { CS35L41_PWR_CTRL2, 0x00000000 }, { CS35L41_AMP_GAIN_CTRL, 0x00000000 }, { CS35L41_ASP_TX3_SRC, 0x00000000 }, { CS35L41_ASP_TX4_SRC, 0x00000000 }, }; static const struct reg_sequence cs35l41_revb0_errata_patch[] = { Loading @@ -655,6 +657,8 @@ static const struct reg_sequence cs35l41_revb0_errata_patch[] = { { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 }, { CS35L41_PWR_CTRL2, 0x00000000 }, { CS35L41_AMP_GAIN_CTRL, 0x00000000 }, { CS35L41_ASP_TX3_SRC, 0x00000000 }, { CS35L41_ASP_TX4_SRC, 0x00000000 }, }; static const struct reg_sequence cs35l41_revb2_errata_patch[] = { Loading @@ -666,6 +670,8 @@ static const struct reg_sequence cs35l41_revb2_errata_patch[] = { { CS35L41_DSP1_XM_ACCEL_PL0_PRI, 0x00000000 }, { CS35L41_PWR_CTRL2, 0x00000000 }, { CS35L41_AMP_GAIN_CTRL, 0x00000000 }, { CS35L41_ASP_TX3_SRC, 0x00000000 }, { CS35L41_ASP_TX4_SRC, 0x00000000 }, }; static const struct reg_sequence cs35l41_fs_errata_patch[] = { Loading
sound/soc/codecs/cs47l15.c +4 −1 Original line number Diff line number Diff line Loading @@ -122,6 +122,9 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, snd_soc_kcontrol_component(kcontrol); struct cs47l15 *cs47l15 = snd_soc_component_get_drvdata(component); if (!!ucontrol->value.integer.value[0] == cs47l15->in1_lp_mode) return 0; switch (ucontrol->value.integer.value[0]) { case 0: /* Set IN1 to normal mode */ Loading Loading @@ -150,7 +153,7 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, break; } return 0; return 1; } static const struct snd_kcontrol_new cs47l15_snd_controls[] = { Loading
sound/soc/codecs/madera.c +10 −4 Original line number Diff line number Diff line Loading @@ -618,7 +618,13 @@ int madera_out1_demux_put(struct snd_kcontrol *kcontrol, end: snd_soc_dapm_mutex_unlock(dapm); return snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL); ret = snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL); if (ret < 0) { dev_err(madera->dev, "Failed to update demux power state: %d\n", ret); return ret; } return change; } EXPORT_SYMBOL_GPL(madera_out1_demux_put); Loading Loading @@ -893,7 +899,7 @@ static int madera_adsp_rate_put(struct snd_kcontrol *kcontrol, struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; const int adsp_num = e->shift_l; const unsigned int item = ucontrol->value.enumerated.item[0]; int ret; int ret = 0; if (item >= e->items) return -EINVAL; Loading @@ -910,10 +916,10 @@ static int madera_adsp_rate_put(struct snd_kcontrol *kcontrol, "Cannot change '%s' while in use by active audio paths\n", kcontrol->id.name); ret = -EBUSY; } else { } else if (priv->adsp_rate_cache[adsp_num] != e->values[item]) { /* Volatile register so defer until the codec is powered up */ priv->adsp_rate_cache[adsp_num] = e->values[item]; ret = 0; ret = 1; } mutex_unlock(&priv->rate_lock); Loading
sound/soc/codecs/sgtl5000.c +9 −0 Original line number Diff line number Diff line Loading @@ -1795,6 +1795,9 @@ static int sgtl5000_i2c_remove(struct i2c_client *client) { struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client); regmap_write(sgtl5000->regmap, SGTL5000_CHIP_DIG_POWER, SGTL5000_DIG_POWER_DEFAULT); regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, SGTL5000_ANA_POWER_DEFAULT); clk_disable_unprepare(sgtl5000->mclk); regulator_bulk_disable(sgtl5000->num_supplies, sgtl5000->supplies); regulator_bulk_free(sgtl5000->num_supplies, sgtl5000->supplies); Loading @@ -1802,6 +1805,11 @@ static int sgtl5000_i2c_remove(struct i2c_client *client) return 0; } static void sgtl5000_i2c_shutdown(struct i2c_client *client) { sgtl5000_i2c_remove(client); } static const struct i2c_device_id sgtl5000_id[] = { {"sgtl5000", 0}, {}, Loading @@ -1822,6 +1830,7 @@ static struct i2c_driver sgtl5000_i2c_driver = { }, .probe_new = sgtl5000_i2c_probe, .remove = sgtl5000_i2c_remove, .shutdown = sgtl5000_i2c_shutdown, .id_table = sgtl5000_id, }; Loading
sound/soc/codecs/sgtl5000.h +1 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ /* * SGTL5000_CHIP_DIG_POWER */ #define SGTL5000_DIG_POWER_DEFAULT 0x0000 #define SGTL5000_ADC_EN 0x0040 #define SGTL5000_DAC_EN 0x0020 #define SGTL5000_DAP_POWERUP 0x0010 Loading