Date: Tue, 23 Mar 2021 23:27:47 +0100 From: Alfonso Siciliano <alfix86@gmail.com> To: freebsd-hackers@freebsd.org Subject: Re: [GSoC 2021] Project Proposal Message-ID: <20210323232747.80b0c7413c758e0d30d50727@gmail.com> In-Reply-To: <20210322175529.kadptzccf7vhtz27@pleb> References: <20210322144928.ry75v5nlfhpzcfir@pleb> <93c692373cf35aae8dab4f1c63c38d08@bsdforge.com> <20210322161802.zouhvffwcuibwtmb@pleb> <d5924e61-842a-54d6-8a3e-1908225baeb2@quip.cz> <20210322175529.kadptzccf7vhtz27@pleb>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Christos, On Mon, 22 Mar 2021 16:49:28 +0200 Christos Margiolis <christos@christosmarg.xyz> wrote: > To not bore with useless information, I basically wanted to implement a > "toggle" option for mixer(8) so that you can mute and unmute the mixer easily > without having to write external scripts to do that. Others have apparently > asked for the same thing in the forums too. > > However, in order to be able to mute and unmute the mixer requires the program > to have knowledge of the previous volume so that it can set it back, which means > that since mixer(8) is an one-shot program, it would have to write a file to the > disk, which is not the most pretty solution. > 2. In order to solve the mixer toggling "issue" without having to > write anything to disk, a new daemon called mixerd(8) can be > written using libmixer(3) to keep track of the volume history > among other things. I know the problem, my solution in mixertui.c was to define `struct item` with `.lvol|.rvol|.lmute|.rmute`, however mixer(8) is an one-shot program so mixerd or /var/db/mixerN-state could make sense, but why not the ideal solution: to implement SNDCTL_MIX_EXTINFO, MIXT_ONOFF and the other missing mixer ioctls avoiding computation and daemons in userland? > Apart from the reasons I mentioned above, which I think would make > mixer handling easier and more extensible, I think this library could > go as far as to implement support for virtual_oss and the like. I considered to implement a mixer library in the past but I chose to avoid a new library for a few ioctls. However if you are considering to add the support for virtual_oss the library could became interesting. Tip: you could move the discussion to multimedia@freebsd.org. Good luck! Alfonso --- Alfonso S. Siciliano https://alfonsosiciliano.gitlab.io
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20210323232747.80b0c7413c758e0d30d50727>