]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: fix PCM playback through ALSA OSS emulation
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Fri, 10 Jan 2020 23:57:49 +0000 (17:57 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 13 Jan 2020 15:00:00 +0000 (15:00 +0000)
commite29ffac7b96ee15f4a51aba522247da4d10cdbe6
tree6aa3be4971c9f51ac726ec033db3130143c5d05f
parentc079d427cc3ce7fd71d08f34cb0b9bb9332a2719
ASoC: SOF: fix PCM playback through ALSA OSS emulation

Any app using ALSA OSS emulation on top of SOF will fail
to error from OSS SNDCTL_DSP_SETFMT ioctl. Reported initially
as an issue with xournalpp (application using PortAudio with
an OSS backend), but applies more generally to other apps
using OSS as well.

Problem is caused by SOF PCM not supporting repeated calls
to hw_params(), without matching calls to pcm_free(). This
is however exactly what the ALSA OSS PCM code is doing when
it is handling the OSS ioctls.

The problem will lead to leaking of DSP resources and eventual
failure of DSP PCM_PARAMS IPC.

BugLink: https://github.com/thesofproject/linux/issues/1510
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200110235751.3404-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pcm.c