Lines Matching refs:uac2_opts

684 static int get_max_bw_for_bint(const struct f_uac2_opts *uac2_opts,  in get_max_bw_for_bint()  argument
691 chmask = uac2_opts->p_chmask; in get_max_bw_for_bint()
692 srate = get_max_srate(uac2_opts->p_srates); in get_max_bw_for_bint()
693 ssize = uac2_opts->p_ssize; in get_max_bw_for_bint()
695 chmask = uac2_opts->c_chmask; in get_max_bw_for_bint()
696 srate = get_max_srate(uac2_opts->c_srates); in get_max_bw_for_bint()
697 ssize = uac2_opts->c_ssize; in get_max_bw_for_bint()
700 if (is_playback || (uac2_opts->c_sync == USB_ENDPOINT_SYNC_ASYNC)) { in get_max_bw_for_bint()
703 srate = srate * (1000 + uac2_opts->fb_max) / 1000; in get_max_bw_for_bint()
715 static int set_ep_max_packet_size_bint(struct device *dev, const struct f_uac2_opts *uac2_opts, in set_ep_max_packet_size_bint() argument
728 max_size_bw = get_max_bw_for_bint(uac2_opts, bint, 1000, is_playback); in set_ep_max_packet_size_bint()
735 opts_bint = uac2_opts->p_hs_bint; in set_ep_max_packet_size_bint()
737 opts_bint = uac2_opts->c_hs_bint; in set_ep_max_packet_size_bint()
742 max_size_bw = get_max_bw_for_bint(uac2_opts, bint, 8000, is_playback); in set_ep_max_packet_size_bint()
747 uac2_opts, bint, 8000, is_playback); in set_ep_max_packet_size_bint()
1040 struct f_uac2_opts *uac2_opts = g_audio_to_uac2_opts(agdev); in afunc_bind() local
1048 strings_fn[STR_ASSOC].s = uac2_opts->function_name; in afunc_bind()
1054 if (FUOUT_EN(uac2_opts)) { in afunc_bind()
1055 out_feature_unit_desc = build_fu_desc(uac2_opts->c_chmask); in afunc_bind()
1059 if (FUIN_EN(uac2_opts)) { in afunc_bind()
1060 in_feature_unit_desc = build_fu_desc(uac2_opts->p_chmask); in afunc_bind()
1080 if (FUOUT_EN(uac2_opts)) { in afunc_bind()
1085 if (FUIN_EN(uac2_opts)) { in afunc_bind()
1093 usb_out_it_desc.bNrChannels = num_channels(uac2_opts->c_chmask); in afunc_bind()
1094 usb_out_it_desc.bmChannelConfig = cpu_to_le32(uac2_opts->c_chmask); in afunc_bind()
1095 io_in_it_desc.bNrChannels = num_channels(uac2_opts->p_chmask); in afunc_bind()
1096 io_in_it_desc.bmChannelConfig = cpu_to_le32(uac2_opts->p_chmask); in afunc_bind()
1097 as_out_hdr_desc.bNrChannels = num_channels(uac2_opts->c_chmask); in afunc_bind()
1098 as_out_hdr_desc.bmChannelConfig = cpu_to_le32(uac2_opts->c_chmask); in afunc_bind()
1099 as_in_hdr_desc.bNrChannels = num_channels(uac2_opts->p_chmask); in afunc_bind()
1100 as_in_hdr_desc.bmChannelConfig = cpu_to_le32(uac2_opts->p_chmask); in afunc_bind()
1101 as_out_fmt1_desc.bSubslotSize = uac2_opts->c_ssize; in afunc_bind()
1102 as_out_fmt1_desc.bBitResolution = uac2_opts->c_ssize * 8; in afunc_bind()
1103 as_in_fmt1_desc.bSubslotSize = uac2_opts->p_ssize; in afunc_bind()
1104 as_in_fmt1_desc.bBitResolution = uac2_opts->p_ssize * 8; in afunc_bind()
1105 if (FUOUT_EN(uac2_opts)) { in afunc_bind()
1109 if (uac2_opts->c_mute_present) in afunc_bind()
1111 if (uac2_opts->c_volume_present) in afunc_bind()
1115 if (FUIN_EN(uac2_opts)) { in afunc_bind()
1119 if (uac2_opts->p_mute_present) in afunc_bind()
1121 if (uac2_opts->p_volume_present) in afunc_bind()
1137 if (EPOUT_EN(uac2_opts)) { in afunc_bind()
1149 if (EPOUT_FBACK_IN_EN(uac2_opts)) { in afunc_bind()
1167 if (EPIN_EN(uac2_opts)) { in afunc_bind()
1179 if (FUOUT_EN(uac2_opts) || FUIN_EN(uac2_opts)) { in afunc_bind()
1190 hs_epin_desc.bInterval = uac2_opts->p_hs_bint; in afunc_bind()
1191 ss_epin_desc.bInterval = uac2_opts->p_hs_bint; in afunc_bind()
1192 hs_epout_desc.bInterval = uac2_opts->c_hs_bint; in afunc_bind()
1193 ss_epout_desc.bInterval = uac2_opts->c_hs_bint; in afunc_bind()
1196 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &fs_epin_desc, in afunc_bind()
1203 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &fs_epout_desc, in afunc_bind()
1210 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &hs_epin_desc, in afunc_bind()
1217 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &hs_epout_desc, in afunc_bind()
1224 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &ss_epin_desc, in afunc_bind()
1231 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &ss_epout_desc, in afunc_bind()
1238 if (EPOUT_EN(uac2_opts)) { in afunc_bind()
1245 if (EPOUT_FBACK_IN_EN(uac2_opts)) { in afunc_bind()
1257 if (EPIN_EN(uac2_opts)) { in afunc_bind()
1291 setup_descriptor(uac2_opts); in afunc_bind()
1300 agdev->params.p_chmask = uac2_opts->p_chmask; in afunc_bind()
1301 memcpy(agdev->params.p_srates, uac2_opts->p_srates, in afunc_bind()
1303 agdev->params.p_ssize = uac2_opts->p_ssize; in afunc_bind()
1304 if (FUIN_EN(uac2_opts)) { in afunc_bind()
1306 agdev->params.p_fu.mute_present = uac2_opts->p_mute_present; in afunc_bind()
1307 agdev->params.p_fu.volume_present = uac2_opts->p_volume_present; in afunc_bind()
1308 agdev->params.p_fu.volume_min = uac2_opts->p_volume_min; in afunc_bind()
1309 agdev->params.p_fu.volume_max = uac2_opts->p_volume_max; in afunc_bind()
1310 agdev->params.p_fu.volume_res = uac2_opts->p_volume_res; in afunc_bind()
1312 agdev->params.c_chmask = uac2_opts->c_chmask; in afunc_bind()
1313 memcpy(agdev->params.c_srates, uac2_opts->c_srates, in afunc_bind()
1315 agdev->params.c_ssize = uac2_opts->c_ssize; in afunc_bind()
1316 if (FUOUT_EN(uac2_opts)) { in afunc_bind()
1318 agdev->params.c_fu.mute_present = uac2_opts->c_mute_present; in afunc_bind()
1319 agdev->params.c_fu.volume_present = uac2_opts->c_volume_present; in afunc_bind()
1320 agdev->params.c_fu.volume_min = uac2_opts->c_volume_min; in afunc_bind()
1321 agdev->params.c_fu.volume_max = uac2_opts->c_volume_max; in afunc_bind()
1322 agdev->params.c_fu.volume_res = uac2_opts->c_volume_res; in afunc_bind()
1324 agdev->params.req_number = uac2_opts->req_number; in afunc_bind()
1325 agdev->params.fb_max = uac2_opts->fb_max; in afunc_bind()
1327 if (FUOUT_EN(uac2_opts) || FUIN_EN(uac2_opts)) in afunc_bind()