On Sat, Apr 27, 2019 at 10:10:07AM -0500, joshua stein wrote: > On Sat, 27 Apr 2019 at 14:20:32 -0000, Christian Weisgerber wrote: > > However, as in this example, I think you will only get a few generic > > controls. > > > > It is my theoretical understanding that USB audio gadgets typically > > come with a uhid(4) device, as does yours above, and you would use > > usbhidctl(1) to list and manipulate the available controls. > > > > In practice, I only get some variant of > > > > usbhidctl: USB_GET_REPORT (probably not supported by device): Input/output > > error > > > > when I try this. So either I'm mistaken or there is a problem > > somewhere. > > Some devices just don't supply hardware volume controls, so it must > be done in software on the sending device. > > With sndiod, you can use aucatctl to change the software volume > per-application (or the master volume). > > It's all kind of complicated though. If you plug in a new USB audio > device like this, you have to restart sndiod and pass in a new > device name, then use aucatctl to adjust the volume. But if you > unplug the USB device, you have to restart sndiod again to use the > default audio device and use mixerctl instead.
Here's a small aucatctl-like program to control sndiod volume in X: http://caoua.org/alex/obsd/xvolkeys-1.0.tar.gz In the .xinitrc or .xsession add: xvolkeys -D Then, use Ctrl-Alt-Plus and Ctrl-Alt-Minus to increment and decrement sndiod master volume.