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()
138 snd_vendor_set_pcm_binterval(fp, found, &cur_attr, &attr); in find_format()
150 struct audioformat *fp; in find_format_and_si() local
154 list_for_each_entry(fp, &subs->fmt_list, list) { in find_format_and_si()
155 if (datainterval != fp->datainterval) in find_format_and_si()
157 if (!(fp->formats & pcm_format_to_bits(subs->pcm_format))) in find_format_and_si()
159 if (fp->channels != subs->channels) in find_format_and_si()
161 if (subs->cur_rate < fp->rate_min || in find_format_and_si()
162 subs->cur_rate > fp->rate_max) in find_format_and_si()
164 if (!(fp->rates & SNDRV_PCM_RATE_CONTINUOUS)) { in find_format_and_si()
165 for (i = 0; i < fp->nr_rates; i++) in find_format_and_si()
166 if (fp->rate_table[i] == subs->cur_rate) in find_format_and_si()
168 if (i >= fp->nr_rates) in find_format_and_si()
171 attr = fp->ep_attr & USB_ENDPOINT_SYNCTYPE; in find_format_and_si()
173 found = fp; in find_format_and_si()
192 found = fp; in find_format_and_si()
198 if (fp->maxpacksize > found->maxpacksize) { in find_format_and_si()
199 found = fp; in find_format_and_si()
745 struct audioformat *fp, in match_endpoint_audioformats() argument
752 if (fp->channels < 1) { in match_endpoint_audioformats()
754 "%s: (fmt @%p) no channels\n", __func__, fp); in match_endpoint_audioformats()
758 if (!(fp->formats & pcm_format_to_bits(pcm_format))) { in match_endpoint_audioformats()
761 fp, pcm_format); in match_endpoint_audioformats()
765 for (i = 0; i < fp->nr_rates; i++) { in match_endpoint_audioformats()
766 if (fp->rate_table[i] == rate) { in match_endpoint_audioformats()
774 fp, rate); in match_endpoint_audioformats()
778 if (fp->channels == match->channels) in match_endpoint_audioformats()
782 "%s: (fmt @%p) score %d\n", __func__, fp, score); in match_endpoint_audioformats()
793 struct audioformat *fp; in configure_sync_endpoint() local
812 list_for_each_entry(fp, &sync_subs->fmt_list, list) { in configure_sync_endpoint()
814 fp, subs->cur_audiofmt, in configure_sync_endpoint()
818 sync_fp = fp; in configure_sync_endpoint()
1140 struct audioformat *fp) in hw_check_valid_format() argument
1151 check_fmts.bits[0] = (u32)fp->formats; in hw_check_valid_format()
1152 check_fmts.bits[1] = (u32)(fp->formats >> 32); in hw_check_valid_format()
1155 hwc_debug(" > check: no supported format %d\n", fp->format); in hw_check_valid_format()
1159 if (fp->channels < ct->min || fp->channels > ct->max) { in hw_check_valid_format()
1160 hwc_debug(" > check: no valid channels %d (%d/%d)\n", fp->channels, ct->min, ct->max); in hw_check_valid_format()
1164 if (fp->rate_min > it->max || (fp->rate_min == it->max && it->openmax)) { in hw_check_valid_format()
1165 hwc_debug(" > check: rate_min %d > max %d\n", fp->rate_min, it->max); in hw_check_valid_format()
1168 if (fp->rate_max < it->min || (fp->rate_max == it->min && it->openmin)) { in hw_check_valid_format()
1169 hwc_debug(" > check: rate_max %d < min %d\n", fp->rate_max, it->min); in hw_check_valid_format()
1174 ptime = 125 * (1 << fp->datainterval); in hw_check_valid_format()
1187 struct audioformat *fp; in hw_rule_rate() local
1195 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_rate()
1196 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_rate()
1199 if (rmin > fp->rate_min) in hw_rule_rate()
1200 rmin = fp->rate_min; in hw_rule_rate()
1201 if (rmax < fp->rate_max) in hw_rule_rate()
1202 rmax = fp->rate_max; in hw_rule_rate()
1204 rmin = fp->rate_min; in hw_rule_rate()
1205 rmax = fp->rate_max; in hw_rule_rate()
1239 struct audioformat *fp; in hw_rule_channels() local
1247 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_channels()
1248 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_channels()
1251 if (rmin > fp->channels) in hw_rule_channels()
1252 rmin = fp->channels; in hw_rule_channels()
1253 if (rmax < fp->channels) in hw_rule_channels()
1254 rmax = fp->channels; in hw_rule_channels()
1256 rmin = fp->channels; in hw_rule_channels()
1257 rmax = fp->channels; in hw_rule_channels()
1290 struct audioformat *fp; in hw_rule_format() local
1298 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_format()
1299 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_format()
1301 fbits |= fp->formats; in hw_rule_format()
1321 struct audioformat *fp; in hw_rule_period_time() local
1330 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_period_time()
1331 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_period_time()
1333 min_datainterval = min(min_datainterval, fp->datainterval); in hw_rule_period_time()
1361 struct audioformat *fp; in snd_usb_pcm_check_knot() local
1369 list_for_each_entry(fp, &subs->fmt_list, list) { in snd_usb_pcm_check_knot()
1370 if (fp->rates & SNDRV_PCM_RATE_CONTINUOUS) in snd_usb_pcm_check_knot()
1372 count += fp->nr_rates; in snd_usb_pcm_check_knot()
1373 if (fp->rates & SNDRV_PCM_RATE_KNOT) in snd_usb_pcm_check_knot()
1386 list_for_each_entry(fp, &subs->fmt_list, list) { in snd_usb_pcm_check_knot()
1388 for (i = 0; i < fp->nr_rates; i++) in snd_usb_pcm_check_knot()
1389 rate_list[count++] = fp->rate_table[i]; in snd_usb_pcm_check_knot()
1406 struct audioformat *fp; in setup_hw_info() local
1420 list_for_each_entry(fp, &subs->fmt_list, list) { in setup_hw_info()
1421 runtime->hw.rates |= fp->rates; in setup_hw_info()
1422 if (runtime->hw.rate_min > fp->rate_min) in setup_hw_info()
1423 runtime->hw.rate_min = fp->rate_min; in setup_hw_info()
1424 if (runtime->hw.rate_max < fp->rate_max) in setup_hw_info()
1425 runtime->hw.rate_max = fp->rate_max; in setup_hw_info()
1426 if (runtime->hw.channels_min > fp->channels) in setup_hw_info()
1427 runtime->hw.channels_min = fp->channels; in setup_hw_info()
1428 if (runtime->hw.channels_max < fp->channels) in setup_hw_info()
1429 runtime->hw.channels_max = fp->channels; in setup_hw_info()
1430 if (fp->fmt_type == UAC_FORMAT_TYPE_II && fp->frame_size > 0) { in setup_hw_info()
1433 fp->frame_size; in setup_hw_info()
1435 pt = 125 * (1 << fp->datainterval); in setup_hw_info()