mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 02:31:27 +02:00
sound fixes for 6.14-rc7
A collection of last-minute fixes. Most of them are for ASoC, and the only one core fix is for reverting the previous change, while the rest are all device-specific quirks and fixes, which should be relatively safe to apply. -----BEGIN PGP SIGNATURE----- iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmfT/QgOHHRpd2FpQHN1 c2UuZGUACgkQLtJE4w1nLE+BRQ//R0JdsAi6QdLaFBr9djLaeD4cg4teZNAIllZH +DHicAcLq8c8YRZpBEtbkdNSPqQaaP1DFK+ecfBPCnMNVVNviVu31LfOkPYOeeaa OhcpewBoeIPbUlt2B1uvgo/sNsQVw2oNIYQLd8iwz/Qx50K2M2TdsBvdsvD94MbL tTADYYXexXv3zNLTPrrUH0aq6pQ+ybjiXovsN+enWTnwTTg9EDiBeiC4x0pYje1e pbY2ouxkKhxJR5+RFlkznSgeUZap4X63ax1yo5x5nosyEWzIX9R6PL735HTtgjXc Z1BcB5nxv93sbdkTivPCrF8Ttqb9vCLDdBNvK4J/oLSJzmLImEl7WNldNEYdEfad DeI90gNL2nQBnhCsVhu2kPw20IsLym9UNuDsu9A/tC0tVw9cTcV95xPNWhosM2ue y7ma+UsZQKLVgZWtLBbwHaPmXiyb0z9n/5GtVA2ZfmBih4h5pKPZ/qV7pL59zubz 73vq8vZNaeRMJdO2wTmsfkZxvxfeh8w9AzqzDEYVMj9bsKsheDtgjGVHKE15dMbk Ti9YnPv0T5Hcv39ZK2vF8xNCEVfpeJt2P9449ht41gyKdVCW0BO7LCcHih7LSreL RiowSMa2L4+Afjali+qIWT8Kp3jTlqWDPF88Eqw+jTZF4OUSAB7JeSN3OWycrrtS 2J52niI= =EmsG -----END PGP SIGNATURE----- Merge tag 'sound-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of last-minute fixes. Most of them are for ASoC, and the only one core fix is for reverting the previous change, while the rest are all device-specific quirks and fixes, which should be relatively safe to apply" * tag 'sound-6.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: cs42l43: convert to SYSTEM_SLEEP_PM_OPS ALSA: hda/realtek: Add mute LED quirk for HP Pavilion x360 14-dy1xxx ASoC: codecs: wm0010: Fix error handling path in wm0010_spi_probe() ASoC: rt722-sdca: add missing readable registers ASoC: amd: yc: Support mic on another Lenovo ThinkPad E16 Gen 2 model ASoC: cs42l43: Fix maximum ADC Volume ASoC: ops: Consistently treat platform_max as control value ASoC: rt1320: set wake_capable = 0 explicitly ASoC: cs42l43: Add jack delay debounce after suspend ASoC: tegra: Fix ADX S24_LE audio format ASoC: codecs: wsa884x: report temps to hwmon in millidegree of Celsius ASoC: Intel: sof_sdw: Fix unlikely uninitialized variable use in create_sdw_dailinks()
This commit is contained in:
commit
b1144bc7cb
|
|
@ -1261,7 +1261,10 @@ void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
|
|||
|
||||
/* mixer control */
|
||||
struct soc_mixer_control {
|
||||
int min, max, platform_max;
|
||||
/* Minimum and maximum specified as written to the hardware */
|
||||
int min, max;
|
||||
/* Limited maximum value specified as presented through the control */
|
||||
int platform_max;
|
||||
int reg, rreg;
|
||||
unsigned int shift, rshift;
|
||||
unsigned int sign_bit;
|
||||
|
|
|
|||
|
|
@ -4790,6 +4790,21 @@ static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec,
|
|||
}
|
||||
}
|
||||
|
||||
static void alc295_fixup_hp_mute_led_coefbit11(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix, int action)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
|
||||
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
|
||||
spec->mute_led_polarity = 0;
|
||||
spec->mute_led_coef.idx = 0xb;
|
||||
spec->mute_led_coef.mask = 3 << 3;
|
||||
spec->mute_led_coef.on = 1 << 3;
|
||||
spec->mute_led_coef.off = 1 << 4;
|
||||
snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
|
||||
}
|
||||
}
|
||||
|
||||
static void alc285_fixup_hp_mute_led(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix, int action)
|
||||
{
|
||||
|
|
@ -7656,6 +7671,7 @@ enum {
|
|||
ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
|
||||
ALC290_FIXUP_SUBWOOFER,
|
||||
ALC290_FIXUP_SUBWOOFER_HSJACK,
|
||||
ALC295_FIXUP_HP_MUTE_LED_COEFBIT11,
|
||||
ALC269_FIXUP_THINKPAD_ACPI,
|
||||
ALC269_FIXUP_LENOVO_XPAD_ACPI,
|
||||
ALC269_FIXUP_DMIC_THINKPAD_ACPI,
|
||||
|
|
@ -9401,6 +9417,10 @@ static const struct hda_fixup alc269_fixups[] = {
|
|||
.chained = true,
|
||||
.chain_id = ALC283_FIXUP_INT_MIC,
|
||||
},
|
||||
[ALC295_FIXUP_HP_MUTE_LED_COEFBIT11] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc295_fixup_hp_mute_led_coefbit11,
|
||||
},
|
||||
[ALC298_FIXUP_SAMSUNG_AMP] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc298_fixup_samsung_amp,
|
||||
|
|
@ -10451,6 +10471,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
|
|||
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
|
||||
SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
|
||||
SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
|
||||
SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_COEFBIT11),
|
||||
SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360),
|
||||
SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
|
||||
SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),
|
||||
|
|
|
|||
|
|
@ -248,6 +248,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "21M5"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "21M6"),
|
||||
}
|
||||
},
|
||||
{
|
||||
.driver_data = &acp6x_card,
|
||||
.matches = {
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ int cs42l43_set_jack(struct snd_soc_component *component,
|
|||
autocontrol |= 0x3 << CS42L43_JACKDET_MODE_SHIFT;
|
||||
|
||||
ret = cs42l43_find_index(priv, "cirrus,tip-fall-db-ms", 500,
|
||||
NULL, cs42l43_accdet_db_ms,
|
||||
&priv->tip_fall_db_ms, cs42l43_accdet_db_ms,
|
||||
ARRAY_SIZE(cs42l43_accdet_db_ms));
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
|
@ -175,7 +175,7 @@ int cs42l43_set_jack(struct snd_soc_component *component,
|
|||
tip_deb |= ret << CS42L43_TIPSENSE_FALLING_DB_TIME_SHIFT;
|
||||
|
||||
ret = cs42l43_find_index(priv, "cirrus,tip-rise-db-ms", 500,
|
||||
NULL, cs42l43_accdet_db_ms,
|
||||
&priv->tip_rise_db_ms, cs42l43_accdet_db_ms,
|
||||
ARRAY_SIZE(cs42l43_accdet_db_ms));
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
|
@ -764,6 +764,8 @@ void cs42l43_tip_sense_work(struct work_struct *work)
|
|||
error:
|
||||
mutex_unlock(&priv->jack_lock);
|
||||
|
||||
priv->suspend_jack_debounce = false;
|
||||
|
||||
pm_runtime_mark_last_busy(priv->dev);
|
||||
pm_runtime_put_autosuspend(priv->dev);
|
||||
}
|
||||
|
|
@ -771,14 +773,19 @@ void cs42l43_tip_sense_work(struct work_struct *work)
|
|||
irqreturn_t cs42l43_tip_sense(int irq, void *data)
|
||||
{
|
||||
struct cs42l43_codec *priv = data;
|
||||
unsigned int db_delay = priv->tip_debounce_ms;
|
||||
|
||||
cancel_delayed_work(&priv->bias_sense_timeout);
|
||||
cancel_delayed_work(&priv->tip_sense_work);
|
||||
cancel_delayed_work(&priv->button_press_work);
|
||||
cancel_work(&priv->button_release_work);
|
||||
|
||||
// Ensure delay after suspend is long enough to avoid false detection
|
||||
if (priv->suspend_jack_debounce)
|
||||
db_delay += priv->tip_fall_db_ms + priv->tip_rise_db_ms;
|
||||
|
||||
queue_delayed_work(system_long_wq, &priv->tip_sense_work,
|
||||
msecs_to_jiffies(priv->tip_debounce_ms));
|
||||
msecs_to_jiffies(db_delay));
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1146,7 +1146,7 @@ static const struct snd_kcontrol_new cs42l43_controls[] = {
|
|||
|
||||
SOC_DOUBLE_R_SX_TLV("ADC Volume", CS42L43_ADC_B_CTRL1, CS42L43_ADC_B_CTRL2,
|
||||
CS42L43_ADC_PGA_GAIN_SHIFT,
|
||||
0xF, 5, cs42l43_adc_tlv),
|
||||
0xF, 4, cs42l43_adc_tlv),
|
||||
|
||||
SOC_DOUBLE("PDM1 Invert Switch", CS42L43_DMIC_PDM_CTRL,
|
||||
CS42L43_PDM1L_INV_SHIFT, CS42L43_PDM1R_INV_SHIFT, 1, 0),
|
||||
|
|
@ -2402,9 +2402,22 @@ static int cs42l43_codec_runtime_resume(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int cs42l43_codec_runtime_force_suspend(struct device *dev)
|
||||
{
|
||||
struct cs42l43_codec *priv = dev_get_drvdata(dev);
|
||||
|
||||
dev_dbg(priv->dev, "Runtime suspend\n");
|
||||
|
||||
priv->suspend_jack_debounce = true;
|
||||
|
||||
pm_runtime_force_suspend(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops cs42l43_codec_pm_ops = {
|
||||
RUNTIME_PM_OPS(NULL, cs42l43_codec_runtime_resume, NULL)
|
||||
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
|
||||
SYSTEM_SLEEP_PM_OPS(cs42l43_codec_runtime_force_suspend, pm_runtime_force_resume)
|
||||
};
|
||||
|
||||
static const struct platform_device_id cs42l43_codec_id_table[] = {
|
||||
|
|
|
|||
|
|
@ -78,6 +78,8 @@ struct cs42l43_codec {
|
|||
|
||||
bool use_ring_sense;
|
||||
unsigned int tip_debounce_ms;
|
||||
unsigned int tip_fall_db_ms;
|
||||
unsigned int tip_rise_db_ms;
|
||||
unsigned int bias_low;
|
||||
unsigned int bias_sense_ua;
|
||||
unsigned int bias_ramp_ms;
|
||||
|
|
@ -95,6 +97,7 @@ struct cs42l43_codec {
|
|||
bool button_detect_running;
|
||||
bool jack_present;
|
||||
int jack_override;
|
||||
bool suspend_jack_debounce;
|
||||
|
||||
struct work_struct hp_ilimit_work;
|
||||
struct delayed_work hp_ilimit_clear_work;
|
||||
|
|
|
|||
|
|
@ -535,6 +535,9 @@ static int rt1320_read_prop(struct sdw_slave *slave)
|
|||
/* set the timeout values */
|
||||
prop->clk_stop_timeout = 64;
|
||||
|
||||
/* BIOS may set wake_capable. Make sure it is 0 as wake events are disabled. */
|
||||
prop->wake_capable = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -86,6 +86,10 @@ static bool rt722_sdca_mbq_readable_register(struct device *dev, unsigned int re
|
|||
case 0x6100067:
|
||||
case 0x6100070 ... 0x610007c:
|
||||
case 0x6100080:
|
||||
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN,
|
||||
CH_01) ...
|
||||
SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN,
|
||||
CH_04):
|
||||
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_USER_FU1E, RT722_SDCA_CTL_FU_VOLUME,
|
||||
CH_01):
|
||||
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_USER_FU1E, RT722_SDCA_CTL_FU_VOLUME,
|
||||
|
|
|
|||
|
|
@ -920,7 +920,7 @@ static int wm0010_spi_probe(struct spi_device *spi)
|
|||
if (ret) {
|
||||
dev_err(wm0010->dev, "Failed to set IRQ %d as wake source: %d\n",
|
||||
irq, ret);
|
||||
return ret;
|
||||
goto free_irq;
|
||||
}
|
||||
|
||||
if (spi->max_speed_hz)
|
||||
|
|
@ -932,9 +932,18 @@ static int wm0010_spi_probe(struct spi_device *spi)
|
|||
&soc_component_dev_wm0010, wm0010_dai,
|
||||
ARRAY_SIZE(wm0010_dai));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
goto disable_irq_wake;
|
||||
|
||||
return 0;
|
||||
|
||||
disable_irq_wake:
|
||||
irq_set_irq_wake(wm0010->irq, 0);
|
||||
|
||||
free_irq:
|
||||
if (wm0010->irq)
|
||||
free_irq(wm0010->irq, wm0010);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void wm0010_spi_remove(struct spi_device *spi)
|
||||
|
|
|
|||
|
|
@ -1875,7 +1875,7 @@ static int wsa884x_get_temp(struct wsa884x_priv *wsa884x, long *temp)
|
|||
* Reading temperature is possible only when Power Amplifier is
|
||||
* off. Report last cached data.
|
||||
*/
|
||||
*temp = wsa884x->temperature;
|
||||
*temp = wsa884x->temperature * 1000;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -1934,7 +1934,7 @@ static int wsa884x_get_temp(struct wsa884x_priv *wsa884x, long *temp)
|
|||
if ((val > WSA884X_LOW_TEMP_THRESHOLD) &&
|
||||
(val < WSA884X_HIGH_TEMP_THRESHOLD)) {
|
||||
wsa884x->temperature = val;
|
||||
*temp = val;
|
||||
*temp = val * 1000;
|
||||
ret = 0;
|
||||
} else {
|
||||
ret = -EAGAIN;
|
||||
|
|
|
|||
|
|
@ -954,7 +954,7 @@ static int create_sdw_dailinks(struct snd_soc_card *card,
|
|||
|
||||
/* generate DAI links by each sdw link */
|
||||
while (sof_dais->initialised) {
|
||||
int current_be_id;
|
||||
int current_be_id = 0;
|
||||
|
||||
ret = create_sdw_dailink(card, sof_dais, dai_links,
|
||||
¤t_be_id, codec_conf);
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
|
|||
if (ucontrol->value.integer.value[0] < 0)
|
||||
return -EINVAL;
|
||||
val = ucontrol->value.integer.value[0];
|
||||
if (mc->platform_max && ((int)val + min) > mc->platform_max)
|
||||
if (mc->platform_max && val > mc->platform_max)
|
||||
return -EINVAL;
|
||||
if (val > max - min)
|
||||
return -EINVAL;
|
||||
|
|
@ -350,7 +350,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,
|
|||
if (ucontrol->value.integer.value[1] < 0)
|
||||
return -EINVAL;
|
||||
val2 = ucontrol->value.integer.value[1];
|
||||
if (mc->platform_max && ((int)val2 + min) > mc->platform_max)
|
||||
if (mc->platform_max && val2 > mc->platform_max)
|
||||
return -EINVAL;
|
||||
if (val2 > max - min)
|
||||
return -EINVAL;
|
||||
|
|
@ -503,17 +503,16 @@ int snd_soc_info_volsw_range(struct snd_kcontrol *kcontrol,
|
|||
{
|
||||
struct soc_mixer_control *mc =
|
||||
(struct soc_mixer_control *)kcontrol->private_value;
|
||||
int platform_max;
|
||||
int min = mc->min;
|
||||
int max;
|
||||
|
||||
if (!mc->platform_max)
|
||||
mc->platform_max = mc->max;
|
||||
platform_max = mc->platform_max;
|
||||
max = mc->max - mc->min;
|
||||
if (mc->platform_max && mc->platform_max < max)
|
||||
max = mc->platform_max;
|
||||
|
||||
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
|
||||
uinfo->count = snd_soc_volsw_is_stereo(mc) ? 2 : 1;
|
||||
uinfo->value.integer.min = 0;
|
||||
uinfo->value.integer.max = platform_max - min;
|
||||
uinfo->value.integer.max = max;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ static const struct snd_soc_dai_ops tegra210_adx_out_dai_ops = {
|
|||
.rates = SNDRV_PCM_RATE_8000_192000, \
|
||||
.formats = SNDRV_PCM_FMTBIT_S8 | \
|
||||
SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
SNDRV_PCM_FMTBIT_S24_LE | \
|
||||
SNDRV_PCM_FMTBIT_S32_LE, \
|
||||
}, \
|
||||
.capture = { \
|
||||
|
|
@ -274,7 +274,7 @@ static const struct snd_soc_dai_ops tegra210_adx_out_dai_ops = {
|
|||
.rates = SNDRV_PCM_RATE_8000_192000, \
|
||||
.formats = SNDRV_PCM_FMTBIT_S8 | \
|
||||
SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
SNDRV_PCM_FMTBIT_S24_LE | \
|
||||
SNDRV_PCM_FMTBIT_S32_LE, \
|
||||
}, \
|
||||
.ops = &tegra210_adx_out_dai_ops, \
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user