@@ -58,8 +58,6 @@ static const struct snd_usb_implicit_fb_match playback_implicit_fb_quirks[] = {
58
58
IMPLICIT_FB_FIXED_DEV (0x0499 , 0x172f , 0x81 , 2 ), /* Steinberg UR22C */
59
59
IMPLICIT_FB_FIXED_DEV (0x0d9a , 0x00df , 0x81 , 2 ), /* RTX6001 */
60
60
IMPLICIT_FB_FIXED_DEV (0x22f0 , 0x0006 , 0x81 , 3 ), /* Allen&Heath Qu-16 */
61
- IMPLICIT_FB_FIXED_DEV (0x2b73 , 0x000a , 0x82 , 0 ), /* Pioneer DJ DJM-900NXS2 */
62
- IMPLICIT_FB_FIXED_DEV (0x2b73 , 0x0017 , 0x82 , 0 ), /* Pioneer DJ DJM-250MK2 */
63
61
IMPLICIT_FB_FIXED_DEV (0x1686 , 0xf029 , 0x82 , 2 ), /* Zoom UAC-2 */
64
62
IMPLICIT_FB_FIXED_DEV (0x2466 , 0x8003 , 0x86 , 2 ), /* Fractal Audio Axe-Fx II */
65
63
IMPLICIT_FB_FIXED_DEV (0x0499 , 0x172a , 0x86 , 2 ), /* Yamaha MODX */
@@ -100,7 +98,7 @@ static const struct snd_usb_implicit_fb_match capture_implicit_fb_quirks[] = {
100
98
/* set up sync EP information on the audioformat */
101
99
static int add_implicit_fb_sync_ep (struct snd_usb_audio * chip ,
102
100
struct audioformat * fmt ,
103
- int ep , int ifnum ,
101
+ int ep , int ep_idx , int ifnum ,
104
102
const struct usb_host_interface * alts )
105
103
{
106
104
struct usb_interface * iface ;
@@ -115,7 +113,7 @@ static int add_implicit_fb_sync_ep(struct snd_usb_audio *chip,
115
113
fmt -> sync_ep = ep ;
116
114
fmt -> sync_iface = ifnum ;
117
115
fmt -> sync_altsetting = alts -> desc .bAlternateSetting ;
118
- fmt -> sync_ep_idx = 0 ;
116
+ fmt -> sync_ep_idx = ep_idx ;
119
117
fmt -> implicit_fb = 1 ;
120
118
usb_audio_dbg (chip ,
121
119
"%d:%d: added %s implicit_fb sync_ep %x, iface %d:%d\n" ,
@@ -147,7 +145,7 @@ static int add_generic_uac2_implicit_fb(struct snd_usb_audio *chip,
147
145
(epd -> bmAttributes & USB_ENDPOINT_USAGE_MASK ) !=
148
146
USB_ENDPOINT_USAGE_IMPLICIT_FB )
149
147
return 0 ;
150
- return add_implicit_fb_sync_ep (chip , fmt , epd -> bEndpointAddress ,
148
+ return add_implicit_fb_sync_ep (chip , fmt , epd -> bEndpointAddress , 0 ,
151
149
ifnum , alts );
152
150
}
153
151
@@ -173,10 +171,32 @@ static int add_roland_implicit_fb(struct snd_usb_audio *chip,
173
171
(epd -> bmAttributes & USB_ENDPOINT_USAGE_MASK ) !=
174
172
USB_ENDPOINT_USAGE_IMPLICIT_FB )
175
173
return 0 ;
176
- return add_implicit_fb_sync_ep (chip , fmt , epd -> bEndpointAddress ,
174
+ return add_implicit_fb_sync_ep (chip , fmt , epd -> bEndpointAddress , 0 ,
177
175
ifnum , alts );
178
176
}
179
177
178
+ /* Pioneer devices: playback and capture streams sharing the same iface/altset
179
+ */
180
+ static int add_pioneer_implicit_fb (struct snd_usb_audio * chip ,
181
+ struct audioformat * fmt ,
182
+ struct usb_host_interface * alts )
183
+ {
184
+ struct usb_endpoint_descriptor * epd ;
185
+
186
+ if (alts -> desc .bNumEndpoints != 2 )
187
+ return 0 ;
188
+
189
+ epd = get_endpoint (alts , 1 );
190
+ if (!usb_endpoint_is_isoc_in (epd ) ||
191
+ (epd -> bmAttributes & USB_ENDPOINT_SYNCTYPE ) != USB_ENDPOINT_SYNC_ASYNC ||
192
+ ((epd -> bmAttributes & USB_ENDPOINT_USAGE_MASK ) !=
193
+ USB_ENDPOINT_USAGE_DATA &&
194
+ (epd -> bmAttributes & USB_ENDPOINT_USAGE_MASK ) !=
195
+ USB_ENDPOINT_USAGE_IMPLICIT_FB ))
196
+ return 0 ;
197
+ return add_implicit_fb_sync_ep (chip , fmt , epd -> bEndpointAddress , 1 ,
198
+ alts -> desc .bInterfaceNumber , alts );
199
+ }
180
200
181
201
static int __add_generic_implicit_fb (struct snd_usb_audio * chip ,
182
202
struct audioformat * fmt ,
@@ -197,7 +217,7 @@ static int __add_generic_implicit_fb(struct snd_usb_audio *chip,
197
217
if (!usb_endpoint_is_isoc_in (epd ) ||
198
218
(epd -> bmAttributes & USB_ENDPOINT_SYNCTYPE ) != USB_ENDPOINT_SYNC_ASYNC )
199
219
return 0 ;
200
- return add_implicit_fb_sync_ep (chip , fmt , epd -> bEndpointAddress ,
220
+ return add_implicit_fb_sync_ep (chip , fmt , epd -> bEndpointAddress , 0 ,
201
221
iface , alts );
202
222
}
203
223
@@ -250,7 +270,7 @@ static int audioformat_implicit_fb_quirk(struct snd_usb_audio *chip,
250
270
case IMPLICIT_FB_NONE :
251
271
return 0 ; /* No quirk */
252
272
case IMPLICIT_FB_FIXED :
253
- return add_implicit_fb_sync_ep (chip , fmt , p -> ep_num ,
273
+ return add_implicit_fb_sync_ep (chip , fmt , p -> ep_num , 0 ,
254
274
p -> iface , NULL );
255
275
}
256
276
}
@@ -278,6 +298,14 @@ static int audioformat_implicit_fb_quirk(struct snd_usb_audio *chip,
278
298
return 1 ;
279
299
}
280
300
301
+ /* Pioneer devices implicit feedback with vendor spec class */
302
+ if (attr == USB_ENDPOINT_SYNC_ASYNC &&
303
+ alts -> desc .bInterfaceClass == USB_CLASS_VENDOR_SPEC &&
304
+ USB_ID_VENDOR (chip -> usb_id ) == 0x2b73 /* Pioneer */ ) {
305
+ if (add_pioneer_implicit_fb (chip , fmt , alts ))
306
+ return 1 ;
307
+ }
308
+
281
309
/* Try the generic implicit fb if available */
282
310
if (chip -> generic_implicit_fb )
283
311
return add_generic_implicit_fb (chip , fmt , alts );
@@ -295,8 +323,8 @@ static int audioformat_capture_quirk(struct snd_usb_audio *chip,
295
323
296
324
p = find_implicit_fb_entry (chip , capture_implicit_fb_quirks , alts );
297
325
if (p && p -> type == IMPLICIT_FB_FIXED )
298
- return add_implicit_fb_sync_ep (chip , fmt , p -> ep_num , p -> iface ,
299
- NULL );
326
+ return add_implicit_fb_sync_ep (chip , fmt , p -> ep_num , 0 ,
327
+ p -> iface , NULL );
300
328
return 0 ;
301
329
}
302
330
0 commit comments