linux/include
Pierre-Louis Bossart 848aedfdc6
ASoC: soc-pcm: test refcount before triggering
On start/pause_release/resume, when more than one FE is connected to
the same BE, it's possible that the trigger is sent more than
once. This is not desirable, we only want to trigger a BE once, which
is straightforward to implement with a refcount.

For stop/pause/suspend, the problem is more complicated: the check
implemented in snd_soc_dpcm_can_be_free_stop() may fail due to a
conceptual deadlock when we trigger the BE before the FE. In this
case, the FE states have not yet changed, so there are corner cases
where the TRIGGER_STOP is never sent - the dual case of start where
multiple triggers might be sent.

This patch suggests an unconditional trigger in all cases, without
checking the FE states, using a refcount protected by the BE PCM
stream lock.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20211207173745.15850-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-12-14 17:15:47 +00:00
..
acpi Merge branches 'acpica', 'acpi-ec', 'acpi-pmic' and 'acpi-video' 2021-11-10 14:03:14 +01:00
asm-generic asm-generic: asm/syscall.h cleanup 2021-11-10 11:22:03 -08:00
clocksource ARM: 2021-11-02 11:24:14 -07:00
crypto crypto: ecc - Export additional helper functions 2021-10-29 21:04:03 +08:00
drm Removed the TTM Huge Page functionnality to address a crash, a timeout 2021-11-11 08:14:19 +10:00
dt-bindings ASoC: rt5640: Add the binding include file for the HDA header support 2021-11-25 11:54:32 +00:00
keys
kunit include/kunit/test.h: replace kernel.h with the necessary inclusions 2021-11-09 10:02:49 -08:00
kvm
linux firmware: cs_dsp: Allow creation of event controls 2021-11-17 22:16:28 +00:00
math-emu
media Merge branch 'akpm' (patches from Andrew) 2021-11-09 10:11:53 -08:00
memory
misc
net Networking fixes for 5.16-rc1, including fixes from bpf, can 2021-11-11 09:49:36 -08:00
pcmcia
ras
rdma RDMA/hns: Use the core code to manage the fixed mmap entries 2021-10-29 14:07:31 -03:00
scsi SCSI misc on 20211112 2021-11-12 12:25:50 -08:00
soc ARM: SoC drivers for 5.16 2021-11-03 17:00:52 -07:00
sound ASoC: soc-pcm: test refcount before triggering 2021-12-14 17:15:47 +00:00
target
trace f2fs-for-5.16-rc1 2021-11-13 11:20:22 -08:00
uapi ALSA: pcm: introduce INFO_NO_REWINDS flag 2021-11-24 12:57:18 +00:00
vdso
video
xen xen/balloon: rename alloc/free_xenballooned_pages 2021-11-04 12:59:44 -05:00