Skip to content

Commit 3c1d29e

Browse files
committed
Merge tag 'sound-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "This became bigger than usual, as it receives a pile of pending ASoC fixes. Most of changes are for device-specific issues while there are a few core fixes that are all rather trivial: - DMA-engine sync fixes - Continued MIDI2 conversion fixes - Various ASoC Intel SOF fixes - A series of ASoC topology fixes for memory handling - AMD ACP fix, curing a recent regression, too - Platform / codec-specific fixes for mediatek, atmel, realtek, etc" * tag 'sound-6.10-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (40 commits) ASoC: rt5645: fix issue of random interrupt from push-button ALSA: seq: Fix missing MSB in MIDI2 SPP conversion ASoC: amd: yc: Fix non-functional mic on ASUS M5602RA ALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook 645/665 G11. ALSA: hda/realtek: Fix conflicting quirk for PCI SSID 17aa:3820 ALSA: dmaengine_pcm: terminate dmaengine before synchronize ALSA: hda/relatek: Enable Mute LED on HP Laptop 15-gw0xxx ALSA: PCM: Allow resume only for suspended streams ALSA: seq: Fix missing channel at encoding RPN/NRPN MIDI2 messages ASoC: mediatek: mt8195: Add platform entry for ETDM1_OUT_BE dai link ASoC: fsl-asoc-card: set priv->pdev before using it ASoC: amd: acp: move chip->flag variable assignment ASoC: amd: acp: remove i2s configuration check in acp_i2s_probe() ASoC: amd: acp: add a null check for chip_pdev structure ASoC: Intel: soc-acpi: mtl: fix speaker no sound on Dell SKU 0C64 ASoC: q6apm-lpass-dai: close graph on prepare errors ASoC: cs35l56: Disconnect ASP1 TX sources when ASP1 DAI is hooked up ASoC: topology: Fix route memory corruption ASoC: rt722-sdca-sdw: add debounce time for type detection ASoC: SOF: sof-audio: Skip unprepare for in-use widgets on error rollback ...
2 parents afcd481 + 4b3e381 commit 3c1d29e

33 files changed

+220
-85
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18209,6 +18209,7 @@ QCOM AUDIO (ASoC) DRIVERS
1820918209
M: Srinivas Kandagatla <[email protected]>
1821018210
M: Banajit Goswami <[email protected]>
1821118211
L: [email protected] (moderated for non-subscribers)
18212+
1821218213
S: Supported
1821318214
F: Documentation/devicetree/bindings/soc/qcom/qcom,apr*
1821418215
F: Documentation/devicetree/bindings/sound/qcom,*

include/sound/dmaengine_pcm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ snd_pcm_uframes_t snd_dmaengine_pcm_pointer_no_residue(struct snd_pcm_substream
3636
int snd_dmaengine_pcm_open(struct snd_pcm_substream *substream,
3737
struct dma_chan *chan);
3838
int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream);
39+
int snd_dmaengine_pcm_sync_stop(struct snd_pcm_substream *substream);
3940

4041
int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream,
4142
dma_filter_fn filter_fn, void *filter_data);

sound/core/pcm_dmaengine.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,16 @@ int snd_dmaengine_pcm_open_request_chan(struct snd_pcm_substream *substream,
349349
}
350350
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan);
351351

352+
int snd_dmaengine_pcm_sync_stop(struct snd_pcm_substream *substream)
353+
{
354+
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
355+
356+
dmaengine_synchronize(prtd->dma_chan);
357+
358+
return 0;
359+
}
360+
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_sync_stop);
361+
352362
/**
353363
* snd_dmaengine_pcm_close - Close a dmaengine based PCM substream
354364
* @substream: PCM substream
@@ -358,6 +368,12 @@ EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_open_request_chan);
358368
int snd_dmaengine_pcm_close(struct snd_pcm_substream *substream)
359369
{
360370
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
371+
struct dma_tx_state state;
372+
enum dma_status status;
373+
374+
status = dmaengine_tx_status(prtd->dma_chan, prtd->cookie, &state);
375+
if (status == DMA_PAUSED)
376+
dmaengine_terminate_async(prtd->dma_chan);
361377

362378
dmaengine_synchronize(prtd->dma_chan);
363379
kfree(prtd);
@@ -378,6 +394,12 @@ EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_close);
378394
int snd_dmaengine_pcm_close_release_chan(struct snd_pcm_substream *substream)
379395
{
380396
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
397+
struct dma_tx_state state;
398+
enum dma_status status;
399+
400+
status = dmaengine_tx_status(prtd->dma_chan, prtd->cookie, &state);
401+
if (status == DMA_PAUSED)
402+
dmaengine_terminate_async(prtd->dma_chan);
381403

382404
dmaengine_synchronize(prtd->dma_chan);
383405
dma_release_channel(prtd->dma_chan);

sound/core/pcm_native.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,6 +1775,8 @@ static int snd_pcm_pre_resume(struct snd_pcm_substream *substream,
17751775
snd_pcm_state_t state)
17761776
{
17771777
struct snd_pcm_runtime *runtime = substream->runtime;
1778+
if (runtime->state != SNDRV_PCM_STATE_SUSPENDED)
1779+
return -EBADFD;
17781780
if (!(runtime->info & SNDRV_PCM_INFO_RESUME))
17791781
return -ENOSYS;
17801782
runtime->trigger_master = substream;

sound/core/seq/seq_ump_convert.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,8 @@ static int paf_ev_to_ump_midi2(const struct snd_seq_event *event,
791791

792792
/* set up the MIDI2 RPN/NRPN packet data from the parsed info */
793793
static void fill_rpn(struct snd_seq_ump_midi2_bank *cc,
794-
union snd_ump_midi2_msg *data)
794+
union snd_ump_midi2_msg *data,
795+
unsigned char channel)
795796
{
796797
if (cc->rpn_set) {
797798
data->rpn.status = UMP_MSG_STATUS_RPN;
@@ -808,6 +809,7 @@ static void fill_rpn(struct snd_seq_ump_midi2_bank *cc,
808809
}
809810
data->rpn.data = upscale_14_to_32bit((cc->cc_data_msb << 7) |
810811
cc->cc_data_lsb);
812+
data->rpn.channel = channel;
811813
cc->cc_data_msb = cc->cc_data_lsb = 0;
812814
}
813815

@@ -855,7 +857,7 @@ static int cc_ev_to_ump_midi2(const struct snd_seq_event *event,
855857
cc->cc_data_lsb = val;
856858
if (!(cc->rpn_set || cc->nrpn_set))
857859
return 0; // skip
858-
fill_rpn(cc, data);
860+
fill_rpn(cc, data, channel);
859861
return 1;
860862
}
861863

@@ -957,7 +959,7 @@ static int ctrl14_ev_to_ump_midi2(const struct snd_seq_event *event,
957959
cc->cc_data_lsb = lsb;
958960
if (!(cc->rpn_set || cc->nrpn_set))
959961
return 0; // skip
960-
fill_rpn(cc, data);
962+
fill_rpn(cc, data, channel);
961963
return 1;
962964
}
963965

@@ -1018,7 +1020,7 @@ static int system_2p_ev_to_ump_midi2(const struct snd_seq_event *event,
10181020
union snd_ump_midi2_msg *data,
10191021
unsigned char status)
10201022
{
1021-
return system_1p_ev_to_ump_midi1(event, dest_port,
1023+
return system_2p_ev_to_ump_midi1(event, dest_port,
10221024
(union snd_ump_midi1_msg *)data,
10231025
status);
10241026
}

sound/pci/hda/patch_realtek.c

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7525,6 +7525,7 @@ enum {
75257525
ALC287_FIXUP_LENOVO_THKPAD_WH_ALC1318,
75267526
ALC256_FIXUP_CHROME_BOOK,
75277527
ALC287_FIXUP_LENOVO_14ARP8_LEGION_IAH7,
7528+
ALC287_FIXUP_LENOVO_SSID_17AA3820,
75287529
};
75297530

75307531
/* A special fixup for Lenovo C940 and Yoga Duet 7;
@@ -7596,6 +7597,20 @@ static void alc287_fixup_lenovo_legion_7(struct hda_codec *codec,
75967597
__snd_hda_apply_fixup(codec, id, action, 0);
75977598
}
75987599

7600+
/* Yet more conflicting PCI SSID (17aa:3820) on two Lenovo models */
7601+
static void alc287_fixup_lenovo_ssid_17aa3820(struct hda_codec *codec,
7602+
const struct hda_fixup *fix,
7603+
int action)
7604+
{
7605+
int id;
7606+
7607+
if (codec->core.subsystem_id == 0x17aa3820)
7608+
id = ALC269_FIXUP_ASPIRE_HEADSET_MIC; /* IdeaPad 330-17IKB 81DM */
7609+
else /* 0x17aa3802 */
7610+
id = ALC287_FIXUP_YOGA7_14ITL_SPEAKERS; /* "Yoga Duet 7 13ITL6 */
7611+
__snd_hda_apply_fixup(codec, id, action, 0);
7612+
}
7613+
75997614
static const struct hda_fixup alc269_fixups[] = {
76007615
[ALC269_FIXUP_GPIO2] = {
76017616
.type = HDA_FIXUP_FUNC,
@@ -9832,6 +9847,10 @@ static const struct hda_fixup alc269_fixups[] = {
98329847
.chained = true,
98339848
.chain_id = ALC225_FIXUP_HEADSET_JACK
98349849
},
9850+
[ALC287_FIXUP_LENOVO_SSID_17AA3820] = {
9851+
.type = HDA_FIXUP_FUNC,
9852+
.v.func = alc287_fixup_lenovo_ssid_17aa3820,
9853+
},
98359854
};
98369855

98379856
static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -10069,6 +10088,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1006910088
SND_PCI_QUIRK(0x103c, 0x8788, "HP OMEN 15", ALC285_FIXUP_HP_MUTE_LED),
1007010089
SND_PCI_QUIRK(0x103c, 0x87b7, "HP Laptop 14-fq0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
1007110090
SND_PCI_QUIRK(0x103c, 0x87c8, "HP", ALC287_FIXUP_HP_GPIO_LED),
10091+
SND_PCI_QUIRK(0x103c, 0x87d3, "HP Laptop 15-gw0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
1007210092
SND_PCI_QUIRK(0x103c, 0x87e5, "HP ProBook 440 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
1007310093
SND_PCI_QUIRK(0x103c, 0x87e7, "HP ProBook 450 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
1007410094
SND_PCI_QUIRK(0x103c, 0x87f1, "HP ProBook 630 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED),
@@ -10222,6 +10242,9 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1022210242
SND_PCI_QUIRK(0x103c, 0x8c7c, "HP ProBook 445 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
1022310243
SND_PCI_QUIRK(0x103c, 0x8c7d, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
1022410244
SND_PCI_QUIRK(0x103c, 0x8c7e, "HP ProBook 465 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
10245+
SND_PCI_QUIRK(0x103c, 0x8c7f, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
10246+
SND_PCI_QUIRK(0x103c, 0x8c80, "HP EliteBook 645 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
10247+
SND_PCI_QUIRK(0x103c, 0x8c81, "HP EliteBook 665 G11", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
1022510248
SND_PCI_QUIRK(0x103c, 0x8c89, "HP ProBook 460 G11", ALC236_FIXUP_HP_GPIO_LED),
1022610249
SND_PCI_QUIRK(0x103c, 0x8c8a, "HP EliteBook 630", ALC236_FIXUP_HP_GPIO_LED),
1022710250
SND_PCI_QUIRK(0x103c, 0x8c8c, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED),
@@ -10530,7 +10553,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
1053010553
SND_PCI_QUIRK(0x17aa, 0x3813, "Legion 7i 15IMHG05", ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS),
1053110554
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940 / Yoga Duet 7", ALC298_FIXUP_LENOVO_C940_DUET7),
1053210555
SND_PCI_QUIRK(0x17aa, 0x3819, "Lenovo 13s Gen2 ITL", ALC287_FIXUP_13S_GEN2_SPEAKERS),
10533-
SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330-17IKB 81DM", ALC269_FIXUP_ASPIRE_HEADSET_MIC),
10556+
SND_PCI_QUIRK(0x17aa, 0x3820, "IdeaPad 330 / Yoga Duet 7", ALC287_FIXUP_LENOVO_SSID_17AA3820),
1053410557
SND_PCI_QUIRK(0x17aa, 0x3824, "Legion Y9000X 2020", ALC285_FIXUP_LEGION_Y9000X_SPEAKERS),
1053510558
SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
1053610559
SND_PCI_QUIRK(0x17aa, 0x3834, "Lenovo IdeaPad Slim 9i 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),

sound/soc/amd/acp/acp-i2s.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,20 +588,12 @@ static int acp_i2s_probe(struct snd_soc_dai *dai)
588588
{
589589
struct device *dev = dai->component->dev;
590590
struct acp_dev_data *adata = dev_get_drvdata(dev);
591-
struct acp_resource *rsrc = adata->rsrc;
592-
unsigned int val;
593591

594592
if (!adata->acp_base) {
595593
dev_err(dev, "I2S base is NULL\n");
596594
return -EINVAL;
597595
}
598596

599-
val = readl(adata->acp_base + rsrc->i2s_pin_cfg_offset);
600-
if (val != rsrc->i2s_mode) {
601-
dev_err(dev, "I2S Mode not supported val %x\n", val);
602-
return -EINVAL;
603-
}
604-
605597
return 0;
606598
}
607599

sound/soc/amd/acp/acp-pci.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
100100
ret = -EINVAL;
101101
goto release_regions;
102102
}
103+
chip->flag = flag;
103104
dmic_dev = platform_device_register_data(dev, "dmic-codec", PLATFORM_DEVID_NONE, NULL, 0);
104105
if (IS_ERR(dmic_dev)) {
105106
dev_err(dev, "failed to create DMIC device\n");
@@ -139,7 +140,6 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id
139140
}
140141
}
141142

142-
chip->flag = flag;
143143
memset(&pdevinfo, 0, sizeof(pdevinfo));
144144

145145
pdevinfo.name = chip->name;
@@ -199,10 +199,12 @@ static int __maybe_unused snd_acp_resume(struct device *dev)
199199
ret = acp_init(chip);
200200
if (ret)
201201
dev_err(dev, "ACP init failed\n");
202-
child = chip->chip_pdev->dev;
203-
adata = dev_get_drvdata(&child);
204-
if (adata)
205-
acp_enable_interrupts(adata);
202+
if (chip->chip_pdev) {
203+
child = chip->chip_pdev->dev;
204+
adata = dev_get_drvdata(&child);
205+
if (adata)
206+
acp_enable_interrupts(adata);
207+
}
206208
return ret;
207209
}
208210

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
283283
DMI_MATCH(DMI_PRODUCT_NAME, "M5402RA"),
284284
}
285285
},
286+
{
287+
.driver_data = &acp6x_card,
288+
.matches = {
289+
DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
290+
DMI_MATCH(DMI_PRODUCT_NAME, "M5602RA"),
291+
}
292+
},
286293
{
287294
.driver_data = &acp6x_card,
288295
.matches = {

sound/soc/atmel/atmel-classd.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,19 +473,22 @@ static int atmel_classd_asoc_card_init(struct device *dev,
473473
if (!dai_link)
474474
return -ENOMEM;
475475

476-
comp = devm_kzalloc(dev, sizeof(*comp), GFP_KERNEL);
476+
comp = devm_kzalloc(dev, 2 * sizeof(*comp), GFP_KERNEL);
477477
if (!comp)
478478
return -ENOMEM;
479479

480-
dai_link->cpus = comp;
480+
dai_link->cpus = &comp[0];
481481
dai_link->codecs = &snd_soc_dummy_dlc;
482+
dai_link->platforms = &comp[1];
482483

483484
dai_link->num_cpus = 1;
484485
dai_link->num_codecs = 1;
486+
dai_link->num_platforms = 1;
485487

486488
dai_link->name = "CLASSD";
487489
dai_link->stream_name = "CLASSD PCM";
488490
dai_link->cpus->dai_name = dev_name(dev);
491+
dai_link->platforms->name = dev_name(dev);
489492

490493
card->dai_link = dai_link;
491494
card->num_links = 1;

0 commit comments

Comments
 (0)