Lines Matching refs:fp

98 	struct audioformat *fp;  in find_format()  local
102 list_for_each_entry(fp, &subs->fmt_list, list) { in find_format()
103 if (!(fp->formats & pcm_format_to_bits(subs->pcm_format))) in find_format()
105 if (fp->channels != subs->channels) in find_format()
107 if (subs->cur_rate < fp->rate_min || in find_format()
108 subs->cur_rate > fp->rate_max) in find_format()
110 if (! (fp->rates & SNDRV_PCM_RATE_CONTINUOUS)) { in find_format()
112 for (i = 0; i < fp->nr_rates; i++) in find_format()
113 if (fp->rate_table[i] == subs->cur_rate) in find_format()
115 if (i >= fp->nr_rates) in find_format()
118 attr = fp->ep_attr & USB_ENDPOINT_SYNCTYPE; in find_format()
120 found = fp; in find_format()
139 found = fp; in find_format()
145 if (fp->maxpacksize > found->maxpacksize) { in find_format()
146 found = fp; in find_format()
565 struct audioformat *fp, in match_endpoint_audioformats() argument
572 if (fp->channels < 1) { in match_endpoint_audioformats()
574 "%s: (fmt @%p) no channels\n", __func__, fp); in match_endpoint_audioformats()
578 if (!(fp->formats & pcm_format_to_bits(pcm_format))) { in match_endpoint_audioformats()
581 fp, pcm_format); in match_endpoint_audioformats()
585 for (i = 0; i < fp->nr_rates; i++) { in match_endpoint_audioformats()
586 if (fp->rate_table[i] == rate) { in match_endpoint_audioformats()
594 fp, rate); in match_endpoint_audioformats()
598 if (fp->channels == match->channels) in match_endpoint_audioformats()
602 "%s: (fmt @%p) score %d\n", __func__, fp, score); in match_endpoint_audioformats()
613 struct audioformat *fp; in configure_sync_endpoint() local
632 list_for_each_entry(fp, &sync_subs->fmt_list, list) { in configure_sync_endpoint()
634 fp, subs->cur_audiofmt, in configure_sync_endpoint()
638 sync_fp = fp; in configure_sync_endpoint()
866 struct audioformat *fp) in hw_check_valid_format() argument
877 check_fmts.bits[0] = (u32)fp->formats; in hw_check_valid_format()
878 check_fmts.bits[1] = (u32)(fp->formats >> 32); in hw_check_valid_format()
881 hwc_debug(" > check: no supported format %d\n", fp->format); in hw_check_valid_format()
885 if (fp->channels < ct->min || fp->channels > ct->max) { in hw_check_valid_format()
886 hwc_debug(" > check: no valid channels %d (%d/%d)\n", fp->channels, ct->min, ct->max); in hw_check_valid_format()
890 if (fp->rate_min > it->max || (fp->rate_min == it->max && it->openmax)) { in hw_check_valid_format()
891 hwc_debug(" > check: rate_min %d > max %d\n", fp->rate_min, it->max); in hw_check_valid_format()
894 if (fp->rate_max < it->min || (fp->rate_max == it->min && it->openmin)) { in hw_check_valid_format()
895 hwc_debug(" > check: rate_max %d < min %d\n", fp->rate_max, it->min); in hw_check_valid_format()
900 ptime = 125 * (1 << fp->datainterval); in hw_check_valid_format()
913 struct audioformat *fp; in hw_rule_rate() local
921 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_rate()
922 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_rate()
925 if (rmin > fp->rate_min) in hw_rule_rate()
926 rmin = fp->rate_min; in hw_rule_rate()
927 if (rmax < fp->rate_max) in hw_rule_rate()
928 rmax = fp->rate_max; in hw_rule_rate()
930 rmin = fp->rate_min; in hw_rule_rate()
931 rmax = fp->rate_max; in hw_rule_rate()
965 struct audioformat *fp; in hw_rule_channels() local
973 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_channels()
974 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_channels()
977 if (rmin > fp->channels) in hw_rule_channels()
978 rmin = fp->channels; in hw_rule_channels()
979 if (rmax < fp->channels) in hw_rule_channels()
980 rmax = fp->channels; in hw_rule_channels()
982 rmin = fp->channels; in hw_rule_channels()
983 rmax = fp->channels; in hw_rule_channels()
1016 struct audioformat *fp; in hw_rule_format() local
1024 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_format()
1025 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_format()
1027 fbits |= fp->formats; in hw_rule_format()
1047 struct audioformat *fp; in hw_rule_period_time() local
1056 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_period_time()
1057 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_period_time()
1059 min_datainterval = min(min_datainterval, fp->datainterval); in hw_rule_period_time()
1087 struct audioformat *fp; in snd_usb_pcm_check_knot() local
1095 list_for_each_entry(fp, &subs->fmt_list, list) { in snd_usb_pcm_check_knot()
1096 if (fp->rates & SNDRV_PCM_RATE_CONTINUOUS) in snd_usb_pcm_check_knot()
1098 count += fp->nr_rates; in snd_usb_pcm_check_knot()
1099 if (fp->rates & SNDRV_PCM_RATE_KNOT) in snd_usb_pcm_check_knot()
1112 list_for_each_entry(fp, &subs->fmt_list, list) { in snd_usb_pcm_check_knot()
1114 for (i = 0; i < fp->nr_rates; i++) in snd_usb_pcm_check_knot()
1115 rate_list[count++] = fp->rate_table[i]; in snd_usb_pcm_check_knot()
1132 struct audioformat *fp; in setup_hw_info() local
1146 list_for_each_entry(fp, &subs->fmt_list, list) { in setup_hw_info()
1147 runtime->hw.rates |= fp->rates; in setup_hw_info()
1148 if (runtime->hw.rate_min > fp->rate_min) in setup_hw_info()
1149 runtime->hw.rate_min = fp->rate_min; in setup_hw_info()
1150 if (runtime->hw.rate_max < fp->rate_max) in setup_hw_info()
1151 runtime->hw.rate_max = fp->rate_max; in setup_hw_info()
1152 if (runtime->hw.channels_min > fp->channels) in setup_hw_info()
1153 runtime->hw.channels_min = fp->channels; in setup_hw_info()
1154 if (runtime->hw.channels_max < fp->channels) in setup_hw_info()
1155 runtime->hw.channels_max = fp->channels; in setup_hw_info()
1156 if (fp->fmt_type == UAC_FORMAT_TYPE_II && fp->frame_size > 0) { in setup_hw_info()
1159 fp->frame_size; in setup_hw_info()
1161 pt = 125 * (1 << fp->datainterval); in setup_hw_info()