klange / toaruos

A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
https://toaruos.org/
University of Illinois/NCSA Open Source License
6.13k stars 487 forks source link

Add mixer knob reading/writing support to snd #90

Closed gerow closed 9 years ago

gerow commented 9 years ago

This defines the interface between snd and the audio driver and begins defining some of the pieces for the ioctl calls between userspace and snd. The userspace interface isn't fully realized yet, but this patch series includes three debug shell functions to play around with changing the volume using only the interface to the sound card driver:

snd_off: turns volume all the way down snd_half: turns volume to half snd_full: turns volume to full

gerow commented 9 years ago

When I rebased and removed that commit your comment disappeared. That was certainly unexpected. Anyway, I've gone ahead and moved things around as you suggested: move userspace snd.h to sound.h and just symlink sound.h into the module directory.

I need to figure out a better way to change code in a patch series without github getting angry at me...

klange commented 9 years ago

Rebasing is fine, github actually manages it reasonably well if you look above.

It looks like you're intending to implement knob querying through ioctls, but haven't implemented it yet; we should get in that in before merging.

gerow commented 9 years ago

sounds good to me. I'll probably just add that to this branch and re-ping the pull request.

gerow commented 9 years ago

Added the ioctl interface at /dev/mixer and a command line utility for interacting with it. Also rebased from latest commit in strawberry-dev. Please take another look.