HomeFreeBSD

Implement the SOUND_MIXER_WRITE_MUTE and SOUND_MIXER_READ_MUTE ioctl(9)s.

Description

Implement the SOUND_MIXER_WRITE_MUTE and SOUND_MIXER_READ_MUTE ioctl(9)s.

These two ioctls are not part of the current version of OSS and were
considered obsolete. However, their behaviour is not the same as their
old one, so this implementation is specific to FreeBSD.

Older OSS versions had the MUTE ioctls take and return an integer with
a value of 0 or 1, which meant that the _whole_ mixer is unmuted or
muted respectively. In my implementation, the ioctl takes and returns
a bitmask that tells us which devices are muted.

This allows us to mute and unmute only the devices we want, instead of the
whole mixer. The bitmask works the same way as in DEVMASK, RECMASK and
RECSRC.

Integrated the hardware volume feature with the new mute system.

Submitted by: Christos Margiolis <christos@freebsd.org>
Differential Revision: https://reviews.freebsd.org/D31130
MFC after: 1 week
Sponsored by: NVIDIA Networking

Details

Provenance
hselaskyAuthored on Jul 20 2021, 5:02 PM
Differential Revision
D31130: sound(4): mixer: implement (un)muting
Parents
rG8c439847f0d3: riscv: Include spibus and spigen in GENERIC
Branches
Unknown
Tags
Unknown