linux/sound/core/oss
Takashi Iwai f0061c18c1 ALSA: pcm: Avoid reference to status->state
In the PCM core and driver code, there are lots place referring to the
current PCM state via runtime->status->state.  This patch introduced a
local PCM state in runtime itself and replaces those references with
runtime->state.  It has improvements in two aspects:

- The reduction of a indirect access leads to more code optimization

- It avoids a possible (unexpected) modification of the state via mmap
  of the status record

The status->state is updated together with runtime->state, so that
user-space can still read the current state via mmap like before,
too.

This patch touches only the ALSA core code.  The changes in each
driver will follow in later patches.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220926135558.26580-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-27 08:44:05 +02:00
..
copy.c
io.c ALSA: pcm: Build OSS writev/readv helpers conditionally 2017-06-02 19:38:26 +02:00
linear.c ALSA: pcm: oss: Avoid potential buffer overflows 2019-12-04 15:51:30 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mixer_oss.c ALSA: mixer: fix deadlock in snd_mixer_oss_set_volume 2021-10-26 07:59:40 +02:00
mulaw.c ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check 2020-09-01 15:18:33 +02:00
pcm_oss.c ALSA: pcm: Avoid reference to status->state 2022-09-27 08:44:05 +02:00
pcm_plugin.c ALSA: oss: Fix PCM OSS buffer allocation overflow 2022-03-18 14:01:07 +01:00
pcm_plugin.h ALSA: Replace zero-length array with flexible-array 2020-05-07 22:30:36 +02:00
rate.c ALSA: oss: Use DIV_ROUND_CLOSEST() instead of open-coding it 2020-12-25 09:11:54 +01:00
route.c ALSA: pcm: oss: Avoid potential buffer overflows 2019-12-04 15:51:30 +01:00