[GSoC 2021] Project Proposal

Alfonso Siciliano alfix86 at gmail.com
Tue Mar 23 22:27:57 UTC 2021


Hi Christos,

On Mon, 22 Mar 2021 16:49:28 +0200
Christos Margiolis <christos at 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 at freebsd.org.
Good luck!

Alfonso

--- 
 Alfonso S. Siciliano 
 
 https://alfonsosiciliano.gitlab.io



More information about the freebsd-hackers mailing list