Skip to content

Commit c4634a3

Browse files
committed
Merge tag 'sound-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Hopefully the last one for 5.19. This became bigger than wished, but all changes are pretty device-specific small fixes, which look less worrisome. The majority of changes are about various ASoC fixes, while the usual HD-audio quirks are included as well" * tag 'sound-5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (28 commits) ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc221 ALSA: hda/realtek: fix mute/micmute LEDs for HP machines ALSA: hda/realtek - Fix headset mic problem for a HP machine with alc671 ALSA: hda - Add fixup for Dell Latitidue E5430 ALSA: hda/conexant: Apply quirk for another HP ProDesk 600 G3 model ALSA: hda/realtek: Fix headset mic for Acer SF313-51 ASoC: Intel: Skylake: Correct the handling of fmt_config flexible array ASoC: Intel: Skylake: Correct the ssp rate discovery in skl_get_ssp_clks() ASoC: rt5640: Fix the wrong state of JD1 and JD2 ASoC: Intel: sof_rt5682: fix out-of-bounds array access ASoC: qdsp6: fix potential memory leak in q6apm_get_audioreach_graph() ASoC: tas2764: Fix amp gain register offset & default ASoC: tas2764: Correct playback volume range ASoC: tas2764: Fix and extend FSYNC polarity handling ASoC: tas2764: Add post reset delays ASoC: dt-bindings: Fix description for msm8916 ASoC: doc: Capitalize RESET line name ASoC: arizona: Update arizona_aif_cfg_changed to use RX_BCLK_RATE ASoC: cs47l92: Fix event generation for OUT1 demux ...
2 parents d11219a + 9b043a8 commit c4634a3

23 files changed

Lines changed: 189 additions & 120 deletions

File tree

Documentation/devicetree/bindings/sound/qcom,lpass-cpu.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ properties:
2525
- qcom,sc7280-lpass-cpu
2626

2727
reg:
28-
minItems: 2
28+
minItems: 1
2929
maxItems: 6
3030
description: LPAIF core registers
3131

3232
reg-names:
33-
minItems: 2
33+
minItems: 1
3434
maxItems: 6
3535

3636
clocks:
@@ -42,12 +42,12 @@ properties:
4242
maxItems: 10
4343

4444
interrupts:
45-
minItems: 2
45+
minItems: 1
4646
maxItems: 4
4747
description: LPAIF DMA buffer interrupt
4848

4949
interrupt-names:
50-
minItems: 2
50+
minItems: 1
5151
maxItems: 4
5252

5353
qcom,adsp:

Documentation/sound/soc/dai.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ AC97
1010
====
1111

1212
AC97 is a five wire interface commonly found on many PC sound cards. It is
13-
now also popular in many portable devices. This DAI has a reset line and time
13+
now also popular in many portable devices. This DAI has a RESET line and time
1414
multiplexes its data on its SDATA_OUT (playback) and SDATA_IN (capture) lines.
1515
The bit clock (BCLK) is always driven by the CODEC (usually 12.288MHz) and the
1616
frame (FRAME) (usually 48kHz) is always driven by the controller. Each AC97

sound/pci/hda/patch_conexant.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {
944944
SND_PCI_QUIRK(0x103c, 0x828c, "HP EliteBook 840 G4", CXT_FIXUP_HP_DOCK),
945945
SND_PCI_QUIRK(0x103c, 0x8299, "HP 800 G3 SFF", CXT_FIXUP_HP_MIC_NO_PRESENCE),
946946
SND_PCI_QUIRK(0x103c, 0x829a, "HP 800 G3 DM", CXT_FIXUP_HP_MIC_NO_PRESENCE),
947+
SND_PCI_QUIRK(0x103c, 0x82b4, "HP ProDesk 600 G3", CXT_FIXUP_HP_MIC_NO_PRESENCE),
947948
SND_PCI_QUIRK(0x103c, 0x836e, "HP ProBook 455 G5", CXT_FIXUP_MUTE_LED_GPIO),
948949
SND_PCI_QUIRK(0x103c, 0x837f, "HP ProBook 470 G5", CXT_FIXUP_MUTE_LED_GPIO),
949950
SND_PCI_QUIRK(0x103c, 0x83b2, "HP EliteBook 840 G5", CXT_FIXUP_HP_DOCK),

sound/pci/hda/patch_realtek.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6901,6 +6901,7 @@ enum {
69016901
ALC298_FIXUP_LENOVO_SPK_VOLUME,
69026902
ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER,
69036903
ALC269_FIXUP_ATIV_BOOK_8,
6904+
ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE,
69046905
ALC221_FIXUP_HP_MIC_NO_PRESENCE,
69056906
ALC256_FIXUP_ASUS_HEADSET_MODE,
69066907
ALC256_FIXUP_ASUS_MIC,
@@ -7837,6 +7838,16 @@ static const struct hda_fixup alc269_fixups[] = {
78377838
.chained = true,
78387839
.chain_id = ALC269_FIXUP_NO_SHUTUP
78397840
},
7841+
[ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE] = {
7842+
.type = HDA_FIXUP_PINS,
7843+
.v.pins = (const struct hda_pintbl[]) {
7844+
{ 0x19, 0x01a1913c }, /* use as headset mic, without its own jack detect */
7845+
{ 0x1a, 0x01813030 }, /* use as headphone mic, without its own jack detect */
7846+
{ }
7847+
},
7848+
.chained = true,
7849+
.chain_id = ALC269_FIXUP_HEADSET_MODE
7850+
},
78407851
[ALC221_FIXUP_HP_MIC_NO_PRESENCE] = {
78417852
.type = HDA_FIXUP_PINS,
78427853
.v.pins = (const struct hda_pintbl[]) {
@@ -8886,6 +8897,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
88868897
SND_PCI_QUIRK(0x1025, 0x1290, "Acer Veriton Z4860G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
88878898
SND_PCI_QUIRK(0x1025, 0x1291, "Acer Veriton Z4660G", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
88888899
SND_PCI_QUIRK(0x1025, 0x129c, "Acer SWIFT SF314-55", ALC256_FIXUP_ACER_HEADSET_MIC),
8900+
SND_PCI_QUIRK(0x1025, 0x129d, "Acer SWIFT SF313-51", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
88898901
SND_PCI_QUIRK(0x1025, 0x1300, "Acer SWIFT SF314-56", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
88908902
SND_PCI_QUIRK(0x1025, 0x1308, "Acer Aspire Z24-890", ALC286_FIXUP_ACER_AIO_HEADSET_MIC),
88918903
SND_PCI_QUIRK(0x1025, 0x132a, "Acer TravelMate B114-21", ALC233_FIXUP_ACER_HEADSET_MIC),
@@ -8895,6 +8907,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
88958907
SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
88968908
SND_PCI_QUIRK(0x1025, 0x1466, "Acer Aspire A515-56", ALC255_FIXUP_ACER_HEADPHONE_AND_MIC),
88978909
SND_PCI_QUIRK(0x1028, 0x0470, "Dell M101z", ALC269_FIXUP_DELL_M101Z),
8910+
SND_PCI_QUIRK(0x1028, 0x053c, "Dell Latitude E5430", ALC292_FIXUP_DELL_E7X),
88988911
SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
88998912
SND_PCI_QUIRK(0x1028, 0x05bd, "Dell Latitude E6440", ALC292_FIXUP_DELL_E7X),
89008913
SND_PCI_QUIRK(0x1028, 0x05be, "Dell Latitude E6540", ALC292_FIXUP_DELL_E7X),
@@ -9010,6 +9023,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
90109023
SND_PCI_QUIRK(0x103c, 0x2335, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
90119024
SND_PCI_QUIRK(0x103c, 0x2336, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
90129025
SND_PCI_QUIRK(0x103c, 0x2337, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1),
9026+
SND_PCI_QUIRK(0x103c, 0x2b5e, "HP 288 Pro G2 MT", ALC221_FIXUP_HP_288PRO_MIC_NO_PRESENCE),
90139027
SND_PCI_QUIRK(0x103c, 0x802e, "HP Z240 SFF", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
90149028
SND_PCI_QUIRK(0x103c, 0x802f, "HP Z240", ALC221_FIXUP_HP_MIC_NO_PRESENCE),
90159029
SND_PCI_QUIRK(0x103c, 0x8077, "HP", ALC256_FIXUP_HP_HEADSET_MIC),
@@ -9096,6 +9110,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
90969110
SND_PCI_QUIRK(0x103c, 0x89c6, "Zbook Fury 17 G9", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
90979111
SND_PCI_QUIRK(0x103c, 0x89ca, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
90989112
SND_PCI_QUIRK(0x103c, 0x8a78, "HP Dev One", ALC285_FIXUP_HP_LIMIT_INT_MIC_BOOST),
9113+
SND_PCI_QUIRK(0x103c, 0x8aa0, "HP ProBook 440 G9 (MB 8A9E)", ALC236_FIXUP_HP_GPIO_LED),
9114+
SND_PCI_QUIRK(0x103c, 0x8aa3, "HP ProBook 450 G9 (MB 8AA1)", ALC236_FIXUP_HP_GPIO_LED),
9115+
SND_PCI_QUIRK(0x103c, 0x8aa8, "HP EliteBook 640 G9 (MB 8AA6)", ALC236_FIXUP_HP_GPIO_LED),
9116+
SND_PCI_QUIRK(0x103c, 0x8aab, "HP EliteBook 650 G9 (MB 8AA9)", ALC236_FIXUP_HP_GPIO_LED),
90999117
SND_PCI_QUIRK(0x1043, 0x103e, "ASUS X540SA", ALC256_FIXUP_ASUS_MIC),
91009118
SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300),
91019119
SND_PCI_QUIRK(0x1043, 0x106d, "Asus K53BE", ALC269_FIXUP_LIMIT_INT_MIC_BOOST),
@@ -9355,6 +9373,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
93559373
SND_PCI_QUIRK(0x1d72, 0x1602, "RedmiBook", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
93569374
SND_PCI_QUIRK(0x1d72, 0x1701, "XiaomiNotebook Pro", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE),
93579375
SND_PCI_QUIRK(0x1d72, 0x1901, "RedmiBook 14", ALC256_FIXUP_ASUS_HEADSET_MIC),
9376+
SND_PCI_QUIRK(0x1d72, 0x1945, "Redmi G", ALC256_FIXUP_ASUS_HEADSET_MIC),
93589377
SND_PCI_QUIRK(0x1d72, 0x1947, "RedmiBook Air", ALC255_FIXUP_XIAOMI_HEADSET_MIC),
93599378
SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
93609379
SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
@@ -11217,6 +11236,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = {
1121711236
SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800),
1121811237
SND_PCI_QUIRK(0x103c, 0x8719, "HP", ALC897_FIXUP_HP_HSMIC_VERB),
1121911238
SND_PCI_QUIRK(0x103c, 0x873e, "HP", ALC671_FIXUP_HP_HEADSET_MIC2),
11239+
SND_PCI_QUIRK(0x103c, 0x877e, "HP 288 Pro G6", ALC671_FIXUP_HP_HEADSET_MIC2),
1122011240
SND_PCI_QUIRK(0x103c, 0x885f, "HP 288 Pro G8", ALC671_FIXUP_HP_HEADSET_MIC2),
1122111241
SND_PCI_QUIRK(0x1043, 0x1080, "Asus UX501VW", ALC668_FIXUP_HEADSET_MODE),
1122211242
SND_PCI_QUIRK(0x1043, 0x11cd, "Asus N550", ALC662_FIXUP_ASUS_Nx50),

sound/soc/codecs/arizona.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,8 +1760,8 @@ static bool arizona_aif_cfg_changed(struct snd_soc_component *component,
17601760
if (bclk != (val & ARIZONA_AIF1_BCLK_FREQ_MASK))
17611761
return true;
17621762

1763-
val = snd_soc_component_read(component, base + ARIZONA_AIF_TX_BCLK_RATE);
1764-
if (lrclk != (val & ARIZONA_AIF1TX_BCPF_MASK))
1763+
val = snd_soc_component_read(component, base + ARIZONA_AIF_RX_BCLK_RATE);
1764+
if (lrclk != (val & ARIZONA_AIF1RX_BCPF_MASK))
17651765
return true;
17661766

17671767
val = snd_soc_component_read(component, base + ARIZONA_AIF_FRAME_CTRL_1);

sound/soc/codecs/cs47l92.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ static int cs47l92_put_demux(struct snd_kcontrol *kcontrol,
119119
end:
120120
snd_soc_dapm_mutex_unlock(dapm);
121121

122-
return snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
122+
ret = snd_soc_dapm_mux_update_power(dapm, kcontrol, mux, e, NULL);
123+
if (ret < 0) {
124+
dev_err(madera->dev, "Failed to update demux power state: %d\n", ret);
125+
return ret;
126+
}
127+
128+
return change;
123129
}
124130

125131
static SOC_ENUM_SINGLE_DECL(cs47l92_outdemux_enum,

sound/soc/codecs/max98396.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,15 @@ static int max98396_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
342342
{
343343
struct snd_soc_component *component = codec_dai->component;
344344
struct max98396_priv *max98396 = snd_soc_component_get_drvdata(component);
345-
unsigned int format = 0;
345+
unsigned int format_mask, format = 0;
346346
unsigned int bclk_pol = 0;
347347
int ret, status;
348348
int reg;
349349
bool update = false;
350350

351+
format_mask = MAX98396_PCM_MODE_CFG_FORMAT_MASK |
352+
MAX98396_PCM_MODE_CFG_LRCLKEDGE;
353+
351354
dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt);
352355

353356
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
@@ -395,7 +398,7 @@ static int max98396_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
395398
ret = regmap_read(max98396->regmap, MAX98396_R2041_PCM_MODE_CFG, &reg);
396399
if (ret < 0)
397400
return -EINVAL;
398-
if (format != (reg & MAX98396_PCM_BCLKEDGE_BSEL_MASK)) {
401+
if (format != (reg & format_mask)) {
399402
update = true;
400403
} else {
401404
ret = regmap_read(max98396->regmap,
@@ -412,8 +415,7 @@ static int max98396_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
412415

413416
regmap_update_bits(max98396->regmap,
414417
MAX98396_R2041_PCM_MODE_CFG,
415-
MAX98396_PCM_BCLKEDGE_BSEL_MASK,
416-
format);
418+
format_mask, format);
417419

418420
regmap_update_bits(max98396->regmap,
419421
MAX98396_R2042_PCM_CLK_SETUP,

sound/soc/codecs/rt5640.c

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,7 +1984,12 @@ static int rt5640_set_bias_level(struct snd_soc_component *component,
19841984
snd_soc_component_write(component, RT5640_PWR_DIG2, 0x0000);
19851985
snd_soc_component_write(component, RT5640_PWR_VOL, 0x0000);
19861986
snd_soc_component_write(component, RT5640_PWR_MIXER, 0x0000);
1987-
snd_soc_component_write(component, RT5640_PWR_ANLG1, 0x0000);
1987+
if (rt5640->jd_src == RT5640_JD_SRC_HDA_HEADER)
1988+
snd_soc_component_write(component, RT5640_PWR_ANLG1,
1989+
0x0018);
1990+
else
1991+
snd_soc_component_write(component, RT5640_PWR_ANLG1,
1992+
0x0000);
19881993
snd_soc_component_write(component, RT5640_PWR_ANLG2, 0x0000);
19891994
break;
19901995

@@ -2393,9 +2398,15 @@ static void rt5640_jack_work(struct work_struct *work)
23932398
static irqreturn_t rt5640_irq(int irq, void *data)
23942399
{
23952400
struct rt5640_priv *rt5640 = data;
2401+
int delay = 0;
2402+
2403+
if (rt5640->jd_src == RT5640_JD_SRC_HDA_HEADER) {
2404+
cancel_delayed_work_sync(&rt5640->jack_work);
2405+
delay = 100;
2406+
}
23962407

23972408
if (rt5640->jack)
2398-
queue_delayed_work(system_long_wq, &rt5640->jack_work, 0);
2409+
queue_delayed_work(system_long_wq, &rt5640->jack_work, delay);
23992410

24002411
return IRQ_HANDLED;
24012412
}
@@ -2580,6 +2591,12 @@ static void rt5640_enable_hda_jack_detect(
25802591

25812592
snd_soc_component_update_bits(component, RT5640_DUMMY1, 0x400, 0x0);
25822593

2594+
snd_soc_component_update_bits(component, RT5640_PWR_ANLG1,
2595+
RT5640_PWR_VREF2, RT5640_PWR_VREF2);
2596+
usleep_range(10000, 15000);
2597+
snd_soc_component_update_bits(component, RT5640_PWR_ANLG1,
2598+
RT5640_PWR_FV2, RT5640_PWR_FV2);
2599+
25832600
rt5640->jack = jack;
25842601

25852602
ret = request_irq(rt5640->irq, rt5640_irq,
@@ -2696,16 +2713,13 @@ static int rt5640_probe(struct snd_soc_component *component)
26962713

26972714
if (device_property_read_u32(component->dev,
26982715
"realtek,jack-detect-source", &val) == 0) {
2699-
if (val <= RT5640_JD_SRC_GPIO4) {
2716+
if (val <= RT5640_JD_SRC_GPIO4)
27002717
rt5640->jd_src = val << RT5640_JD_SFT;
2701-
} else if (val == RT5640_JD_SRC_HDA_HEADER) {
2718+
else if (val == RT5640_JD_SRC_HDA_HEADER)
27022719
rt5640->jd_src = RT5640_JD_SRC_HDA_HEADER;
2703-
snd_soc_component_update_bits(component, RT5640_DUMMY1,
2704-
0x0300, 0x0);
2705-
} else {
2720+
else
27062721
dev_warn(component->dev, "Warning: Invalid jack-detect-source value: %d, leaving jack-detect disabled\n",
27072722
val);
2708-
}
27092723
}
27102724

27112725
if (!device_property_read_bool(component->dev, "realtek,jack-detect-not-inverted"))

sound/soc/codecs/sgtl5000.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,13 +1795,21 @@ static int sgtl5000_i2c_remove(struct i2c_client *client)
17951795
{
17961796
struct sgtl5000_priv *sgtl5000 = i2c_get_clientdata(client);
17971797

1798+
regmap_write(sgtl5000->regmap, SGTL5000_CHIP_DIG_POWER, SGTL5000_DIG_POWER_DEFAULT);
1799+
regmap_write(sgtl5000->regmap, SGTL5000_CHIP_ANA_POWER, SGTL5000_ANA_POWER_DEFAULT);
1800+
17981801
clk_disable_unprepare(sgtl5000->mclk);
17991802
regulator_bulk_disable(sgtl5000->num_supplies, sgtl5000->supplies);
18001803
regulator_bulk_free(sgtl5000->num_supplies, sgtl5000->supplies);
18011804

18021805
return 0;
18031806
}
18041807

1808+
static void sgtl5000_i2c_shutdown(struct i2c_client *client)
1809+
{
1810+
sgtl5000_i2c_remove(client);
1811+
}
1812+
18051813
static const struct i2c_device_id sgtl5000_id[] = {
18061814
{"sgtl5000", 0},
18071815
{},
@@ -1822,6 +1830,7 @@ static struct i2c_driver sgtl5000_i2c_driver = {
18221830
},
18231831
.probe_new = sgtl5000_i2c_probe,
18241832
.remove = sgtl5000_i2c_remove,
1833+
.shutdown = sgtl5000_i2c_shutdown,
18251834
.id_table = sgtl5000_id,
18261835
};
18271836

sound/soc/codecs/sgtl5000.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
/*
8181
* SGTL5000_CHIP_DIG_POWER
8282
*/
83+
#define SGTL5000_DIG_POWER_DEFAULT 0x0000
8384
#define SGTL5000_ADC_EN 0x0040
8485
#define SGTL5000_DAC_EN 0x0020
8586
#define SGTL5000_DAP_POWERUP 0x0010

0 commit comments

Comments
 (0)