Lines Matching refs:uac2
1025 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_bind() local
1143 uac2->ac_intf = ret; in afunc_bind()
1144 uac2->ac_alt = 0; in afunc_bind()
1155 uac2->as_out_intf = ret; in afunc_bind()
1156 uac2->as_out_alt = 0; in afunc_bind()
1184 uac2->as_in_intf = ret; in afunc_bind()
1185 uac2->as_in_alt = 0; in afunc_bind()
1190 uac2->int_ep = usb_ep_autoconfig(gadget, &fs_ep_int_desc); in afunc_bind()
1191 if (!uac2->int_ep) { in afunc_bind()
1361 struct f_uac2 *uac2 = func_to_uac2(&agdev->func); in afunc_notify_complete() local
1363 atomic_dec(&uac2->int_count); in afunc_notify_complete()
1371 struct f_uac2 *uac2 = func_to_uac2(&agdev->func); in afunc_notify() local
1377 if (!uac2->int_ep->enabled) in afunc_notify()
1380 if (atomic_inc_return(&uac2->int_count) > UAC2_DEF_INT_REQ_NUM) { in afunc_notify()
1381 atomic_dec(&uac2->int_count); in afunc_notify()
1385 req = usb_ep_alloc_request(uac2->int_ep, GFP_ATOMIC); in afunc_notify()
1397 w_index = unit_id << 8 | uac2->ac_intf; in afunc_notify()
1410 ret = usb_ep_queue(uac2->int_ep, req, GFP_ATOMIC); in afunc_notify()
1420 usb_ep_free_request(uac2->int_ep, req); in afunc_notify()
1422 atomic_dec(&uac2->int_count); in afunc_notify()
1431 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_set_alt() local
1443 if (intf == uac2->ac_intf) { in afunc_set_alt()
1451 if (uac2->int_ep) { in afunc_set_alt()
1452 usb_ep_disable(uac2->int_ep); in afunc_set_alt()
1453 config_ep_by_speed(gadget, &agdev->func, uac2->int_ep); in afunc_set_alt()
1454 usb_ep_enable(uac2->int_ep); in afunc_set_alt()
1460 if (intf == uac2->as_out_intf) { in afunc_set_alt()
1461 uac2->as_out_alt = alt; in afunc_set_alt()
1464 ret = u_audio_start_capture(&uac2->g_audio); in afunc_set_alt()
1466 u_audio_stop_capture(&uac2->g_audio); in afunc_set_alt()
1467 } else if (intf == uac2->as_in_intf) { in afunc_set_alt()
1468 uac2->as_in_alt = alt; in afunc_set_alt()
1471 ret = u_audio_start_playback(&uac2->g_audio); in afunc_set_alt()
1473 u_audio_stop_playback(&uac2->g_audio); in afunc_set_alt()
1485 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_get_alt() local
1488 if (intf == uac2->ac_intf) in afunc_get_alt()
1489 return uac2->ac_alt; in afunc_get_alt()
1490 else if (intf == uac2->as_out_intf) in afunc_get_alt()
1491 return uac2->as_out_alt; in afunc_get_alt()
1492 else if (intf == uac2->as_in_intf) in afunc_get_alt()
1493 return uac2->as_in_alt; in afunc_get_alt()
1505 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_disable() local
1507 uac2->as_in_alt = 0; in afunc_disable()
1508 uac2->as_out_alt = 0; in afunc_disable()
1509 u_audio_stop_capture(&uac2->g_audio); in afunc_disable()
1510 u_audio_stop_playback(&uac2->g_audio); in afunc_disable()
1511 if (uac2->int_ep) in afunc_disable()
1512 usb_ep_disable(uac2->int_ep); in afunc_disable()
1518 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_suspend() local
1520 u_audio_suspend(&uac2->g_audio); in afunc_suspend()
1707 struct f_uac2 *uac2 = func_to_uac2(fn); in uac2_cs_control_sam_freq() local
1715 if (uac2->clock_id == USB_IN_CLK_ID) { in uac2_cs_control_sam_freq()
1717 } else if (uac2->clock_id == USB_OUT_CLK_ID) { in uac2_cs_control_sam_freq()
1728 struct f_uac2 *uac2 = func_to_uac2(&agdev->func); in out_rq_cur_complete() local
1729 struct usb_ctrlrequest *cr = &uac2->setup_cr; in out_rq_cur_complete()
1777 struct f_uac2 *uac2 = func_to_uac2(fn); in out_rq_cur() local
1790 uac2->clock_id = clock_id; in out_rq_cur()
1796 memcpy(&uac2->setup_cr, cr, sizeof(*cr)); in out_rq_cur()
1812 struct f_uac2 *uac2 = func_to_uac2(fn); in setup_rq_inf() local
1817 if (intf != uac2->ac_intf) { in setup_rq_inf()
2278 struct f_uac2 *uac2; in afunc_alloc() local
2281 uac2 = kzalloc_obj(*uac2); in afunc_alloc()
2282 if (uac2 == NULL) in afunc_alloc()
2290 uac2->g_audio.func.name = "uac2_func"; in afunc_alloc()
2291 uac2->g_audio.func.bind = afunc_bind; in afunc_alloc()
2292 uac2->g_audio.func.unbind = afunc_unbind; in afunc_alloc()
2293 uac2->g_audio.func.set_alt = afunc_set_alt; in afunc_alloc()
2294 uac2->g_audio.func.get_alt = afunc_get_alt; in afunc_alloc()
2295 uac2->g_audio.func.disable = afunc_disable; in afunc_alloc()
2296 uac2->g_audio.func.suspend = afunc_suspend; in afunc_alloc()
2297 uac2->g_audio.func.setup = afunc_setup; in afunc_alloc()
2298 uac2->g_audio.func.free_func = afunc_free; in afunc_alloc()
2300 return &uac2->g_audio.func; in afunc_alloc()
2303 DECLARE_USB_FUNCTION_INIT(uac2, afunc_alloc_inst, afunc_alloc);