diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2016-02-09 17:09:14 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2016-02-09 17:09:14 +0000 |
commit | 8461d581cf1591a56afcd3b36a952066065177bb (patch) | |
tree | ec2214ed481c12474964e82661ccf4447aabd5f8 /sys/dev/sound/pcm/sound.h | |
parent | 2668945977725526727c9f3f708dc4d887e0e7a9 (diff) | |
download | src-8461d581cf1591a56afcd3b36a952066065177bb.tar.gz src-8461d581cf1591a56afcd3b36a952066065177bb.zip |
To support userspace audio daemons like Virtual OSS, /dev/sndstat is
made writeable by the root user. Userspace audio daemons can add or
update an entry in /dev/sndstat by doing a single system write call to
any /dev/sndstat file descriptor handle. When the audio daemon closes the
file handle or is killed the entry disappears.
While at it, cleanup the sound status code a bit:
- keep the device list sorted to avoid sorting the list every time a
/dev/sndstat read request is made.
- factor out locking into a pair of locking macros.
- use the sound status lock to protect all per file handle states,
when generating the output for /dev/sndstat and when removing or
adding sound status devices. This way sndstat_acquire() and
sndstat_release() become superfluous and can be removed.
Reviewed by: mav @
Differential Revision: https://reviews.freebsd.org/D5191
Notes
Notes:
svn path=/head/; revision=295440
Diffstat (limited to 'sys/dev/sound/pcm/sound.h')
-rw-r--r-- | sys/dev/sound/pcm/sound.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h index 32e034330f74..2897aed18508 100644 --- a/sys/dev/sound/pcm/sound.h +++ b/sys/dev/sound/pcm/sound.h @@ -350,8 +350,6 @@ void snd_mtxassert(void *m); #define snd_mtxunlock(m) mtx_unlock(m) typedef int (*sndstat_handler)(struct sbuf *s, device_t dev, int verbose); -int sndstat_acquire(struct thread *td); -int sndstat_release(struct thread *td); int sndstat_register(device_t dev, char *str, sndstat_handler handler); int sndstat_registerfile(char *str); int sndstat_unregister(device_t dev); |