Skip to content

Commit b1144bc

Browse files
committed
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()
2 parents ef92486 + de69d56 commit b1144bc

File tree

13 files changed

+90
-21
lines changed

13 files changed

+90
-21
lines changed

include/sound/soc.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,10 @@ void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd);
12611261

12621262
/* mixer control */
12631263
struct soc_mixer_control {
1264-
int min, max, platform_max;
1264+
/* Minimum and maximum specified as written to the hardware */
1265+
int min, max;
1266+
/* Limited maximum value specified as presented through the control */
1267+
int platform_max;
12651268
int reg, rreg;
12661269
unsigned int shift, rshift;
12671270
unsigned int sign_bit;

sound/pci/hda/patch_realtek.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4790,6 +4790,21 @@ static void alc236_fixup_hp_coef_micmute_led(struct hda_codec *codec,
47904790
}
47914791
}
47924792

4793+
static void alc295_fixup_hp_mute_led_coefbit11(struct hda_codec *codec,
4794+
const struct hda_fixup *fix, int action)
4795+
{
4796+
struct alc_spec *spec = codec->spec;
4797+
4798+
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
4799+
spec->mute_led_polarity = 0;
4800+
spec->mute_led_coef.idx = 0xb;
4801+
spec->mute_led_coef.mask = 3 << 3;
4802+
spec->mute_led_coef.on = 1 << 3;
4803+
spec->mute_led_coef.off = 1 << 4;
4804+
snd_hda_gen_add_mute_led_cdev(codec, coef_mute_led_set);
4805+
}
4806+
}
4807+
47934808
static void alc285_fixup_hp_mute_led(struct hda_codec *codec,
47944809
const struct hda_fixup *fix, int action)
47954810
{
@@ -7656,6 +7671,7 @@ enum {
76567671
ALC290_FIXUP_MONO_SPEAKERS_HSJACK,
76577672
ALC290_FIXUP_SUBWOOFER,
76587673
ALC290_FIXUP_SUBWOOFER_HSJACK,
7674+
ALC295_FIXUP_HP_MUTE_LED_COEFBIT11,
76597675
ALC269_FIXUP_THINKPAD_ACPI,
76607676
ALC269_FIXUP_LENOVO_XPAD_ACPI,
76617677
ALC269_FIXUP_DMIC_THINKPAD_ACPI,
@@ -9401,6 +9417,10 @@ static const struct hda_fixup alc269_fixups[] = {
94019417
.chained = true,
94029418
.chain_id = ALC283_FIXUP_INT_MIC,
94039419
},
9420+
[ALC295_FIXUP_HP_MUTE_LED_COEFBIT11] = {
9421+
.type = HDA_FIXUP_FUNC,
9422+
.v.func = alc295_fixup_hp_mute_led_coefbit11,
9423+
},
94049424
[ALC298_FIXUP_SAMSUNG_AMP] = {
94059425
.type = HDA_FIXUP_FUNC,
94069426
.v.func = alc298_fixup_samsung_amp,
@@ -10451,6 +10471,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
1045110471
SND_PCI_QUIRK(0x103c, 0x84e7, "HP Pavilion 15", ALC269_FIXUP_HP_MUTE_LED_MIC3),
1045210472
SND_PCI_QUIRK(0x103c, 0x8519, "HP Spectre x360 15-df0xxx", ALC285_FIXUP_HP_SPECTRE_X360),
1045310473
SND_PCI_QUIRK(0x103c, 0x8537, "HP ProBook 440 G6", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
10474+
SND_PCI_QUIRK(0x103c, 0x85c6, "HP Pavilion x360 Convertible 14-dy1xxx", ALC295_FIXUP_HP_MUTE_LED_COEFBIT11),
1045410475
SND_PCI_QUIRK(0x103c, 0x85de, "HP Envy x360 13-ar0xxx", ALC285_FIXUP_HP_ENVY_X360),
1045510476
SND_PCI_QUIRK(0x103c, 0x860f, "HP ZBook 15 G6", ALC285_FIXUP_HP_GPIO_AMP_INIT),
1045610477
SND_PCI_QUIRK(0x103c, 0x861f, "HP Elite Dragonfly G1", ALC285_FIXUP_HP_GPIO_AMP_INIT),

sound/soc/amd/yc/acp6x-mach.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
248248
DMI_MATCH(DMI_PRODUCT_NAME, "21M5"),
249249
}
250250
},
251+
{
252+
.driver_data = &acp6x_card,
253+
.matches = {
254+
DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
255+
DMI_MATCH(DMI_PRODUCT_NAME, "21M6"),
256+
}
257+
},
251258
{
252259
.driver_data = &acp6x_card,
253260
.matches = {

sound/soc/codecs/cs42l43-jack.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ int cs42l43_set_jack(struct snd_soc_component *component,
167167
autocontrol |= 0x3 << CS42L43_JACKDET_MODE_SHIFT;
168168

169169
ret = cs42l43_find_index(priv, "cirrus,tip-fall-db-ms", 500,
170-
NULL, cs42l43_accdet_db_ms,
170+
&priv->tip_fall_db_ms, cs42l43_accdet_db_ms,
171171
ARRAY_SIZE(cs42l43_accdet_db_ms));
172172
if (ret < 0)
173173
goto error;
174174

175175
tip_deb |= ret << CS42L43_TIPSENSE_FALLING_DB_TIME_SHIFT;
176176

177177
ret = cs42l43_find_index(priv, "cirrus,tip-rise-db-ms", 500,
178-
NULL, cs42l43_accdet_db_ms,
178+
&priv->tip_rise_db_ms, cs42l43_accdet_db_ms,
179179
ARRAY_SIZE(cs42l43_accdet_db_ms));
180180
if (ret < 0)
181181
goto error;
@@ -764,21 +764,28 @@ void cs42l43_tip_sense_work(struct work_struct *work)
764764
error:
765765
mutex_unlock(&priv->jack_lock);
766766

767+
priv->suspend_jack_debounce = false;
768+
767769
pm_runtime_mark_last_busy(priv->dev);
768770
pm_runtime_put_autosuspend(priv->dev);
769771
}
770772

771773
irqreturn_t cs42l43_tip_sense(int irq, void *data)
772774
{
773775
struct cs42l43_codec *priv = data;
776+
unsigned int db_delay = priv->tip_debounce_ms;
774777

775778
cancel_delayed_work(&priv->bias_sense_timeout);
776779
cancel_delayed_work(&priv->tip_sense_work);
777780
cancel_delayed_work(&priv->button_press_work);
778781
cancel_work(&priv->button_release_work);
779782

783+
// Ensure delay after suspend is long enough to avoid false detection
784+
if (priv->suspend_jack_debounce)
785+
db_delay += priv->tip_fall_db_ms + priv->tip_rise_db_ms;
786+
780787
queue_delayed_work(system_long_wq, &priv->tip_sense_work,
781-
msecs_to_jiffies(priv->tip_debounce_ms));
788+
msecs_to_jiffies(db_delay));
782789

783790
return IRQ_HANDLED;
784791
}

sound/soc/codecs/cs42l43.c

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ static const struct snd_kcontrol_new cs42l43_controls[] = {
11461146

11471147
SOC_DOUBLE_R_SX_TLV("ADC Volume", CS42L43_ADC_B_CTRL1, CS42L43_ADC_B_CTRL2,
11481148
CS42L43_ADC_PGA_GAIN_SHIFT,
1149-
0xF, 5, cs42l43_adc_tlv),
1149+
0xF, 4, cs42l43_adc_tlv),
11501150

11511151
SOC_DOUBLE("PDM1 Invert Switch", CS42L43_DMIC_PDM_CTRL,
11521152
CS42L43_PDM1L_INV_SHIFT, CS42L43_PDM1R_INV_SHIFT, 1, 0),
@@ -2402,9 +2402,22 @@ static int cs42l43_codec_runtime_resume(struct device *dev)
24022402
return 0;
24032403
}
24042404

2405+
static int cs42l43_codec_runtime_force_suspend(struct device *dev)
2406+
{
2407+
struct cs42l43_codec *priv = dev_get_drvdata(dev);
2408+
2409+
dev_dbg(priv->dev, "Runtime suspend\n");
2410+
2411+
priv->suspend_jack_debounce = true;
2412+
2413+
pm_runtime_force_suspend(dev);
2414+
2415+
return 0;
2416+
}
2417+
24052418
static const struct dev_pm_ops cs42l43_codec_pm_ops = {
24062419
RUNTIME_PM_OPS(NULL, cs42l43_codec_runtime_resume, NULL)
2407-
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
2420+
SYSTEM_SLEEP_PM_OPS(cs42l43_codec_runtime_force_suspend, pm_runtime_force_resume)
24082421
};
24092422

24102423
static const struct platform_device_id cs42l43_codec_id_table[] = {

sound/soc/codecs/cs42l43.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ struct cs42l43_codec {
7878

7979
bool use_ring_sense;
8080
unsigned int tip_debounce_ms;
81+
unsigned int tip_fall_db_ms;
82+
unsigned int tip_rise_db_ms;
8183
unsigned int bias_low;
8284
unsigned int bias_sense_ua;
8385
unsigned int bias_ramp_ms;
@@ -95,6 +97,7 @@ struct cs42l43_codec {
9597
bool button_detect_running;
9698
bool jack_present;
9799
int jack_override;
100+
bool suspend_jack_debounce;
98101

99102
struct work_struct hp_ilimit_work;
100103
struct delayed_work hp_ilimit_clear_work;

sound/soc/codecs/rt1320-sdw.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,9 @@ static int rt1320_read_prop(struct sdw_slave *slave)
535535
/* set the timeout values */
536536
prop->clk_stop_timeout = 64;
537537

538+
/* BIOS may set wake_capable. Make sure it is 0 as wake events are disabled. */
539+
prop->wake_capable = 0;
540+
538541
return 0;
539542
}
540543

sound/soc/codecs/rt722-sdca-sdw.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ static bool rt722_sdca_mbq_readable_register(struct device *dev, unsigned int re
8686
case 0x6100067:
8787
case 0x6100070 ... 0x610007c:
8888
case 0x6100080:
89+
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN,
90+
CH_01) ...
91+
SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_FU15, RT722_SDCA_CTL_FU_CH_GAIN,
92+
CH_04):
8993
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_USER_FU1E, RT722_SDCA_CTL_FU_VOLUME,
9094
CH_01):
9195
case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_USER_FU1E, RT722_SDCA_CTL_FU_VOLUME,

sound/soc/codecs/wm0010.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ static int wm0010_spi_probe(struct spi_device *spi)
920920
if (ret) {
921921
dev_err(wm0010->dev, "Failed to set IRQ %d as wake source: %d\n",
922922
irq, ret);
923-
return ret;
923+
goto free_irq;
924924
}
925925

926926
if (spi->max_speed_hz)
@@ -932,9 +932,18 @@ static int wm0010_spi_probe(struct spi_device *spi)
932932
&soc_component_dev_wm0010, wm0010_dai,
933933
ARRAY_SIZE(wm0010_dai));
934934
if (ret < 0)
935-
return ret;
935+
goto disable_irq_wake;
936936

937937
return 0;
938+
939+
disable_irq_wake:
940+
irq_set_irq_wake(wm0010->irq, 0);
941+
942+
free_irq:
943+
if (wm0010->irq)
944+
free_irq(wm0010->irq, wm0010);
945+
946+
return ret;
938947
}
939948

940949
static void wm0010_spi_remove(struct spi_device *spi)

sound/soc/codecs/wsa884x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ static int wsa884x_get_temp(struct wsa884x_priv *wsa884x, long *temp)
18751875
* Reading temperature is possible only when Power Amplifier is
18761876
* off. Report last cached data.
18771877
*/
1878-
*temp = wsa884x->temperature;
1878+
*temp = wsa884x->temperature * 1000;
18791879
return 0;
18801880
}
18811881

@@ -1934,7 +1934,7 @@ static int wsa884x_get_temp(struct wsa884x_priv *wsa884x, long *temp)
19341934
if ((val > WSA884X_LOW_TEMP_THRESHOLD) &&
19351935
(val < WSA884X_HIGH_TEMP_THRESHOLD)) {
19361936
wsa884x->temperature = val;
1937-
*temp = val;
1937+
*temp = val * 1000;
19381938
ret = 0;
19391939
} else {
19401940
ret = -EAGAIN;

0 commit comments

Comments
 (0)