Commit b1144bc7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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()
parents ef924867 de69d56d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;
+21 −0
Original line number Diff line number Diff line
@@ -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),
+7 −0
Original line number Diff line number Diff line
@@ -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 = {
+10 −3
Original line number Diff line number Diff line
@@ -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;
}
+15 −2
Original line number Diff line number Diff line
@@ -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[] = {
Loading