Skip to content

Commit e7562a0

Browse files
committed
Merge tag 'sound-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "A collection of small fixes, mostly covering device-specific regressions and bugs over ASoC, HD-audio and USB-audio, while the ALSA PCM core received a few additional fixes for the possible (new and old) regressions" * tag 'sound-5.14-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (29 commits) ALSA: usb-audio: Add registration quirk for JBL Quantum headsets ALSA: hda/hdmi: Add quirk to force pin connectivity on NUC10 ALSA: pcm: Fix mmap without buffer preallocation ALSA: pcm: Fix mmap capability check ALSA: hda: intel-dsp-cfg: add missing ElkhartLake PCI ID ASoC: ti: j721e-evm: Check for not initialized parent_clk_id ASoC: ti: j721e-evm: Fix unbalanced domain activity tracking during startup ALSA: hda/realtek: Fix pop noise and 2 Front Mic issues on a machine ALSA: hdmi: Expose all pins on MSI MS-7C94 board ALSA: sb: Fix potential ABBA deadlock in CSP driver ASoC: rt5682: Fix the issue of garbled recording after powerd_dbus_suspend ASoC: amd: reverse stop sequence for stoneyridge platform ASoC: soc-pcm: add a flag to reverse the stop sequence ASoC: codecs: wcd938x: setup irq during component bind ASoC: dt-bindings: renesas: rsnd: Fix incorrect 'port' regex schema ALSA: usb-audio: Add missing proc text entry for BESPOKEN type ASoC: codecs: wcd938x: make sdw dependency explicit in Kconfig ASoC: SOF: Intel: Update ADL descriptor to use ACPI power states ASoC: rt5631: Fix regcache sync errors on resume ALSA: pcm: Call substream ack() method upon compat mmap commit ...
2 parents 8baef63 + b0084af commit e7562a0

23 files changed

Lines changed: 195 additions & 96 deletions

File tree

Documentation/devicetree/bindings/sound/renesas,rsnd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ properties:
114114

115115
ports:
116116
$ref: /schemas/graph.yaml#/properties/ports
117-
properties:
117+
patternProperties:
118118
port(@[0-9a-f]+)?:
119119
$ref: audio-graph-port.yaml#
120120
unevaluatedProperties: false

include/sound/soc.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,12 @@ struct snd_soc_dai_link {
712712
/* Do not create a PCM for this DAI link (Backend link) */
713713
unsigned int ignore:1;
714714

715+
/* This flag will reorder stop sequence. By enabling this flag
716+
* DMA controller stop sequence will be invoked first followed by
717+
* CPU DAI driver stop sequence
718+
*/
719+
unsigned int stop_dma_first:1;
720+
715721
#ifdef CONFIG_SND_SOC_TOPOLOGY
716722
struct snd_soc_dobj dobj; /* For topology */
717723
#endif

sound/core/pcm_native.c

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,18 @@ static bool hw_support_mmap(struct snd_pcm_substream *substream)
246246
if (!(substream->runtime->hw.info & SNDRV_PCM_INFO_MMAP))
247247
return false;
248248

249-
if (substream->ops->mmap ||
250-
(substream->dma_buffer.dev.type != SNDRV_DMA_TYPE_DEV &&
251-
substream->dma_buffer.dev.type != SNDRV_DMA_TYPE_DEV_UC))
249+
if (substream->ops->mmap)
252250
return true;
253251

254-
return dma_can_mmap(substream->dma_buffer.dev.dev);
252+
switch (substream->dma_buffer.dev.type) {
253+
case SNDRV_DMA_TYPE_UNKNOWN:
254+
return false;
255+
case SNDRV_DMA_TYPE_CONTINUOUS:
256+
case SNDRV_DMA_TYPE_VMALLOC:
257+
return true;
258+
default:
259+
return dma_can_mmap(substream->dma_buffer.dev.dev);
260+
}
255261
}
256262

257263
static int constrain_mask_params(struct snd_pcm_substream *substream,
@@ -3063,9 +3069,14 @@ static int snd_pcm_ioctl_sync_ptr_compat(struct snd_pcm_substream *substream,
30633069
boundary = 0x7fffffff;
30643070
snd_pcm_stream_lock_irq(substream);
30653071
/* FIXME: we should consider the boundary for the sync from app */
3066-
if (!(sflags & SNDRV_PCM_SYNC_PTR_APPL))
3067-
control->appl_ptr = scontrol.appl_ptr;
3068-
else
3072+
if (!(sflags & SNDRV_PCM_SYNC_PTR_APPL)) {
3073+
err = pcm_lib_apply_appl_ptr(substream,
3074+
scontrol.appl_ptr);
3075+
if (err < 0) {
3076+
snd_pcm_stream_unlock_irq(substream);
3077+
return err;
3078+
}
3079+
} else
30693080
scontrol.appl_ptr = control->appl_ptr % boundary;
30703081
if (!(sflags & SNDRV_PCM_SYNC_PTR_AVAIL_MIN))
30713082
control->avail_min = scontrol.avail_min;
@@ -3664,6 +3675,8 @@ static vm_fault_t snd_pcm_mmap_data_fault(struct vm_fault *vmf)
36643675
return VM_FAULT_SIGBUS;
36653676
if (substream->ops->page)
36663677
page = substream->ops->page(substream, offset);
3678+
else if (!snd_pcm_get_dma_buf(substream))
3679+
page = virt_to_page(runtime->dma_area + offset);
36673680
else
36683681
page = snd_sgbuf_get_page(snd_pcm_get_dma_buf(substream), offset);
36693682
if (!page)

sound/hda/intel-dsp-config.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ static const struct config_entry config_table[] = {
319319
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC,
320320
.device = 0x4b55,
321321
},
322+
{
323+
.flags = FLAG_SOF | FLAG_SOF_ONLY_IF_DMIC,
324+
.device = 0x4b58,
325+
},
322326
#endif
323327

324328
/* Alder Lake */

sound/isa/sb/sb16_csp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,7 @@ static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channel
816816
mixR = snd_sbmixer_read(p->chip, SB_DSP4_PCM_DEV + 1);
817817
snd_sbmixer_write(p->chip, SB_DSP4_PCM_DEV, mixL & 0x7);
818818
snd_sbmixer_write(p->chip, SB_DSP4_PCM_DEV + 1, mixR & 0x7);
819+
spin_unlock_irqrestore(&p->chip->mixer_lock, flags);
819820

820821
spin_lock(&p->chip->reg_lock);
821822
set_mode_register(p->chip, 0xc0); /* c0 = STOP */
@@ -855,6 +856,7 @@ static int snd_sb_csp_start(struct snd_sb_csp * p, int sample_width, int channel
855856
spin_unlock(&p->chip->reg_lock);
856857

857858
/* restore PCM volume */
859+
spin_lock_irqsave(&p->chip->mixer_lock, flags);
858860
snd_sbmixer_write(p->chip, SB_DSP4_PCM_DEV, mixL);
859861
snd_sbmixer_write(p->chip, SB_DSP4_PCM_DEV + 1, mixR);
860862
spin_unlock_irqrestore(&p->chip->mixer_lock, flags);
@@ -880,6 +882,7 @@ static int snd_sb_csp_stop(struct snd_sb_csp * p)
880882
mixR = snd_sbmixer_read(p->chip, SB_DSP4_PCM_DEV + 1);
881883
snd_sbmixer_write(p->chip, SB_DSP4_PCM_DEV, mixL & 0x7);
882884
snd_sbmixer_write(p->chip, SB_DSP4_PCM_DEV + 1, mixR & 0x7);
885+
spin_unlock_irqrestore(&p->chip->mixer_lock, flags);
883886

884887
spin_lock(&p->chip->reg_lock);
885888
if (p->running & SNDRV_SB_CSP_ST_QSOUND) {
@@ -894,6 +897,7 @@ static int snd_sb_csp_stop(struct snd_sb_csp * p)
894897
spin_unlock(&p->chip->reg_lock);
895898

896899
/* restore PCM volume */
900+
spin_lock_irqsave(&p->chip->mixer_lock, flags);
897901
snd_sbmixer_write(p->chip, SB_DSP4_PCM_DEV, mixL);
898902
snd_sbmixer_write(p->chip, SB_DSP4_PCM_DEV + 1, mixR);
899903
spin_unlock_irqrestore(&p->chip->mixer_lock, flags);

sound/pci/hda/patch_hdmi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,6 +1940,8 @@ static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t cvt_nid)
19401940
static const struct snd_pci_quirk force_connect_list[] = {
19411941
SND_PCI_QUIRK(0x103c, 0x870f, "HP", 1),
19421942
SND_PCI_QUIRK(0x103c, 0x871a, "HP", 1),
1943+
SND_PCI_QUIRK(0x1462, 0xec94, "MS-7C94", 1),
1944+
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1),
19431945
{}
19441946
};
19451947

sound/pci/hda/patch_realtek.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8626,6 +8626,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
86268626
SND_PCI_QUIRK(0x17aa, 0x3151, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
86278627
SND_PCI_QUIRK(0x17aa, 0x3176, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
86288628
SND_PCI_QUIRK(0x17aa, 0x3178, "ThinkCentre Station", ALC283_FIXUP_HEADSET_MIC),
8629+
SND_PCI_QUIRK(0x17aa, 0x31af, "ThinkCentre Station", ALC623_FIXUP_LENOVO_THINKSTATION_P340),
86298630
SND_PCI_QUIRK(0x17aa, 0x3818, "Lenovo C940", ALC298_FIXUP_LENOVO_SPK_VOLUME),
86308631
SND_PCI_QUIRK(0x17aa, 0x3827, "Ideapad S740", ALC285_FIXUP_IDEAPAD_S740_COEF),
86318632
SND_PCI_QUIRK(0x17aa, 0x3843, "Yoga 9i", ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP),

sound/soc/amd/acp-da7219-max98357a.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
576576
| SND_SOC_DAIFMT_CBM_CFM,
577577
.init = cz_rt5682_init,
578578
.dpcm_playback = 1,
579+
.stop_dma_first = 1,
579580
.ops = &cz_rt5682_play_ops,
580581
SND_SOC_DAILINK_REG(designware1, rt5682, platform),
581582
},
@@ -585,6 +586,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
585586
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
586587
| SND_SOC_DAIFMT_CBM_CFM,
587588
.dpcm_capture = 1,
589+
.stop_dma_first = 1,
588590
.ops = &cz_rt5682_cap_ops,
589591
SND_SOC_DAILINK_REG(designware2, rt5682, platform),
590592
},
@@ -594,6 +596,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
594596
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
595597
| SND_SOC_DAIFMT_CBM_CFM,
596598
.dpcm_playback = 1,
599+
.stop_dma_first = 1,
597600
.ops = &cz_rt5682_max_play_ops,
598601
SND_SOC_DAILINK_REG(designware3, mx, platform),
599602
},
@@ -604,6 +607,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
604607
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
605608
| SND_SOC_DAIFMT_CBM_CFM,
606609
.dpcm_capture = 1,
610+
.stop_dma_first = 1,
607611
.ops = &cz_rt5682_dmic0_cap_ops,
608612
SND_SOC_DAILINK_REG(designware3, adau, platform),
609613
},
@@ -614,6 +618,7 @@ static struct snd_soc_dai_link cz_dai_5682_98357[] = {
614618
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
615619
| SND_SOC_DAIFMT_CBM_CFM,
616620
.dpcm_capture = 1,
621+
.stop_dma_first = 1,
617622
.ops = &cz_rt5682_dmic1_cap_ops,
618623
SND_SOC_DAILINK_REG(designware2, adau, platform),
619624
},

sound/soc/codecs/Kconfig

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ config SND_SOC_SSM2305
13251325
high-efficiency mono Class-D audio power amplifiers.
13261326

13271327
config SND_SOC_SSM2518
1328-
tristate
1328+
tristate "Analog Devices SSM2518 Class-D Amplifier"
13291329
depends on I2C
13301330

13311331
config SND_SOC_SSM2602
@@ -1557,6 +1557,7 @@ config SND_SOC_WCD934X
15571557
Qualcomm SoCs like SDM845.
15581558

15591559
config SND_SOC_WCD938X
1560+
depends on SND_SOC_WCD938X_SDW
15601561
tristate
15611562

15621563
config SND_SOC_WCD938X_SDW
@@ -1813,11 +1814,6 @@ config SND_SOC_ZL38060
18131814
which consists of a Digital Signal Processor (DSP), several Digital
18141815
Audio Interfaces (DAIs), analog outputs, and a block of 14 GPIOs.
18151816

1816-
config SND_SOC_ZX_AUD96P22
1817-
tristate "ZTE ZX AUD96P22 CODEC"
1818-
depends on I2C
1819-
select REGMAP_I2C
1820-
18211817
# Amp
18221818
config SND_SOC_LM4857
18231819
tristate

sound/soc/codecs/rt5631.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,8 @@ static const struct regmap_config rt5631_regmap_config = {
16951695
.reg_defaults = rt5631_reg,
16961696
.num_reg_defaults = ARRAY_SIZE(rt5631_reg),
16971697
.cache_type = REGCACHE_RBTREE,
1698+
.use_single_read = true,
1699+
.use_single_write = true,
16981700
};
16991701

17001702
static int rt5631_i2c_probe(struct i2c_client *i2c,

0 commit comments

Comments
 (0)