diff options
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/gadget/g_audio.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/usb/gadget/g_audio.c b/sys/dev/usb/gadget/g_audio.c index a1d2394..fdcb5c8 100644 --- a/sys/dev/usb/gadget/g_audio.c +++ b/sys/dev/usb/gadget/g_audio.c @@ -587,6 +587,16 @@ g_audio_handle_request(device_t dev, *plen = 0; } return (0); + } else if ((req->bmRequestType == UT_READ_CLASS_INTERFACE) && + (req->bRequest == 0x81 /* get value */ )) { + + if (offset == 0) { + *plen = sizeof(sc->sc_volume_setting); + *pptr = &sc->sc_volume_setting; + } else { + *plen = 0; + } + return (0); } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && (req->bRequest == 0x01 /* set value */ )) { |