Date: Tue, 6 Jul 2021 03:30:49 +0300 From: Christos Margiolis <christos@freebsd.org> To: soc-status@freebsd.org Cc: hselasky@freebsd.org Subject: [GSoC'21 Weekly Update #4] Sound mixer improvements Message-ID: <20210706003049.62fdol7imlocw2a2@pleb>
index | next in thread | raw e-mail
Hello, This the last week's report. Kernel: - Re-implemented the SOUND_MIXER_WRITE_MUTE and SOUND_MIXER_READ_MUTE ioctls in `/usr/src/sys/dev/sound/pcm/mixer.c`, where all the other OSS mixer ioctls are implemented. These two ioctls were not part of the current version of OSS and were considered obsolete. HOWEVER, I decided to change their behavior, so this implementation is not backwards compatible with the old one, but that should not be a problem. Older OSS versions had the MUTE ioctls take/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/returns a bitmask that tells us which devices are muted. This allows us to (un)mute only the devices we want, instead of the whole mixer. The bitmask works the same way as in DEVMASK, RECMASK and RECSRC. mixer(8): - Added sysctl(8)-style controls for easier parsing and extensibility. The following formats can be used: * dev show a device's controls and their values * dev.control show a control's value * dev.control=value set a control value The currently available controls are: * dev.volume set/display volume * dev.recsrc set/display recording source * dev.mute set/display mute For example, to set the `vol` device's volume to 0.65, we can now do `mixer vol.volume=0.65`. mixer(3): - Added a new function to handle muting. Documentation: - Started working on the man pages for both mixer(3) and mixer(8). The code is available on: - GitHub: https://github.com/christosmarg/mixer - Sourcehut: https://git.sr.ht/~crm/mixer - My Git server: https://git.margiolis.net/mixer/files.html The project's Wiki article can be found at: - https://wiki.freebsd.org/SummerOfCode2021Projects/SoundMixerImprovements -- Christoshome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210706003049.62fdol7imlocw2a2>
