freebsd-dev/sys/dev/sound/pcm
Hans Petter Selasky 8461d581cf 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
2016-02-09 17:09:14 +00:00
..
ac97_if.m
ac97_patch.c
ac97_patch.h
ac97.c
ac97.h
buffer.c
buffer.h
channel_if.m
channel.c
channel.h
dsp.c
dsp.h
feeder_chain.c
feeder_eq.c
feeder_format.c
feeder_if.m
feeder_matrix.c
feeder_mixer.c
feeder_rate.c
feeder_volume.c
feeder.c
feeder.h
g711.h
intpcm.h
matrix_map.h
matrix.h
mixer_if.m
mixer.c
mixer.h
pcm.h
sndstat.c
sndstat.h
sound.c
sound.h
vchan.c
vchan.h