Date: Tue, 5 Aug 2014 18:35:34 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269602 - head/sys/dev/usb/gadget Message-ID: <53e123f6.59cd.1ec0630f@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Tue Aug 5 18:35:34 2014 New Revision: 269602 URL: http://svnweb.freebsd.org/changeset/base/269602 Log: Add handler for read-back of USB audio volume levels. Modified: head/sys/dev/usb/gadget/g_audio.c Modified: head/sys/dev/usb/gadget/g_audio.c ============================================================================== --- head/sys/dev/usb/gadget/g_audio.c Tue Aug 5 18:19:51 2014 (r269601) +++ head/sys/dev/usb/gadget/g_audio.c Tue Aug 5 18:35:34 2014 (r269602) @@ -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 */ )) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e123f6.59cd.1ec0630f>