Lines Matching refs:uac2

1035 	struct f_uac2 *uac2 = func_to_uac2(fn);  in afunc_bind()  local
1134 uac2->ac_intf = ret; in afunc_bind()
1135 uac2->ac_alt = 0; in afunc_bind()
1145 uac2->as_out_intf = ret; in afunc_bind()
1146 uac2->as_out_alt = 0; in afunc_bind()
1174 uac2->as_in_intf = ret; in afunc_bind()
1175 uac2->as_in_alt = 0; in afunc_bind()
1179 uac2->int_ep = usb_ep_autoconfig(gadget, &fs_ep_int_desc); in afunc_bind()
1180 if (!uac2->int_ep) { in afunc_bind()
1350 struct f_uac2 *uac2 = func_to_uac2(&agdev->func); in afunc_notify_complete() local
1352 atomic_dec(&uac2->int_count); in afunc_notify_complete()
1360 struct f_uac2 *uac2 = func_to_uac2(&agdev->func); in afunc_notify() local
1366 if (!uac2->int_ep->enabled) in afunc_notify()
1369 if (atomic_inc_return(&uac2->int_count) > UAC2_DEF_INT_REQ_NUM) { in afunc_notify()
1370 atomic_dec(&uac2->int_count); in afunc_notify()
1374 req = usb_ep_alloc_request(uac2->int_ep, GFP_ATOMIC); in afunc_notify()
1386 w_index = unit_id << 8 | uac2->ac_intf; in afunc_notify()
1399 ret = usb_ep_queue(uac2->int_ep, req, GFP_ATOMIC); in afunc_notify()
1409 usb_ep_free_request(uac2->int_ep, req); in afunc_notify()
1411 atomic_dec(&uac2->int_count); in afunc_notify()
1420 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_set_alt() local
1432 if (intf == uac2->ac_intf) { in afunc_set_alt()
1440 if (uac2->int_ep) { in afunc_set_alt()
1441 usb_ep_disable(uac2->int_ep); in afunc_set_alt()
1442 config_ep_by_speed(gadget, &agdev->func, uac2->int_ep); in afunc_set_alt()
1443 usb_ep_enable(uac2->int_ep); in afunc_set_alt()
1449 if (intf == uac2->as_out_intf) { in afunc_set_alt()
1450 uac2->as_out_alt = alt; in afunc_set_alt()
1453 ret = u_audio_start_capture(&uac2->g_audio); in afunc_set_alt()
1455 u_audio_stop_capture(&uac2->g_audio); in afunc_set_alt()
1456 } else if (intf == uac2->as_in_intf) { in afunc_set_alt()
1457 uac2->as_in_alt = alt; in afunc_set_alt()
1460 ret = u_audio_start_playback(&uac2->g_audio); in afunc_set_alt()
1462 u_audio_stop_playback(&uac2->g_audio); in afunc_set_alt()
1474 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_get_alt() local
1477 if (intf == uac2->ac_intf) in afunc_get_alt()
1478 return uac2->ac_alt; in afunc_get_alt()
1479 else if (intf == uac2->as_out_intf) in afunc_get_alt()
1480 return uac2->as_out_alt; in afunc_get_alt()
1481 else if (intf == uac2->as_in_intf) in afunc_get_alt()
1482 return uac2->as_in_alt; in afunc_get_alt()
1494 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_disable() local
1496 uac2->as_in_alt = 0; in afunc_disable()
1497 uac2->as_out_alt = 0; in afunc_disable()
1498 u_audio_stop_capture(&uac2->g_audio); in afunc_disable()
1499 u_audio_stop_playback(&uac2->g_audio); in afunc_disable()
1500 if (uac2->int_ep) in afunc_disable()
1501 usb_ep_disable(uac2->int_ep); in afunc_disable()
1507 struct f_uac2 *uac2 = func_to_uac2(fn); in afunc_suspend() local
1509 u_audio_suspend(&uac2->g_audio); in afunc_suspend()
1696 struct f_uac2 *uac2 = func_to_uac2(fn); in uac2_cs_control_sam_freq() local
1704 if (uac2->clock_id == USB_IN_CLK_ID) { in uac2_cs_control_sam_freq()
1706 } else if (uac2->clock_id == USB_OUT_CLK_ID) { in uac2_cs_control_sam_freq()
1717 struct f_uac2 *uac2 = func_to_uac2(&agdev->func); in out_rq_cur_complete() local
1718 struct usb_ctrlrequest *cr = &uac2->setup_cr; in out_rq_cur_complete()
1766 struct f_uac2 *uac2 = func_to_uac2(fn); in out_rq_cur() local
1779 uac2->clock_id = clock_id; in out_rq_cur()
1785 memcpy(&uac2->setup_cr, cr, sizeof(*cr)); in out_rq_cur()
1801 struct f_uac2 *uac2 = func_to_uac2(fn); in setup_rq_inf() local
1806 if (intf != uac2->ac_intf) { in setup_rq_inf()
2215 struct f_uac2 *uac2; in afunc_alloc() local
2218 uac2 = kzalloc(sizeof(*uac2), GFP_KERNEL); in afunc_alloc()
2219 if (uac2 == NULL) in afunc_alloc()
2227 uac2->g_audio.func.name = "uac2_func"; in afunc_alloc()
2228 uac2->g_audio.func.bind = afunc_bind; in afunc_alloc()
2229 uac2->g_audio.func.unbind = afunc_unbind; in afunc_alloc()
2230 uac2->g_audio.func.set_alt = afunc_set_alt; in afunc_alloc()
2231 uac2->g_audio.func.get_alt = afunc_get_alt; in afunc_alloc()
2232 uac2->g_audio.func.disable = afunc_disable; in afunc_alloc()
2233 uac2->g_audio.func.suspend = afunc_suspend; in afunc_alloc()
2234 uac2->g_audio.func.setup = afunc_setup; in afunc_alloc()
2235 uac2->g_audio.func.free_func = afunc_free; in afunc_alloc()
2237 return &uac2->g_audio.func; in afunc_alloc()
2240 DECLARE_USB_FUNCTION_INIT(uac2, afunc_alloc_inst, afunc_alloc);