@@ -42,23 +42,23 @@ def setup_local_handlers(self):
42
42
}
43
43
self ._settings = {
44
44
# (val, index): [cur, min, max, res, (idle)]
45
- (0x0100 , 0x0001 ): ['\x44 \xac \x00 ' , '\x44 \xac \x00 ' , '\x80 \xbb \x00 ' , '\x80 \xbb \x00 ' ],
45
+ (0x0100 , 0x0001 ): [b '\x44 \xac \x00 ' , b '\x44 \xac \x00 ' , b '\x80 \xbb \x00 ' , b '\x80 \xbb \x00 ' ],
46
46
# (0x0100, 0x0002): ['\x44\xac\x00', '\x44\xac\x00', '\x80\xbb\x00', '\x80\xbb\x00'],
47
- (0x0100 , 0x0082 ): ['\x44 \xac \x00 ' , '\x44 \xac \x00 ' , '\x80 \xbb \x00 ' , '\x80 \xbb \x00 ' ],
48
- (0x0100 , 0x0900 ): ['\x00 ' , '\x00 ' , '\xff ' , '\x00 ' ],
49
- (0x0100 , 0x0a00 ): ['\x01 ' , '\x00 ' , '\xff ' , '\x00 ' ],
50
- (0x0100 , 0x0d00 ): ['\x01 ' , '\x00 ' , '\xff ' , '\x00 ' ],
51
- (0x0101 , 0x0f00 ): ['\x01 ' , '\x00 ' , '\xff ' , '\x00 ' ],
52
- (0x0102 , 0x0f00 ): ['\x01 ' , '\x00 ' , '\xff ' , '\x00 ' ],
53
- (0x0200 , 0x0a00 ): ['\x00 \x00 ' , '\x00 \x00 ' , '\x55 \x00 ' , '\x30 \x00 ' , '\x00 \x00 ' ],
54
- (0x0200 , 0x0d00 ): ['\x80 \x22 ' , '\x00 \x00 ' , '\xd0 \x00 ' , '\x30 \x00 ' ],
55
- (0x0201 , 0x0900 ): ['\x80 \x22 ' , '\x20 \x00 ' , '\xa0 \x00 ' , '\x30 \x00 ' ],
56
- (0x0201 , 0x0f00 ): ['\x01 ' , '\x00 ' , '\xff ' , '\x00 ' ],
57
- (0x0202 , 0x0900 ): ['\xcf \x00 ' , '\x00 \x00 ' , '\xcf \x00 ' , '\x30 \x00 ' ],
58
- (0x0202 , 0x0f00 ): ['\x01 ' , '\x00 ' , '\xff ' , '\x00 ' ],
59
- (0x0301 , 0x0f00 ): ['\x01 ' , '\x00 ' , '\xff ' , '\x00 ' ],
60
- (0x0302 , 0x0f00 ): ['\x00 \x00 ' , '\x00 \x00 ' , '\x00 \x00 ' , '\x00 \x00 ' ],
61
- (0x0700 , 0x0a00 ): ['\x01 ' , '\x00 ' , '\xff ' , '\x00 ' ],
47
+ (0x0100 , 0x0082 ): [b '\x44 \xac \x00 ' , b '\x44 \xac \x00 ' , b '\x80 \xbb \x00 ' , b '\x80 \xbb \x00 ' ],
48
+ (0x0100 , 0x0900 ): [b '\x00 ' , b '\x00 ' , b '\xff ' , b '\x00 ' ],
49
+ (0x0100 , 0x0a00 ): [b '\x01 ' , b '\x00 ' , b '\xff ' , b '\x00 ' ],
50
+ (0x0100 , 0x0d00 ): [b '\x01 ' , b '\x00 ' , b '\xff ' , b '\x00 ' ],
51
+ (0x0101 , 0x0f00 ): [b '\x01 ' , b '\x00 ' , b '\xff ' , b '\x00 ' ],
52
+ (0x0102 , 0x0f00 ): [b '\x01 ' , b '\x00 ' , b '\xff ' , b '\x00 ' ],
53
+ (0x0200 , 0x0a00 ): [b '\x00 \x00 ' , b '\x00 \x00 ' , b '\x55 \x00 ' , b '\x30 \x00 ' , b '\x00 \x00 ' ],
54
+ (0x0200 , 0x0d00 ): [b '\x80 \x22 ' , b '\x00 \x00 ' , b '\xd0 \x00 ' , b '\x30 \x00 ' ],
55
+ (0x0201 , 0x0900 ): [b '\x80 \x22 ' , b '\x20 \x00 ' , b '\xa0 \x00 ' , b '\x30 \x00 ' ],
56
+ (0x0201 , 0x0f00 ): [b '\x01 ' , b '\x00 ' , b '\xff ' , b '\x00 ' ],
57
+ (0x0202 , 0x0900 ): [b '\xcf \x00 ' , b '\x00 \x00 ' , b '\xcf \x00 ' , b '\x30 \x00 ' ],
58
+ (0x0202 , 0x0f00 ): [b '\x01 ' , b '\x00 ' , b '\xff ' , b '\x00 ' ],
59
+ (0x0301 , 0x0f00 ): [b '\x01 ' , b '\x00 ' , b '\xff ' , b '\x00 ' ],
60
+ (0x0302 , 0x0f00 ): [b '\x00 \x00 ' , b '\x00 \x00 ' , b '\x00 \x00 ' , b '\x00 \x00 ' ],
61
+ (0x0700 , 0x0a00 ): [b '\x01 ' , b '\x00 ' , b '\xff ' , b '\x00 ' ],
62
62
}
63
63
64
64
self ._cur = b'\x44 \xac \x00 '
@@ -205,29 +205,29 @@ def __init__(self, app, phy, vid=0x0d8c, pid=0x000c, rev=0x0001, *args, **kwargs
205
205
app = app , phy = phy , iface_num = 0 , iface_alt = 0 , iface_str_idx = 0 ,
206
206
cs_ifaces = [
207
207
# Class specific AC interface: header (4.3.2)
208
- USBCSInterface ('ACHeader' , app , phy , '\x01 \x00 \x01 \x64 \x00 \x02 \x01 \x02 ' ),
208
+ USBCSInterface ('ACHeader' , app , phy , b '\x01 \x00 \x01 \x64 \x00 \x02 \x01 \x02 ' ),
209
209
# Class specific AC interface: input terminal (Table 4.3.2.1)
210
- USBCSInterface ('ACInputTerminal0' , app , phy , '\x02 \x01 \x01 \x01 \x00 \x02 \x03 \x00 \x00 \x00 ' ),
211
- USBCSInterface ('ACInputTerminal1' , app , phy , '\x02 \x02 \x01 \x02 \x00 \x01 \x01 \x00 \x00 \x00 ' ),
210
+ USBCSInterface ('ACInputTerminal0' , app , phy , b '\x02 \x01 \x01 \x01 \x00 \x02 \x03 \x00 \x00 \x00 ' ),
211
+ USBCSInterface ('ACInputTerminal1' , app , phy , b '\x02 \x02 \x01 \x02 \x00 \x01 \x01 \x00 \x00 \x00 ' ),
212
212
# Class specific AC interface: output terminal (Table 4.3.2.2)
213
- USBCSInterface ('ACOutputTerminal0' , app , phy , '\x03 \x06 \x01 \x03 \x00 \x09 \x00 ' ),
214
- USBCSInterface ('ACOutputTerminal1' , app , phy , '\x03 \x07 \x01 \x01 \x00 \x08 \x00 ' ),
213
+ USBCSInterface ('ACOutputTerminal0' , app , phy , b '\x03 \x06 \x01 \x03 \x00 \x09 \x00 ' ),
214
+ USBCSInterface ('ACOutputTerminal1' , app , phy , b '\x03 \x07 \x01 \x01 \x00 \x08 \x00 ' ),
215
215
# Class specific AC interface: selector unit (Table 4.3.2.4)
216
- USBCSInterface ('ACSelectorUnit' , app , phy , '\x05 \x08 \x01 \x0a \x00 ' ),
216
+ USBCSInterface ('ACSelectorUnit' , app , phy , b '\x05 \x08 \x01 \x0a \x00 ' ),
217
217
# Class specific AC interface: feature unit (Table 4.3.2.5)
218
- USBCSInterface ('ACFeatureUnit0' , app , phy , '\x06 \x09 \x0f \x01 \x01 \x02 \x02 \x00 ' ),
219
- USBCSInterface ('ACFeatureUnit1' , app , phy , '\x06 \x0a \x02 \x01 \x43 \x00 \x00 ' ),
220
- USBCSInterface ('ACFeatureUnit2' , app , phy , '\x06 \x0d \x02 \x01 \x03 \x00 \x00 ' ),
218
+ USBCSInterface ('ACFeatureUnit0' , app , phy , b '\x06 \x09 \x0f \x01 \x01 \x02 \x02 \x00 ' ),
219
+ USBCSInterface ('ACFeatureUnit1' , app , phy , b '\x06 \x0a \x02 \x01 \x43 \x00 \x00 ' ),
220
+ USBCSInterface ('ACFeatureUnit2' , app , phy , b '\x06 \x0d \x02 \x01 \x03 \x00 \x00 ' ),
221
221
# Class specific AC interface: mixer unit (Table 4.3.2.3)
222
- USBCSInterface ('ACMixerUnit' , app , phy , '\x04 \x0f \x02 \x01 \x0d \x02 \x03 \x00 \x00 \x00 \x00 ' ),
222
+ USBCSInterface ('ACMixerUnit' , app , phy , b '\x04 \x0f \x02 \x01 \x0d \x02 \x03 \x00 \x00 \x00 \x00 ' ),
223
223
],
224
224
usb_class = usb_class
225
225
),
226
226
USBAudioStreamingInterface (
227
227
app = app , phy = phy , iface_num = 1 , iface_alt = 0 , iface_str_idx = 0 ,
228
228
cs_ifaces = [
229
- USBCSInterface ('ASGeneral' , app , phy , '\x01 \x01 \x01 \x01 \x00 ' ),
230
- USBCSInterface ('ASFormatType' , app , phy , '\x02 \x01 \x02 \x02 \x10 \x02 \x44 \xac \x00 \x44 \xac \x00 ' ),
229
+ USBCSInterface ('ASGeneral' , app , phy , b '\x01 \x01 \x01 \x01 \x00 ' ),
230
+ USBCSInterface ('ASFormatType' , app , phy , b '\x02 \x01 \x02 \x02 \x10 \x02 \x44 \xac \x00 \x44 \xac \x00 ' ),
231
231
],
232
232
endpoints = [
233
233
USBEndpoint (
@@ -240,7 +240,7 @@ def __init__(self, app, phy, vid=0x0d8c, pid=0x000c, rev=0x0001, *args, **kwargs
240
240
interval = 1 ,
241
241
handler = audio_streaming .data_available ,
242
242
cs_endpoints = [
243
- USBCSEndpoint ('ASEndpoint' , app , phy , '\x01 \x01 \x01 \x01 \x00 ' )
243
+ USBCSEndpoint ('ASEndpoint' , app , phy , b '\x01 \x01 \x01 \x01 \x00 ' )
244
244
],
245
245
usb_class = usb_class ,
246
246
)
@@ -250,8 +250,8 @@ def __init__(self, app, phy, vid=0x0d8c, pid=0x000c, rev=0x0001, *args, **kwargs
250
250
USBAudioStreamingInterface (
251
251
app = app , phy = phy , iface_num = 2 , iface_alt = 0 , iface_str_idx = 0 ,
252
252
cs_ifaces = [
253
- USBCSInterface ('ASGeneral' , app , phy , '\x01 \x07 \x01 \x01 \x00 ' ),
254
- USBCSInterface ('ASFormatType' , app , phy , '\x02 \x01 \x01 \x02 \x10 \x02 \x44 \xac \x00 \x44 \xac \x00 ' ),
253
+ USBCSInterface ('ASGeneral' , app , phy , b '\x01 \x07 \x01 \x01 \x00 ' ),
254
+ USBCSInterface ('ASFormatType' , app , phy , b '\x02 \x01 \x01 \x02 \x10 \x02 \x44 \xac \x00 \x44 \xac \x00 ' ),
255
255
],
256
256
endpoints = [
257
257
USBEndpoint (
@@ -264,7 +264,7 @@ def __init__(self, app, phy, vid=0x0d8c, pid=0x000c, rev=0x0001, *args, **kwargs
264
264
interval = 1 ,
265
265
handler = audio_streaming .buffer_available ,
266
266
cs_endpoints = [
267
- USBCSEndpoint ('ASEndpoint' , app , phy , '\x01 \x01 \x00 \x00 \x00 ' )
267
+ USBCSEndpoint ('ASEndpoint' , app , phy , b '\x01 \x01 \x00 \x00 \x00 ' )
268
268
],
269
269
usb_class = usb_class ,
270
270
)
0 commit comments