====== Sound mixer improvements ====== * Student: [[/ChristosMargiolis|ChristosMargiolis]] (christos@) * Mentor: [[/HansPetterSelasky|HansPetterSelasky]] (hselasky@) ===== Project description ===== %%FreeBSD%%'s default mixer utilities are not the best; ''%%mixer(8)%%'' is very basic and outdated, end users have to tweak ''%%sysctl(8)%%'' values to do simple things and programmers have to write DIY implementations for their programs (e.g ''%%audio/mixertui%%''). This project aims to improve mixer handling for OSS on %%FreeBSD%% and make life for both programmers and users easier. ===== Deliverables ===== * A ''%%mixer(3)%%'' library. * Read all devices and knobs. * Extend knob capabilities: * 32-bit floating point left-right volume knobs. * Muting. * Recording input selector. * Select default sound card (not really a mixer feature, but really useful to have). * Provide as much information as possible about the mixer. * Use the more modern OSSv4's ioctls. * Rewrite ''%%mixer(8)%%''. * Use ''%%mixer(3)%%'' and its new features. * Get rid of the old codebase completely. * Add more command line options. * Control-oriented interface like in ''%%sysctl(8)%%''. * Implement some missing but useful for ''%%mixer(3)%%'' OSS ioctls in the kernel. * Implement sound device playback/recording status ''%%sysctl%%''. * Update ''%%/etc/rc.d/mixer%%'' to work with the new version of ''%%mixer(8)%%''. * Make ''%%/dev/sndstat%%'' "useless" by containing its information in the output of ''%%mixer(8)%%''. ===== What didn't get done ===== * Panning capabilities in mixer(3), but it should be easy to write a DIY handler using the ''%%mix_ctl_t%%'' interface. ===== Test plan ===== Since a new version of ''%%mixer(8)%%'' is one of the delievarables, it'll also serve as a testing ground for the library. Me and the mentor will also test the library with various sound devices we own. ===== Weekly progress ===== ^ Email archive ^ | [[https://lists.freebsd.org/pipermail/soc-status/2021-June/001262.html|Week 1]] | | [[https://lists.freebsd.org/pipermail/soc-status/2021-June/001264.html|Week 2]] | | [[https://lists.freebsd.org/pipermail/soc-status/2021-June/001265.html|Week 3]] | | [[https://lists.freebsd.org/pipermail/soc-status/2021-July/001267.html|Week 4]] | | [[https://lists.freebsd.org/pipermail/soc-status/2021-July/001269.html|Week 5]] | | [[https://lists.freebsd.org/pipermail/soc-status/2021-July/001270.html|Week 6]] | | Week 7 (Vacation) | | [[https://lists.freebsd.org/archives/soc-status/2021-August/000001.html|Week 8]] | | [[https://lists.freebsd.org/archives/soc-status/2021-August/000002.html|Week 9]] | | [[https://lists.freebsd.org/archives/soc-status/2021-August/000003.html|Week 10]] | ===== The code ===== * [[https://github.com/christosmarg/mixer|GitHub]] * [[https://git.sr.ht/~crm/mixer|Sourcehut]] * [[https://git.margiolis.net/mixer/files.html|My own Git server]] ===== Documentation ===== * [[https://www.freebsd.org/cgi/man.cgi?query=mixer&apropos=0&sektion=3&manpath=FreeBSD+14.0-current&arch=default&format=html|mixer(3)]] * [[https://www.freebsd.org/cgi/man.cgi?query=mixer&apropos=0&sektion=8&manpath=FreeBSD+14.0-current&arch=default&format=html|mixer(8)]] ===== Code reviews ===== * [[https://reviews.freebsd.org/D31130|sound(4) mute ioctls implementation]] ([[https://cgit.freebsd.org/src/commit/?id=0f8dafb45859569aa36b63ca2bb4a1c35c970d1e|merged]]) * [[https://reviews.freebsd.org/D31320|sound(4) playback/recording mode sysctl implementation]] ([[https://cgit.freebsd.org/src/commit/?id=ed2196e5df0c8b5b81563d2fffdcb32bb7ebe966|merged]]) * [[https://reviews.freebsd.org/D31636|Final project review]] ([[https://cgit.freebsd.org/src/commit/?id=903873ce15600fc02a0ea42cbf888cff232b411d|merged]]) ===== Useful links ===== * [[http://manuals.opensound.com/developer/|OSS 4.x Programmer's Guide]] * [[https://www.freebsd.org/cgi/man.cgi?query=sound&apropos=0&sektion=0&manpath=FreeBSD+13.0-RELEASE+and+Ports&arch=default&format=html|sound(4)]] * [[https://www.freebsd.org/cgi/man.cgi?query=sysctl&apropos=0&sektion=0&manpath=FreeBSD+13.0-RELEASE+and+Ports&arch=default&format=html|sysctl(8)]] * [[https://man.openbsd.org/mixerctl|mixerctl(8)]] ---- {{tag>Gsoc}}