Skip to content

Commit 2a28a8b

Browse files
committed
Merge tag 'sound-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "The majority of changes here are various fixes for Intel drivers, and there is a change in ASoC PCM core for the format constraints. In addition, a workaround for HD-audio HDMI regressions and usual HD-audio quirks are found" * tag 'sound-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/hdmi: Preserve the previous PCM device upon re-enablement ALSA: hda/realtek: Add quirk for Clevo X370SNW ALSA: hda/realtek: fix mute/micmute LEDs for a HP ProBook ASoC: SOF: avoid a NULL dereference with unsupported widgets ASoC: da7213.c: add missing pm_runtime_disable() ASoC: hdac_hdmi: use set_stream() instead of set_tdm_slots() ASoC: codecs: lpass: fix the order or clks turn off during suspend ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750 ASoC: SOF: ipc4: Ensure DSP is in D0I0 during sof_ipc4_set_get_data() ASoC: amd: yc: Add DMI entries to support Victus by HP Laptop 16-e1xxx (8A22) ASoC: soc-pcm: fix hw->formats cleared by soc_pcm_hw_init() for dpcm ASoC: Intel: soc-acpi: add table for Intel 'Rooks County' NUC M15 ASOC: Intel: sof_sdw: add quirk for Intel 'Rooks County' NUC M15
2 parents 8dfab52 + f785f5e commit 2a28a8b

14 files changed

Lines changed: 106 additions & 12 deletions

File tree

sound/pci/hda/patch_hdmi.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ struct hdmi_spec_per_pin {
8181
struct delayed_work work;
8282
struct hdmi_pcm *pcm; /* pointer to spec->pcm_rec[n] dynamically*/
8383
int pcm_idx; /* which pcm is attached. -1 means no pcm is attached */
84+
int prev_pcm_idx; /* previously assigned pcm index */
8485
int repoll_count;
8586
bool setup; /* the stream has been set up by prepare callback */
8687
bool silent_stream;
@@ -1380,9 +1381,17 @@ static void hdmi_attach_hda_pcm(struct hdmi_spec *spec,
13801381
/* pcm already be attached to the pin */
13811382
if (per_pin->pcm)
13821383
return;
1384+
/* try the previously used slot at first */
1385+
idx = per_pin->prev_pcm_idx;
1386+
if (idx >= 0) {
1387+
if (!test_bit(idx, &spec->pcm_bitmap))
1388+
goto found;
1389+
per_pin->prev_pcm_idx = -1; /* no longer valid, clear it */
1390+
}
13831391
idx = hdmi_find_pcm_slot(spec, per_pin);
13841392
if (idx == -EBUSY)
13851393
return;
1394+
found:
13861395
per_pin->pcm_idx = idx;
13871396
per_pin->pcm = get_hdmi_pcm(spec, idx);
13881397
set_bit(idx, &spec->pcm_bitmap);
@@ -1398,6 +1407,7 @@ static void hdmi_detach_hda_pcm(struct hdmi_spec *spec,
13981407
return;
13991408
idx = per_pin->pcm_idx;
14001409
per_pin->pcm_idx = -1;
1410+
per_pin->prev_pcm_idx = idx; /* remember the previous index */
14011411
per_pin->pcm = NULL;
14021412
if (idx >= 0 && idx < spec->pcm_used)
14031413
clear_bit(idx, &spec->pcm_bitmap);
@@ -1924,6 +1934,7 @@ static int hdmi_add_pin(struct hda_codec *codec, hda_nid_t pin_nid)
19241934

19251935
per_pin->pcm = NULL;
19261936
per_pin->pcm_idx = -1;
1937+
per_pin->prev_pcm_idx = -1;
19271938
per_pin->pin_nid = pin_nid;
19281939
per_pin->pin_nid_idx = spec->num_nids;
19291940
per_pin->dev_id = i;

sound/pci/hda/patch_realtek.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2624,6 +2624,7 @@ static const struct snd_pci_quirk alc882_fixup_tbl[] = {
26242624
SND_PCI_QUIRK(0x1462, 0xda57, "MSI Z270-Gaming", ALC1220_FIXUP_GB_DUAL_CODECS),
26252625
SND_PCI_QUIRK_VENDOR(0x1462, "MSI", ALC882_FIXUP_GPIO3),
26262626
SND_PCI_QUIRK(0x147b, 0x107a, "Abit AW9D-MAX", ALC882_FIXUP_ABIT_AW9D_MAX),
2627+
SND_PCI_QUIRK(0x1558, 0x3702, "Clevo X370SN[VW]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26272628
SND_PCI_QUIRK(0x1558, 0x50d3, "Clevo PC50[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26282629
SND_PCI_QUIRK(0x1558, 0x65d1, "Clevo PB51[ER][CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
26292630
SND_PCI_QUIRK(0x1558, 0x65d2, "Clevo PB51R[CDF]", ALC1220_FIXUP_CLEVO_PB51ED_PINS),
@@ -9443,6 +9444,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
94439444
SND_PCI_QUIRK(0x103c, 0x8b47, "HP", ALC245_FIXUP_CS35L41_SPI_2_HP_GPIO_LED),
94449445
SND_PCI_QUIRK(0x103c, 0x8b5d, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
94459446
SND_PCI_QUIRK(0x103c, 0x8b5e, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
9447+
SND_PCI_QUIRK(0x103c, 0x8b66, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
94469448
SND_PCI_QUIRK(0x103c, 0x8b7a, "HP", ALC236_FIXUP_HP_GPIO_LED),
94479449
SND_PCI_QUIRK(0x103c, 0x8b7d, "HP", ALC236_FIXUP_HP_GPIO_LED),
94489450
SND_PCI_QUIRK(0x103c, 0x8b87, "HP", ALC236_FIXUP_HP_GPIO_LED),

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
269269
DMI_MATCH(DMI_BOARD_NAME, "8A43"),
270270
}
271271
},
272+
{
273+
.driver_data = &acp6x_card,
274+
.matches = {
275+
DMI_MATCH(DMI_BOARD_VENDOR, "HP"),
276+
DMI_MATCH(DMI_BOARD_NAME, "8A22"),
277+
}
278+
},
272279
{}
273280
};
274281

sound/soc/codecs/da7213.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,6 +2022,11 @@ static int da7213_i2c_probe(struct i2c_client *i2c)
20222022
return ret;
20232023
}
20242024

2025+
static void da7213_i2c_remove(struct i2c_client *i2c)
2026+
{
2027+
pm_runtime_disable(&i2c->dev);
2028+
}
2029+
20252030
static int __maybe_unused da7213_runtime_suspend(struct device *dev)
20262031
{
20272032
struct da7213_priv *da7213 = dev_get_drvdata(dev);
@@ -2065,6 +2070,7 @@ static struct i2c_driver da7213_i2c_driver = {
20652070
.pm = &da7213_pm,
20662071
},
20672072
.probe_new = da7213_i2c_probe,
2073+
.remove = da7213_i2c_remove,
20682074
.id_table = da7213_i2c_id,
20692075
};
20702076

sound/soc/codecs/hdac_hdmi.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -436,23 +436,28 @@ static int hdac_hdmi_setup_audio_infoframe(struct hdac_device *hdev,
436436
return 0;
437437
}
438438

439-
static int hdac_hdmi_set_tdm_slot(struct snd_soc_dai *dai,
440-
unsigned int tx_mask, unsigned int rx_mask,
441-
int slots, int slot_width)
439+
static int hdac_hdmi_set_stream(struct snd_soc_dai *dai,
440+
void *stream, int direction)
442441
{
443442
struct hdac_hdmi_priv *hdmi = snd_soc_dai_get_drvdata(dai);
444443
struct hdac_device *hdev = hdmi->hdev;
445444
struct hdac_hdmi_dai_port_map *dai_map;
446445
struct hdac_hdmi_pcm *pcm;
446+
struct hdac_stream *hstream;
447447

448-
dev_dbg(&hdev->dev, "%s: strm_tag: %d\n", __func__, tx_mask);
448+
if (!stream)
449+
return -EINVAL;
450+
451+
hstream = (struct hdac_stream *)stream;
452+
453+
dev_dbg(&hdev->dev, "%s: strm_tag: %d\n", __func__, hstream->stream_tag);
449454

450455
dai_map = &hdmi->dai_map[dai->id];
451456

452457
pcm = hdac_hdmi_get_pcm_from_cvt(hdmi, dai_map->cvt);
453458

454459
if (pcm)
455-
pcm->stream_tag = (tx_mask << 4);
460+
pcm->stream_tag = (hstream->stream_tag << 4);
456461

457462
return 0;
458463
}
@@ -1544,7 +1549,7 @@ static const struct snd_soc_dai_ops hdmi_dai_ops = {
15441549
.startup = hdac_hdmi_pcm_open,
15451550
.shutdown = hdac_hdmi_pcm_close,
15461551
.hw_params = hdac_hdmi_set_hw_params,
1547-
.set_tdm_slot = hdac_hdmi_set_tdm_slot,
1552+
.set_stream = hdac_hdmi_set_stream,
15481553
};
15491554

15501555
/*

sound/soc/codecs/lpass-rx-macro.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3670,9 +3670,9 @@ static int __maybe_unused rx_macro_runtime_suspend(struct device *dev)
36703670
regcache_cache_only(rx->regmap, true);
36713671
regcache_mark_dirty(rx->regmap);
36723672

3673-
clk_disable_unprepare(rx->mclk);
3674-
clk_disable_unprepare(rx->npl);
36753673
clk_disable_unprepare(rx->fsgen);
3674+
clk_disable_unprepare(rx->npl);
3675+
clk_disable_unprepare(rx->mclk);
36763676

36773677
return 0;
36783678
}

sound/soc/codecs/lpass-tx-macro.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2098,9 +2098,9 @@ static int __maybe_unused tx_macro_runtime_suspend(struct device *dev)
20982098
regcache_cache_only(tx->regmap, true);
20992099
regcache_mark_dirty(tx->regmap);
21002100

2101-
clk_disable_unprepare(tx->mclk);
2102-
clk_disable_unprepare(tx->npl);
21032101
clk_disable_unprepare(tx->fsgen);
2102+
clk_disable_unprepare(tx->npl);
2103+
clk_disable_unprepare(tx->mclk);
21042104

21052105
return 0;
21062106
}

sound/soc/codecs/lpass-wsa-macro.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2506,9 +2506,9 @@ static int __maybe_unused wsa_macro_runtime_suspend(struct device *dev)
25062506
regcache_cache_only(wsa->regmap, true);
25072507
regcache_mark_dirty(wsa->regmap);
25082508

2509-
clk_disable_unprepare(wsa->mclk);
2510-
clk_disable_unprepare(wsa->npl);
25112509
clk_disable_unprepare(wsa->fsgen);
2510+
clk_disable_unprepare(wsa->npl);
2511+
clk_disable_unprepare(wsa->mclk);
25122512

25132513
return 0;
25142514
}

sound/soc/intel/boards/bytcr_rt5640.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,18 @@ static int byt_rt5640_aif1_hw_params(struct snd_pcm_substream *substream,
533533

534534
/* Please keep this list alphabetically sorted */
535535
static const struct dmi_system_id byt_rt5640_quirk_table[] = {
536+
{ /* Acer Iconia One 7 B1-750 */
537+
.matches = {
538+
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Insyde"),
539+
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "VESPA2"),
540+
},
541+
.driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
542+
BYT_RT5640_JD_SRC_JD1_IN4P |
543+
BYT_RT5640_OVCD_TH_1500UA |
544+
BYT_RT5640_OVCD_SF_0P75 |
545+
BYT_RT5640_SSP0_AIF1 |
546+
BYT_RT5640_MCLK_EN),
547+
},
536548
{ /* Acer Iconia Tab 8 W1-810 */
537549
.matches = {
538550
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Acer"),

sound/soc/intel/boards/sof_sdw.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,17 @@ static const struct dmi_system_id sof_sdw_quirk_table[] = {
213213
SOF_SDW_PCH_DMIC |
214214
RT711_JD1),
215215
},
216+
{
217+
/* NUC15 'Rooks County' LAPRC510 and LAPRC710 skews */
218+
.callback = sof_sdw_quirk_cb,
219+
.matches = {
220+
DMI_MATCH(DMI_SYS_VENDOR, "Intel(R) Client Systems"),
221+
DMI_MATCH(DMI_PRODUCT_NAME, "LAPRC"),
222+
},
223+
.driver_data = (void *)(SOF_SDW_TGL_HDMI |
224+
SOF_SDW_PCH_DMIC |
225+
RT711_JD2_100K),
226+
},
216227
/* TigerLake-SDCA devices */
217228
{
218229
.callback = sof_sdw_quirk_cb,

0 commit comments

Comments
 (0)