CVSROOT:        /cvs
Module name:    src
Changes by:     an...@cvs.openbsd.org   2022/02/15 23:23:42

Modified files:
        sys/dev        : audio.c 
        sys/dev/usb    : uaudio.c ucc.c usb_subr.c usbdi.h 
        sys/dev/wscons : wskbd.c wskbdvar.h 

Log message:
Currently, wskbd_set_mixervolume() only adjusts the volume of the first
attached audio device, i.e. audio0. This approach does not work well
while using additional audio devices equipped with physical volume keys
since those would only affect the volume of audio0.

Instead, correlate audio and ucc devices attached over USB in order to
adjust the volume of the correct audio device. This is done by passing a
cookie from the common point of attachment which is later used to
correlate the audio and wskbd device.

The same approach could be adopted for audio and wskbd devices attaching
on a different bus. Keep in mind that it's of importance to make use of
and increment the same global cookie identifier to avoid collisions.

Makes the volume keys on my Logitech G435 Headset do the right thing.

ok ratchov@

Reply via email to