linux/include/sound
Jai Luthra 6114985177 ALSA: dmaengine: Synchronize dma channel after drop()
[ Upstream commit e8343410dd ]

Sometimes the stream may be stopped due to XRUN events, in which case
the userspace can call snd_pcm_drop() and snd_pcm_prepare() to stop and
start the stream again.

In these cases, we must wait for the DMA channel to synchronize before
marking the stream as prepared for playback, as the DMA channel gets
stopped by drop() without any synchronization. Make sure the ALSA core
synchronizes the DMA channel by adding a sync_stop() hook.

Reviewed-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Link: https://lore.kernel.org/r/20240611-asoc_next-v3-1-fcfd84b12164@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-27 10:46:11 +02:00
..
ac97 ASoC: ac97: convert to SPDX identifiers 2018-07-02 10:56:09 +01:00
sof ASoC: SOF: ext_manifest: use explicit number for elem_type 2021-02-10 17:17:13 +00:00
ac97_codec.h ALSA: ac97: Treat snd_ac97_bus_ops as const 2020-01-03 09:24:08 +01:00
aci.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ad1816a.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ad1843.h
adau1373.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 149 2019-05-30 11:25:18 -07:00
ak4xxx-adda.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ak4113.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ak4114.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ak4117.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ak4531_codec.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
ak4641.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
alc5623.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
asequencer.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
asound.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
asoundef.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
compress_driver.h ALSA: compress: Drop unused functions 2021-07-15 10:22:30 +02:00
control.h ALSA: control: Use deferred fasync helper 2022-08-25 11:40:44 +02:00
core.h ALSA: core: Add async signal helpers 2022-08-25 11:40:44 +02:00
cs35l33.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cs35l34.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cs35l35.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cs35l36.h ASoC: cs35l36: Add support for Cirrus CS35L36 Amplifier 2019-02-08 13:00:28 +00:00
cs42l52.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cs42l56.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cs42l73.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cs4231-regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cs4271.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
cs8403.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
cs8427.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
da7213.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
da7218.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
da7219-aad.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
da7219.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
da9055.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
designware_i2s.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
dmaengine_pcm.h ALSA: dmaengine: Synchronize dma channel after drop() 2024-07-27 10:46:11 +02:00
emu10k1_synth.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emu10k1.h ALSA: emu10k1: Allocate resources with device-managed APIs 2021-07-19 16:16:56 +02:00
emu8000_reg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emu8000.h ALSA: sb: Allocate resources with device-managed APIs 2021-07-19 16:17:14 +02:00
emux_legacy.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
emux_synth.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
es1688.h ALSA: es1688: Avoid devres management for es1688 object creation 2021-08-05 08:24:17 +02:00
graph_card.h ASoC: audio-graph: move audio_graph_remove() to simple-card-utils.c 2021-04-20 17:25:45 +01:00
gus.h ALSA: isa/gus: remove -Wmissing-prototypes warnings 2020-07-07 11:59:59 +02:00
hda_chmap.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hda_codec.h ALSA: hda: Fix potential deadlock at codec unbinding 2022-01-27 11:04:05 +01:00
hda_component.h i915/snd_hdac: I915 subcomponent for the snd_hdac 2019-02-08 16:58:59 +01:00
hda_hwdep.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 32 2019-05-24 17:27:10 +02:00
hda_i915.h ALSA: hda: Make audio component support more generic 2018-07-17 22:25:48 +02:00
hda_register.h ALSA: hda: Change AZX_MAX_BUF_SIZE from 1GB to 4MB 2021-03-19 16:54:58 +01:00
hda_regmap.h ALSA: hda: Manage concurrent reg access more properly 2020-01-13 13:40:41 +01:00
hda_verbs.h ALSA: hda: add verbs for stripe control 2019-01-14 19:52:23 +01:00
hdaudio_ext.h ALSA/ASoC: hda: move/rename snd_hdac_ext_stop_streams to hdac_stream.c 2022-12-31 13:14:44 +01:00
hdaudio.h ALSA: hda: add snd_hdac_stop_streams() helper 2022-12-31 13:14:44 +01:00
hdmi-codec.h ASoC: hdmi-codec: Add a prepare hook 2021-06-10 11:48:56 +02:00
hwdep.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
i2c.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
info.h ALSA: info: Make snd_info_entry_ops as const 2020-01-03 09:24:18 +01:00
initval.h ALSA: Allow const arrays for legacy resource management helpers 2020-01-05 16:14:26 +01:00
intel-dsp-config.h ALSA: hda: intel-dsp-config: add helper for ACPI DSP driver selection 2020-11-19 18:24:35 +00:00
intel-nhlt.h ALSA: hda: intel-nhlt: verify config type 2021-03-02 10:22:47 +01:00
jack.h ALSA: jack: Access input_dev under mutex 2022-06-09 10:22:32 +02:00
l3.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
madera-pdata.h ASoC: madera: Update SPDX headers 2019-06-26 12:27:50 +01:00
max9768.h
max98088.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
max98090.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
max98095.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
memalloc.h ALSA: memalloc: Correctly name as WC 2021-08-04 08:07:58 +02:00
minors.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
mixer_oss.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
mpu401.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
omap-hdmi-audio.h ALSA: Replace HTTP links with HTTPS ones 2020-07-19 20:49:25 +02:00
opl3.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
opl4.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pcm_drm_eld.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pcm_iec958.h ALSA: iec958: Split status creation and fill 2021-06-08 17:05:41 +02:00
pcm_oss.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pcm_params.h ALSA: pcm: Remove unused inline function snd_mask_sizeof 2020-09-09 18:43:07 +02:00
pcm-indirect.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
pcm.h ASoC: soc-pcm: Fix DPCM lockdep warning due to nested stream locks 2023-05-17 11:50:26 +02:00
pt2258.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pxa2xx-lib.h ALSA: pxa2xx: Use managed PCM buffer allocation 2021-08-04 08:08:21 +02:00
rawmidi.h ALSA: rawmidi: introduce SNDRV_RAWMIDI_IOCTL_USER_PVERSION 2021-09-23 09:26:40 +02:00
rt286.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt298.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt1015.h ASoC: rt1015: add delay to fix pop noise from speaker 2020-11-05 17:25:17 +00:00
rt5514.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt5659.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt5660.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt5663.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt5665.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt5668.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
rt5682.h ASoC: rt5682: Add a new property for the DMIC clock driving 2020-11-13 14:22:09 +00:00
s3c24xx_uda134x.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sb16_csp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
sb.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
seq_device.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
seq_kernel.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
seq_midi_emul.h ALSA: seq: Constify struct snd_midi_op 2020-01-03 09:24:19 +01:00
seq_midi_event.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
seq_oss_legacy.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
seq_oss.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
seq_virmidi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
sh_dac_audio.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sh_fsi.h ASoC: fsi: convert to SPDX identifiers 2018-08-02 10:56:59 +01:00
simple_card_utils.h ASoC: audio-graph: move audio_graph_remove() to simple-card-utils.c 2021-04-20 17:25:45 +01:00
simple_card.h ASoC: simple-card: convert to SPDX identifiers 2018-07-02 10:52:47 +01:00
snd_wavefront.h ASoC: Updates for v4.15 2017-11-13 15:45:57 +01:00
soc-acpi-intel-match.h ASoC: Intel: common: add ACPI matching tables for Alder Lake 2020-12-09 16:52:04 +00:00
soc-acpi.h ASoC: soc-acpi: add new fields for mach_params 2021-04-12 17:05:51 +01:00
soc-card.h ASoC: soc-card: Add storage for PCI SSID 2023-11-28 16:56:17 +00:00
soc-component.h ASoC: soc-utils: add snd_soc_component_is_dummy() 2021-04-16 14:34:12 +01:00
soc-dai.h ASoC/SoundWire: dai: expand 'stream' concept beyond SoundWire 2023-01-12 11:58:49 +01:00
soc-dapm.h ASoC: soc-dapm.h: fixup warning struct snd_pcm_substream not declared 2023-03-10 09:39:31 +01:00
soc-dpcm.h ASoC: soc-pcm: test if a BE can be prepared 2023-06-21 15:59:13 +02:00
soc-jack.h ASoC: add soc-jack.h 2020-11-30 12:54:02 +00:00
soc-link.h ASoC: soc-pcm: care trigger rollback 2020-12-09 12:13:38 +00:00
soc-topology.h ASoC: topology: Fix stub for snd_soc_tplg_component_remove() 2021-11-18 19:16:55 +01:00
soc.h ASoC: soc-card: Add storage for PCI SSID 2023-11-28 16:56:17 +00:00
sof.h ASoC: SOF: add a helper to get topology configured bclk 2021-07-11 23:48:30 +01:00
soundfont.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
spear_dma.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
spear_spdif.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
sta32x.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
sta350.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
tas2552-plat.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
tas5086.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tea6330t.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
timer.h ALSA: timer: Replace tasklet with work 2020-09-09 18:32:52 +02:00
tlv320aic3x.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tlv320aic32x4.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tlv320dac33-plat.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tlv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
tpa6130a2-plat.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336 2019-06-05 17:37:07 +02:00
uda134x.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
uda1380.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
util_mem.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
vx_core.h ALSA: vx: Constify snd_vx_hardware and snd_vx_ops definitions 2020-01-03 09:24:20 +01:00
wavefront.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
wm0010.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
wm1250-ev1.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wm2000.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wm2200.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wm5100.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wm8903.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wm8904.h ASoC: Spelling s/configr/configur/ 2019-10-25 11:06:57 +01:00
wm8955.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
wm8960.h ASoC: wm8960: Support headphone jack detection function 2020-06-15 20:58:33 +01:00
wm8962.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wm8993.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wm8996.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wm9081.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wm9090.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
wss.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00