Lines Matching +full:0 +full:x07
43 #define USBAUDIO_VENDOR_NUM 0x46f4 /* CRC16() of "QEMU" */
44 #define USBAUDIO_PRODUCT_NUM 0x0002
93 * block diagrams. Alternative setting 0 is always the null block diagram,
97 ALTSET_OFF = 0x00, /* No endpoint */
98 ALTSET_STEREO = 0x01, /* Single endpoint */
99 ALTSET_51 = 0x02,
100 ALTSET_71 = 0x03,
109 #define U16(x) ((x) & 0xff), (((x) >> 8) & 0xff)
110 #define U24(x) U16(x), (((x) >> 16) & 0xff)
111 #define U32(x) U24(x), (((x) >> 24) & 0xff)
123 .bInterfaceNumber = 0,
124 .bNumEndpoints = 0,
133 0x09, /* u8 bLength */
136 U16(0x0100), /* u16 bcdADC */
137 U16(0x2b), /* u16 wTotalLength */
138 0x01, /* u8 bInCollection */
139 0x01, /* u8 baInterfaceNr */
144 0x0c, /* u8 bLength */
147 0x01, /* u8 bTerminalID */
148 U16(0x0101), /* u16 wTerminalType */
149 0x00, /* u8 bAssocTerminal */
150 0x02, /* u8 bNrChannels */
151 U16(0x0003), /* u16 wChannelConfig */
152 0x00, /* u8 iChannelNames */
158 0x0d, /* u8 bLength */
161 0x02, /* u8 bUnitID */
162 0x01, /* u8 bSourceID */
163 0x02, /* u8 bControlSize */
164 U16(0x0001), /* u16 bmaControls(0) */
165 U16(0x0002), /* u16 bmaControls(1) */
166 U16(0x0002), /* u16 bmaControls(2) */
172 0x09, /* u8 bLength */
175 0x03, /* u8 bUnitID */
176 U16(0x0301), /* u16 wTerminalType (SPK) */
177 0x00, /* u8 bAssocTerminal */
178 0x02, /* u8 bSourceID */
186 .bNumEndpoints = 0,
202 0x07, /* u8 bLength */
205 0x01, /* u8 bTerminalLink */
206 0x00, /* u8 bDelay */
207 0x01, 0x00, /* u16 wFormatTag */
212 0x0b, /* u8 bLength */
215 0x01, /* u8 bFormatType */
216 0x02, /* u8 bNrChannels */
217 0x02, /* u8 bSubFrameSize */
218 0x10, /* u8 bBitResolution */
219 0x01, /* u8 bSamFreqType */
226 .bEndpointAddress = USB_DIR_OUT | 0x01,
227 .bmAttributes = 0x0d,
234 0x07, /* u8 bLength */
237 0x00, /* u8 bmAttributes */
238 0x00, /* u8 bLockDelayUnits */
239 U16(0x0000), /* u16 wLockDelay */
247 .bcdUSB = 0x0100,
256 .bMaxPower = 0x32,
267 .bcdDevice = 0,
280 .bInterfaceNumber = 0,
281 .bNumEndpoints = 0,
290 0x09, /* u8 bLength */
293 U16(0x0100), /* u16 bcdADC */
294 U16(0x37), /* u16 wTotalLength */
295 0x01, /* u8 bInCollection */
296 0x01, /* u8 baInterfaceNr */
301 0x0c, /* u8 bLength */
304 0x01, /* u8 bTerminalID */
305 U16(0x0101), /* u16 wTerminalType */
306 0x00, /* u8 bAssocTerminal */
307 0x08, /* u8 bNrChannels */
308 U16(0x063f), /* u16 wChannelConfig */
309 0x00, /* u8 iChannelNames */
315 0x19, /* u8 bLength */
318 0x02, /* u8 bUnitID */
319 0x01, /* u8 bSourceID */
320 0x02, /* u8 bControlSize */
321 U16(0x0001), /* u16 bmaControls(0) */
322 U16(0x0002), /* u16 bmaControls(1) */
323 U16(0x0002), /* u16 bmaControls(2) */
324 U16(0x0002), /* u16 bmaControls(3) */
325 U16(0x0002), /* u16 bmaControls(4) */
326 U16(0x0002), /* u16 bmaControls(5) */
327 U16(0x0002), /* u16 bmaControls(6) */
328 U16(0x0002), /* u16 bmaControls(7) */
329 U16(0x0002), /* u16 bmaControls(8) */
335 0x09, /* u8 bLength */
338 0x03, /* u8 bUnitID */
339 U16(0x0301), /* u16 wTerminalType (SPK) */
340 0x00, /* u8 bAssocTerminal */
341 0x02, /* u8 bSourceID */
349 .bNumEndpoints = 0,
365 0x07, /* u8 bLength */
368 0x01, /* u8 bTerminalLink */
369 0x00, /* u8 bDelay */
370 0x01, 0x00, /* u16 wFormatTag */
375 0x0b, /* u8 bLength */
378 0x01, /* u8 bFormatType */
379 0x02, /* u8 bNrChannels */
380 0x02, /* u8 bSubFrameSize */
381 0x10, /* u8 bBitResolution */
382 0x01, /* u8 bSamFreqType */
389 .bEndpointAddress = USB_DIR_OUT | 0x01,
390 .bmAttributes = 0x0d,
397 0x07, /* u8 bLength */
400 0x00, /* u8 bmAttributes */
401 0x00, /* u8 bLockDelayUnits */
402 U16(0x0000), /* u16 wLockDelay */
418 0x07, /* u8 bLength */
421 0x01, /* u8 bTerminalLink */
422 0x00, /* u8 bDelay */
423 0x01, 0x00, /* u16 wFormatTag */
428 0x0b, /* u8 bLength */
431 0x01, /* u8 bFormatType */
432 0x06, /* u8 bNrChannels */
433 0x02, /* u8 bSubFrameSize */
434 0x10, /* u8 bBitResolution */
435 0x01, /* u8 bSamFreqType */
442 .bEndpointAddress = USB_DIR_OUT | 0x01,
443 .bmAttributes = 0x0d,
450 0x07, /* u8 bLength */
453 0x00, /* u8 bmAttributes */
454 0x00, /* u8 bLockDelayUnits */
455 U16(0x0000), /* u16 wLockDelay */
471 0x07, /* u8 bLength */
474 0x01, /* u8 bTerminalLink */
475 0x00, /* u8 bDelay */
476 0x01, 0x00, /* u16 wFormatTag */
481 0x0b, /* u8 bLength */
484 0x01, /* u8 bFormatType */
485 0x08, /* u8 bNrChannels */
486 0x02, /* u8 bSubFrameSize */
487 0x10, /* u8 bBitResolution */
488 0x01, /* u8 bSamFreqType */
495 .bEndpointAddress = USB_DIR_OUT | 0x01,
496 .bmAttributes = 0x0d,
503 0x07, /* u8 bLength */
506 0x00, /* u8 bmAttributes */
507 0x00, /* u8 bLockDelayUnits */
508 U16(0x0000), /* u16 wLockDelay */
516 .bcdUSB = 0x0100,
525 .bMaxPower = 0x32,
536 .bcdDevice = 0,
548 #define CR_SET_CUR 0x01
549 #define CR_GET_CUR 0x81
550 #define CR_SET_MIN 0x02
551 #define CR_GET_MIN 0x82
552 #define CR_SET_MAX 0x03
553 #define CR_GET_MAX 0x83
554 #define CR_SET_RES 0x04
555 #define CR_GET_RES 0x84
556 #define CR_SET_MEM 0x05
557 #define CR_GET_MEM 0x85
558 #define CR_GET_STAT 0xff
563 #define MUTE_CONTROL 0x01
564 #define VOLUME_CONTROL 0x02
565 #define BASS_CONTROL 0x03
566 #define MID_CONTROL 0x04
567 #define TREBLE_CONTROL 0x05
568 #define GRAPHIC_EQUALIZER_CONTROL 0x06
569 #define AUTOMATIC_GAIN_CONTROL 0x07
570 #define DELAY_CONTROL 0x08
571 #define BASS_BOOST_CONTROL 0x09
572 #define LOUDNESS_CONTROL 0x0a
591 buf->prod = 0; in streambuf_init()
592 buf->cons = 0; in streambuf_init()
606 return 0; in streambuf_put()
609 return 0; in streambuf_put()
613 assert(buf->prod % USBAUDIO_PACKET_SIZE(channels) == 0); in streambuf_put()
625 if (used <= 0) { in streambuf_get()
626 *len = 0; in streambuf_get()
705 return 0; in usb_audio_set_output_altset()
724 case ATTRIB_ID(MUTE_CONTROL, CR_GET_CUR, 0x0200): in usb_audio_get_control()
725 data[0] = s->out.vol.mute; in usb_audio_get_control()
728 case ATTRIB_ID(VOLUME_CONTROL, CR_GET_CUR, 0x0200): in usb_audio_get_control()
730 uint16_t vol = (s->out.vol.vol[cn] * 0x8800 + 127) / 255 + 0x8000; in usb_audio_get_control()
731 data[0] = vol; in usb_audio_get_control()
736 case ATTRIB_ID(VOLUME_CONTROL, CR_GET_MIN, 0x0200): in usb_audio_get_control()
738 data[0] = 0x01; in usb_audio_get_control()
739 data[1] = 0x80; in usb_audio_get_control()
743 case ATTRIB_ID(VOLUME_CONTROL, CR_GET_MAX, 0x0200): in usb_audio_get_control()
745 data[0] = 0x00; in usb_audio_get_control()
746 data[1] = 0x08; in usb_audio_get_control()
750 case ATTRIB_ID(VOLUME_CONTROL, CR_GET_RES, 0x0200): in usb_audio_get_control()
752 data[0] = 0x88; in usb_audio_get_control()
753 data[1] = 0x00; in usb_audio_get_control()
772 case ATTRIB_ID(MUTE_CONTROL, CR_SET_CUR, 0x0200): in usb_audio_set_control()
773 s->out.vol.mute = data[0] & 1; in usb_audio_set_control()
775 ret = 0; in usb_audio_set_control()
777 case ATTRIB_ID(VOLUME_CONTROL, CR_SET_CUR, 0x0200): in usb_audio_set_control()
779 uint16_t vol = data[0] + (data[1] << 8); in usb_audio_set_control()
786 vol -= 0x8000; in usb_audio_set_control()
787 vol = (vol * 255 + 0x4400) / 0x8800; in usb_audio_set_control()
794 ret = 0; in usb_audio_set_control()
803 for (i = 0; i < USBAUDIO_MAX_CHANNELS(s); ++i) { in usb_audio_set_control()
819 int ret = 0; in usb_audio_handle_control()
823 "request 0x%04x value 0x%04x index 0x%04x length 0x%04x\n", in usb_audio_handle_control()
828 if (ret >= 0) { in usb_audio_handle_control()
837 ret = usb_audio_get_control(s, request & 0xff, value, index, in usb_audio_handle_control()
839 if (ret < 0) { in usb_audio_handle_control()
852 ret = usb_audio_set_control(s, request & 0xff, value, index, in usb_audio_handle_control()
854 if (ret < 0) { in usb_audio_handle_control()
866 "request 0x%04x value 0x%04x index 0x%04x length 0x%04x\n", in usb_audio_handle_control()
920 "pid 0x%x ep 0x%x len 0x%zx\n", in usb_audio_handle_data()
957 for (i = 0; i < USBAUDIO_MAX_CHANNELS(s); ++i) { in usb_audio_realize()
958 s->out.vol.vol[i] = 240; /* 0 dB */ in usb_audio_realize()
979 s->out.as.endianness = 0; in usb_audio_reinit()
985 AUD_set_active_out(s->out.voice, 0); in usb_audio_reinit()
995 DEFINE_PROP_UINT32("debug", USBAudioState, debug, 0),
996 DEFINE_PROP_UINT32("buffer", USBAudioState, buffer_user, 0),