Lines Matching +full:solid +full:- +full:state

1 // SPDX-License-Identifier: GPL-2.0-or-later
9 #include <linux/usb/audio-v2.h>
51 IMPLICIT_FB_FIXED_DEV(0x0763, 0x2030, 0x81, 3), /* M-Audio Fast Track C400 */
52 IMPLICIT_FB_FIXED_DEV(0x0763, 0x2031, 0x81, 3), /* M-Audio Fast Track C600 */
53 IMPLICIT_FB_FIXED_DEV(0x0763, 0x2080, 0x81, 2), /* M-Audio FastTrack Ultra */
54 IMPLICIT_FB_FIXED_DEV(0x0763, 0x2081, 0x81, 2), /* M-Audio FastTrack Ultra */
55 IMPLICIT_FB_FIXED_DEV(0x2466, 0x8010, 0x81, 2), /* Fractal Audio Axe-Fx III */
56 IMPLICIT_FB_FIXED_DEV(0x31e9, 0x0001, 0x81, 2), /* Solid State Logic SSL2 */
57 IMPLICIT_FB_FIXED_DEV(0x31e9, 0x0002, 0x81, 2), /* Solid State Logic SSL2+ */
60 IMPLICIT_FB_FIXED_DEV(0x22f0, 0x0006, 0x81, 3), /* Allen&Heath Qu-16 */
61 IMPLICIT_FB_FIXED_DEV(0x1686, 0xf029, 0x82, 2), /* Zoom UAC-2 */
62 IMPLICIT_FB_FIXED_DEV(0x2466, 0x8003, 0x86, 2), /* Fractal Audio Axe-Fx II */
90 iface = usb_ifnum_to_if(chip->dev, ifnum); in add_implicit_fb_sync_ep()
91 if (!iface || iface->num_altsetting < 2) in add_implicit_fb_sync_ep()
93 alts = &iface->altsetting[1]; in add_implicit_fb_sync_ep()
96 fmt->sync_ep = ep; in add_implicit_fb_sync_ep()
97 fmt->sync_iface = ifnum; in add_implicit_fb_sync_ep()
98 fmt->sync_altsetting = alts->desc.bAlternateSetting; in add_implicit_fb_sync_ep()
99 fmt->sync_ep_idx = ep_idx; in add_implicit_fb_sync_ep()
100 fmt->implicit_fb = 1; in add_implicit_fb_sync_ep()
103 fmt->iface, fmt->altsetting, in add_implicit_fb_sync_ep()
105 fmt->sync_ep, fmt->sync_iface, fmt->sync_altsetting); in add_implicit_fb_sync_ep()
121 if (alts->desc.bInterfaceClass != USB_CLASS_AUDIO || in add_generic_uac2_implicit_fb()
122 alts->desc.bInterfaceSubClass != USB_SUBCLASS_AUDIOSTREAMING || in add_generic_uac2_implicit_fb()
123 alts->desc.bInterfaceProtocol != UAC_VERSION_2 || in add_generic_uac2_implicit_fb()
124 alts->desc.bNumEndpoints < 1) in add_generic_uac2_implicit_fb()
128 (epd->bmAttributes & USB_ENDPOINT_USAGE_MASK) != in add_generic_uac2_implicit_fb()
131 return add_implicit_fb_sync_ep(chip, fmt, epd->bEndpointAddress, 0, in add_generic_uac2_implicit_fb()
137 if (alts->desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC || in roland_sanity_check_iface()
138 (alts->desc.bInterfaceSubClass != 2 && in roland_sanity_check_iface()
139 alts->desc.bInterfaceProtocol != 2) || in roland_sanity_check_iface()
140 alts->desc.bNumEndpoints < 1) in roland_sanity_check_iface()
157 (epd->bmAttributes & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC) in add_roland_implicit_fb()
162 alts->desc.bInterfaceNumber + 1, in add_roland_implicit_fb()
163 alts->desc.bAlternateSetting); in add_roland_implicit_fb()
168 (epd->bmAttributes & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC) in add_roland_implicit_fb()
170 chip->quirk_flags |= QUIRK_FLAG_PLAYBACK_FIRST; in add_roland_implicit_fb()
171 return add_implicit_fb_sync_ep(chip, fmt, epd->bEndpointAddress, 0, in add_roland_implicit_fb()
172 alts->desc.bInterfaceNumber, alts); in add_roland_implicit_fb()
175 /* capture quirk for Roland device; always full-duplex */
186 (epd->bmAttributes & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC) in add_roland_capture_quirk()
190 alts->desc.bInterfaceNumber - 1, in add_roland_capture_quirk()
191 alts->desc.bAlternateSetting); in add_roland_capture_quirk()
197 return add_implicit_fb_sync_ep(chip, fmt, epd->bEndpointAddress, 0, in add_roland_capture_quirk()
198 alts->desc.bInterfaceNumber, alts); in add_roland_capture_quirk()
210 if (USB_ID_VENDOR(chip->usb_id) != 0x2b73 && in is_pioneer_implicit_fb()
211 USB_ID_VENDOR(chip->usb_id) != 0x08e4) in is_pioneer_implicit_fb()
213 if (alts->desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC) in is_pioneer_implicit_fb()
215 if (alts->desc.bNumEndpoints != 2) in is_pioneer_implicit_fb()
220 (epd->bmAttributes & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC) in is_pioneer_implicit_fb()
225 (epd->bmAttributes & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC || in is_pioneer_implicit_fb()
226 ((epd->bmAttributes & USB_ENDPOINT_USAGE_MASK) != in is_pioneer_implicit_fb()
228 (epd->bmAttributes & USB_ENDPOINT_USAGE_MASK) != in is_pioneer_implicit_fb()
246 if ((alts->desc.bInterfaceClass != USB_CLASS_VENDOR_SPEC && in __add_generic_implicit_fb()
247 alts->desc.bInterfaceClass != USB_CLASS_AUDIO) || in __add_generic_implicit_fb()
248 alts->desc.bNumEndpoints < 1) in __add_generic_implicit_fb()
252 (epd->bmAttributes & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC) in __add_generic_implicit_fb()
254 return add_implicit_fb_sync_ep(chip, fmt, epd->bEndpointAddress, 0, in __add_generic_implicit_fb()
263 if ((fmt->ep_attr & USB_ENDPOINT_SYNCTYPE) != USB_ENDPOINT_SYNC_ASYNC) in add_generic_implicit_fb()
267 alts->desc.bInterfaceNumber + 1, in add_generic_implicit_fb()
268 alts->desc.bAlternateSetting)) in add_generic_implicit_fb()
271 alts->desc.bInterfaceNumber - 1, in add_generic_implicit_fb()
272 alts->desc.bAlternateSetting); in add_generic_implicit_fb()
280 for (; match->id; match++) in find_implicit_fb_entry()
281 if (match->id == chip->usb_id && in find_implicit_fb_entry()
282 (!match->iface_class || in find_implicit_fb_entry()
283 (alts->desc.bInterfaceClass == match->iface_class))) in find_implicit_fb_entry()
297 unsigned int attr = fmt->ep_attr & USB_ENDPOINT_SYNCTYPE; in audioformat_implicit_fb_quirk()
301 switch (p->type) { in audioformat_implicit_fb_quirk()
307 return add_implicit_fb_sync_ep(chip, fmt, p->ep_num, 0, in audioformat_implicit_fb_quirk()
308 p->iface, NULL); in audioformat_implicit_fb_quirk()
315 switch (p->type) { in audioformat_implicit_fb_quirk()
319 chip->quirk_flags |= QUIRK_FLAG_PLAYBACK_FIRST; in audioformat_implicit_fb_quirk()
326 alts->desc.bInterfaceClass == USB_CLASS_AUDIO && in audioformat_implicit_fb_quirk()
327 alts->desc.bInterfaceProtocol == UAC_VERSION_2 && in audioformat_implicit_fb_quirk()
328 alts->desc.bNumEndpoints == 1) { in audioformat_implicit_fb_quirk()
330 alts->desc.bInterfaceNumber + 1, in audioformat_implicit_fb_quirk()
331 alts->desc.bAlternateSetting)) in audioformat_implicit_fb_quirk()
336 if (USB_ID_VENDOR(chip->usb_id) == 0x0582) { in audioformat_implicit_fb_quirk()
343 chip->quirk_flags |= QUIRK_FLAG_PLAYBACK_FIRST; in audioformat_implicit_fb_quirk()
345 get_endpoint(alts, 1)->bEndpointAddress, in audioformat_implicit_fb_quirk()
346 1, alts->desc.bInterfaceNumber, in audioformat_implicit_fb_quirk()
351 if (chip->generic_implicit_fb || in audioformat_implicit_fb_quirk()
352 (chip->quirk_flags & QUIRK_FLAG_GENERIC_IMPLICIT_FB)) in audioformat_implicit_fb_quirk()
367 if (p && (p->type == IMPLICIT_FB_FIXED || p->type == IMPLICIT_FB_BOTH)) in audioformat_capture_quirk()
368 return add_implicit_fb_sync_ep(chip, fmt, p->ep_num, 0, in audioformat_capture_quirk()
369 p->iface, NULL); in audioformat_capture_quirk()
371 /* Roland/BOSS need full-duplex streams */ in audioformat_capture_quirk()
372 if (USB_ID_VENDOR(chip->usb_id) == 0x0582) { in audioformat_capture_quirk()
389 if (chip->quirk_flags & QUIRK_FLAG_SKIP_IMPLICIT_FB) in snd_usb_parse_implicit_fb_quirk()
391 if (fmt->endpoint & USB_DIR_IN) in snd_usb_parse_implicit_fb_quirk()
400 * - It has no channels for some reason.
401 * - Requested PCM format is not supported.
402 * - Requested sample rate is not supported.
411 if (fp->channels < 1) in match_endpoint_audioformats()
414 if (!(fp->formats & pcm_format_to_bits(pcm_format))) in match_endpoint_audioformats()
417 if (fp->rates & SNDRV_PCM_RATE_CONTINUOUS) { in match_endpoint_audioformats()
418 if (rate < fp->rate_min || rate > fp->rate_max) in match_endpoint_audioformats()
421 for (i = 0; i < fp->nr_rates; i++) { in match_endpoint_audioformats()
422 if (fp->rate_table[i] == rate) in match_endpoint_audioformats()
425 if (i >= fp->nr_rates) in match_endpoint_audioformats()
430 if (fp->channels == channels) in match_endpoint_audioformats()
443 list_for_each_entry(as, &chip->pcm_list, list) { in find_matching_substream()
444 subs = &as->substream[stream]; in find_matching_substream()
445 if (as->fmt_type == fmt_type && subs->ep_num == ep_num) in find_matching_substream()
467 if (target->iface == target->sync_iface && in snd_usb_find_implicit_fb_sync_format()
468 target->altsetting == target->sync_altsetting) in snd_usb_find_implicit_fb_sync_format()
471 subs = find_matching_substream(chip, stream, target->sync_ep, in snd_usb_find_implicit_fb_sync_format()
472 target->fmt_type); in snd_usb_find_implicit_fb_sync_format()
477 list_for_each_entry(fp, &subs->fmt_list, list) { in snd_usb_find_implicit_fb_sync_format()