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()
1148 if (EPOUT_FBACK_IN_EN(uac2_opts)) { in afunc_bind()
1166 if (EPIN_EN(uac2_opts)) { in afunc_bind()
1178 if (FUOUT_EN(uac2_opts) || FUIN_EN(uac2_opts)) { in afunc_bind()
1189 hs_epin_desc.bInterval = uac2_opts->p_hs_bint; in afunc_bind()
1190 ss_epin_desc.bInterval = uac2_opts->p_hs_bint; in afunc_bind()
1191 hs_epout_desc.bInterval = uac2_opts->c_hs_bint; in afunc_bind()
1192 ss_epout_desc.bInterval = uac2_opts->c_hs_bint; in afunc_bind()
1195 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &fs_epin_desc, in afunc_bind()
1202 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &fs_epout_desc, in afunc_bind()
1209 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &hs_epin_desc, in afunc_bind()
1216 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &hs_epout_desc, in afunc_bind()
1223 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &ss_epin_desc, in afunc_bind()
1230 ret = set_ep_max_packet_size_bint(dev, uac2_opts, &ss_epout_desc, in afunc_bind()
1237 if (EPOUT_EN(uac2_opts)) { in afunc_bind()
1244 if (EPOUT_FBACK_IN_EN(uac2_opts)) { in afunc_bind()
1256 if (EPIN_EN(uac2_opts)) { in afunc_bind()
1290 setup_descriptor(uac2_opts); in afunc_bind()
1299 agdev->params.p_chmask = uac2_opts->p_chmask; in afunc_bind()
1300 memcpy(agdev->params.p_srates, uac2_opts->p_srates, in afunc_bind()
1302 agdev->params.p_ssize = uac2_opts->p_ssize; in afunc_bind()
1303 if (FUIN_EN(uac2_opts)) { in afunc_bind()
1305 agdev->params.p_fu.mute_present = uac2_opts->p_mute_present; in afunc_bind()
1306 agdev->params.p_fu.volume_present = uac2_opts->p_volume_present; in afunc_bind()
1307 agdev->params.p_fu.volume_min = uac2_opts->p_volume_min; in afunc_bind()
1308 agdev->params.p_fu.volume_max = uac2_opts->p_volume_max; in afunc_bind()
1309 agdev->params.p_fu.volume_res = uac2_opts->p_volume_res; in afunc_bind()
1311 agdev->params.c_chmask = uac2_opts->c_chmask; in afunc_bind()
1312 memcpy(agdev->params.c_srates, uac2_opts->c_srates, in afunc_bind()
1314 agdev->params.c_ssize = uac2_opts->c_ssize; in afunc_bind()
1315 if (FUOUT_EN(uac2_opts)) { in afunc_bind()
1317 agdev->params.c_fu.mute_present = uac2_opts->c_mute_present; in afunc_bind()
1318 agdev->params.c_fu.volume_present = uac2_opts->c_volume_present; in afunc_bind()
1319 agdev->params.c_fu.volume_min = uac2_opts->c_volume_min; in afunc_bind()
1320 agdev->params.c_fu.volume_max = uac2_opts->c_volume_max; in afunc_bind()
1321 agdev->params.c_fu.volume_res = uac2_opts->c_volume_res; in afunc_bind()
1323 agdev->params.req_number = uac2_opts->req_number; in afunc_bind()
1324 agdev->params.fb_max = uac2_opts->fb_max; in afunc_bind()
1326 if (FUOUT_EN(uac2_opts) || FUIN_EN(uac2_opts)) in afunc_bind()