Lines Matching refs:uac2
949 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_bind() local
1049 uac2->ac_intf = ret; in afunc_bind()
1050 uac2->ac_alt = 0; in afunc_bind()
1060 uac2->as_out_intf = ret; in afunc_bind()
1061 uac2->as_out_alt = 0; in afunc_bind()
1089 uac2->as_in_intf = ret; in afunc_bind()
1090 uac2->as_in_alt = 0; in afunc_bind()
1094 uac2->int_ep = usb_ep_autoconfig(gadget, &fs_ep_int_desc); in afunc_bind()
1095 if (!uac2->int_ep) { in afunc_bind()
1258 struct f_uac2 *uac2 = func_to_uac2(&agdev->func); in afunc_notify_complete() local
1260 atomic_dec(&uac2->int_count); in afunc_notify_complete()
1268 struct f_uac2 *uac2 = func_to_uac2(&agdev->func); in afunc_notify() local
1274 if (!uac2->int_ep->enabled) in afunc_notify()
1277 if (atomic_inc_return(&uac2->int_count) > UAC2_DEF_INT_REQ_NUM) { in afunc_notify()
1278 atomic_dec(&uac2->int_count); in afunc_notify()
1282 req = usb_ep_alloc_request(uac2->int_ep, GFP_ATOMIC); in afunc_notify()
1294 w_index = unit_id << 8 | uac2->ac_intf; in afunc_notify()
1307 ret = usb_ep_queue(uac2->int_ep, req, GFP_ATOMIC); in afunc_notify()
1317 usb_ep_free_request(uac2->int_ep, req); in afunc_notify()
1319 atomic_dec(&uac2->int_count); in afunc_notify()
1328 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_set_alt() local
1340 if (intf == uac2->ac_intf) { in afunc_set_alt()
1348 if (uac2->int_ep) { in afunc_set_alt()
1349 usb_ep_disable(uac2->int_ep); in afunc_set_alt()
1350 config_ep_by_speed(gadget, &agdev->func, uac2->int_ep); in afunc_set_alt()
1351 usb_ep_enable(uac2->int_ep); in afunc_set_alt()
1357 if (intf == uac2->as_out_intf) { in afunc_set_alt()
1358 uac2->as_out_alt = alt; in afunc_set_alt()
1361 ret = u_audio_start_capture(&uac2->g_audio); in afunc_set_alt()
1363 u_audio_stop_capture(&uac2->g_audio); in afunc_set_alt()
1364 } else if (intf == uac2->as_in_intf) { in afunc_set_alt()
1365 uac2->as_in_alt = alt; in afunc_set_alt()
1368 ret = u_audio_start_playback(&uac2->g_audio); in afunc_set_alt()
1370 u_audio_stop_playback(&uac2->g_audio); in afunc_set_alt()
1382 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_get_alt() local
1385 if (intf == uac2->ac_intf) in afunc_get_alt()
1386 return uac2->ac_alt; in afunc_get_alt()
1387 else if (intf == uac2->as_out_intf) in afunc_get_alt()
1388 return uac2->as_out_alt; in afunc_get_alt()
1389 else if (intf == uac2->as_in_intf) in afunc_get_alt()
1390 return uac2->as_in_alt; in afunc_get_alt()
1402 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_disable() local
1404 uac2->as_in_alt = 0; in afunc_disable()
1405 uac2->as_out_alt = 0; in afunc_disable()
1406 u_audio_stop_capture(&uac2->g_audio); in afunc_disable()
1407 u_audio_stop_playback(&uac2->g_audio); in afunc_disable()
1408 if (uac2->int_ep) in afunc_disable()
1409 usb_ep_disable(uac2->int_ep); in afunc_disable()
1587 struct f_uac2 *uac2 = func_to_uac2(&agdev->func); in out_rq_cur_complete() local
1588 struct usb_ctrlrequest *cr = &uac2->setup_cr; in out_rq_cur_complete()
1635 struct f_uac2 *uac2 = func_to_uac2(fn); in out_rq_cur() local
1647 memcpy(&uac2->setup_cr, cr, sizeof(*cr)); in out_rq_cur()
1663 struct f_uac2 *uac2 = func_to_uac2(fn); in setup_rq_inf() local
1668 if (intf != uac2->ac_intf) { in setup_rq_inf()
1968 struct f_uac2 *uac2; in afunc_alloc() local
1971 uac2 = kzalloc(sizeof(*uac2), GFP_KERNEL); in afunc_alloc()
1972 if (uac2 == NULL) in afunc_alloc()
1980 uac2->g_audio.func.name = "uac2_func"; in afunc_alloc()
1981 uac2->g_audio.func.bind = afunc_bind; in afunc_alloc()
1982 uac2->g_audio.func.unbind = afunc_unbind; in afunc_alloc()
1983 uac2->g_audio.func.set_alt = afunc_set_alt; in afunc_alloc()
1984 uac2->g_audio.func.get_alt = afunc_get_alt; in afunc_alloc()
1985 uac2->g_audio.func.disable = afunc_disable; in afunc_alloc()
1986 uac2->g_audio.func.setup = afunc_setup; in afunc_alloc()
1987 uac2->g_audio.func.free_func = afunc_free; in afunc_alloc()
1989 return &uac2->g_audio.func; in afunc_alloc()
1992 DECLARE_USB_FUNCTION_INIT(uac2, afunc_alloc_inst, afunc_alloc);