Lines Matching refs:fp
86 struct audioformat *fp; in find_format() local
90 list_for_each_entry(fp, &subs->fmt_list, list) { in find_format()
91 if (!(fp->formats & pcm_format_to_bits(subs->pcm_format))) in find_format()
93 if (fp->channels != subs->channels) in find_format()
95 if (subs->cur_rate < fp->rate_min || in find_format()
96 subs->cur_rate > fp->rate_max) in find_format()
98 if (! (fp->rates & SNDRV_PCM_RATE_CONTINUOUS)) { in find_format()
100 for (i = 0; i < fp->nr_rates; i++) in find_format()
101 if (fp->rate_table[i] == subs->cur_rate) in find_format()
103 if (i >= fp->nr_rates) in find_format()
106 attr = fp->ep_attr & USB_ENDPOINT_SYNCTYPE; in find_format()
108 found = fp; in find_format()
127 found = fp; in find_format()
133 if (fp->maxpacksize > found->maxpacksize) { in find_format()
134 found = fp; in find_format()
148 struct audioformat *fp; in find_format_and_si() local
152 list_for_each_entry(fp, &subs->fmt_list, list) { in find_format_and_si()
153 if (datainterval != fp->datainterval) in find_format_and_si()
155 if (!(fp->formats & pcm_format_to_bits(subs->pcm_format))) in find_format_and_si()
157 if (fp->channels != subs->channels) in find_format_and_si()
159 if (subs->cur_rate < fp->rate_min || in find_format_and_si()
160 subs->cur_rate > fp->rate_max) in find_format_and_si()
162 if (!(fp->rates & SNDRV_PCM_RATE_CONTINUOUS)) { in find_format_and_si()
163 for (i = 0; i < fp->nr_rates; i++) in find_format_and_si()
164 if (fp->rate_table[i] == subs->cur_rate) in find_format_and_si()
166 if (i >= fp->nr_rates) in find_format_and_si()
169 attr = fp->ep_attr & USB_ENDPOINT_SYNCTYPE; in find_format_and_si()
171 found = fp; in find_format_and_si()
190 found = fp; in find_format_and_si()
196 if (fp->maxpacksize > found->maxpacksize) { in find_format_and_si()
197 found = fp; in find_format_and_si()
715 struct audioformat *fp, in match_endpoint_audioformats() argument
722 if (fp->channels < 1) { in match_endpoint_audioformats()
724 "%s: (fmt @%p) no channels\n", __func__, fp); in match_endpoint_audioformats()
728 if (!(fp->formats & pcm_format_to_bits(pcm_format))) { in match_endpoint_audioformats()
731 fp, pcm_format); in match_endpoint_audioformats()
735 for (i = 0; i < fp->nr_rates; i++) { in match_endpoint_audioformats()
736 if (fp->rate_table[i] == rate) { in match_endpoint_audioformats()
744 fp, rate); in match_endpoint_audioformats()
748 if (fp->channels == match->channels) in match_endpoint_audioformats()
752 "%s: (fmt @%p) score %d\n", __func__, fp, score); in match_endpoint_audioformats()
763 struct audioformat *fp; in configure_sync_endpoint() local
782 list_for_each_entry(fp, &sync_subs->fmt_list, list) { in configure_sync_endpoint()
784 fp, subs->cur_audiofmt, in configure_sync_endpoint()
788 sync_fp = fp; in configure_sync_endpoint()
1095 struct audioformat *fp) in hw_check_valid_format() argument
1106 check_fmts.bits[0] = (u32)fp->formats; in hw_check_valid_format()
1107 check_fmts.bits[1] = (u32)(fp->formats >> 32); in hw_check_valid_format()
1110 hwc_debug(" > check: no supported format %d\n", fp->format); in hw_check_valid_format()
1114 if (fp->channels < ct->min || fp->channels > ct->max) { in hw_check_valid_format()
1115 hwc_debug(" > check: no valid channels %d (%d/%d)\n", fp->channels, ct->min, ct->max); in hw_check_valid_format()
1119 if (fp->rate_min > it->max || (fp->rate_min == it->max && it->openmax)) { in hw_check_valid_format()
1120 hwc_debug(" > check: rate_min %d > max %d\n", fp->rate_min, it->max); in hw_check_valid_format()
1123 if (fp->rate_max < it->min || (fp->rate_max == it->min && it->openmin)) { in hw_check_valid_format()
1124 hwc_debug(" > check: rate_max %d < min %d\n", fp->rate_max, it->min); in hw_check_valid_format()
1129 ptime = 125 * (1 << fp->datainterval); in hw_check_valid_format()
1142 struct audioformat *fp; in hw_rule_rate() local
1150 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_rate()
1151 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_rate()
1154 if (rmin > fp->rate_min) in hw_rule_rate()
1155 rmin = fp->rate_min; in hw_rule_rate()
1156 if (rmax < fp->rate_max) in hw_rule_rate()
1157 rmax = fp->rate_max; in hw_rule_rate()
1159 rmin = fp->rate_min; in hw_rule_rate()
1160 rmax = fp->rate_max; in hw_rule_rate()
1194 struct audioformat *fp; in hw_rule_channels() local
1202 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_channels()
1203 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_channels()
1206 if (rmin > fp->channels) in hw_rule_channels()
1207 rmin = fp->channels; in hw_rule_channels()
1208 if (rmax < fp->channels) in hw_rule_channels()
1209 rmax = fp->channels; in hw_rule_channels()
1211 rmin = fp->channels; in hw_rule_channels()
1212 rmax = fp->channels; in hw_rule_channels()
1245 struct audioformat *fp; in hw_rule_format() local
1253 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_format()
1254 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_format()
1256 fbits |= fp->formats; in hw_rule_format()
1276 struct audioformat *fp; in hw_rule_period_time() local
1285 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_period_time()
1286 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_period_time()
1288 min_datainterval = min(min_datainterval, fp->datainterval); in hw_rule_period_time()
1316 struct audioformat *fp; in snd_usb_pcm_check_knot() local
1324 list_for_each_entry(fp, &subs->fmt_list, list) { in snd_usb_pcm_check_knot()
1325 if (fp->rates & SNDRV_PCM_RATE_CONTINUOUS) in snd_usb_pcm_check_knot()
1327 count += fp->nr_rates; in snd_usb_pcm_check_knot()
1328 if (fp->rates & SNDRV_PCM_RATE_KNOT) in snd_usb_pcm_check_knot()
1341 list_for_each_entry(fp, &subs->fmt_list, list) { in snd_usb_pcm_check_knot()
1343 for (i = 0; i < fp->nr_rates; i++) in snd_usb_pcm_check_knot()
1344 rate_list[count++] = fp->rate_table[i]; in snd_usb_pcm_check_knot()
1361 struct audioformat *fp; in setup_hw_info() local
1375 list_for_each_entry(fp, &subs->fmt_list, list) { in setup_hw_info()
1376 runtime->hw.rates |= fp->rates; in setup_hw_info()
1377 if (runtime->hw.rate_min > fp->rate_min) in setup_hw_info()
1378 runtime->hw.rate_min = fp->rate_min; in setup_hw_info()
1379 if (runtime->hw.rate_max < fp->rate_max) in setup_hw_info()
1380 runtime->hw.rate_max = fp->rate_max; in setup_hw_info()
1381 if (runtime->hw.channels_min > fp->channels) in setup_hw_info()
1382 runtime->hw.channels_min = fp->channels; in setup_hw_info()
1383 if (runtime->hw.channels_max < fp->channels) in setup_hw_info()
1384 runtime->hw.channels_max = fp->channels; in setup_hw_info()
1385 if (fp->fmt_type == UAC_FORMAT_TYPE_II && fp->frame_size > 0) { in setup_hw_info()
1388 fp->frame_size; in setup_hw_info()
1390 pt = 125 * (1 << fp->datainterval); in setup_hw_info()