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()
537 struct audioformat *fp, in match_endpoint_audioformats() argument
544 if (fp->channels < 1) { in match_endpoint_audioformats()
546 "%s: (fmt @%p) no channels\n", __func__, fp); in match_endpoint_audioformats()
550 if (!(fp->formats & pcm_format_to_bits(pcm_format))) { in match_endpoint_audioformats()
553 fp, pcm_format); in match_endpoint_audioformats()
557 for (i = 0; i < fp->nr_rates; i++) { in match_endpoint_audioformats()
558 if (fp->rate_table[i] == rate) { in match_endpoint_audioformats()
566 fp, rate); in match_endpoint_audioformats()
570 if (fp->channels == match->channels) in match_endpoint_audioformats()
574 "%s: (fmt @%p) score %d\n", __func__, fp, score); in match_endpoint_audioformats()
585 struct audioformat *fp; in configure_sync_endpoint() local
604 list_for_each_entry(fp, &sync_subs->fmt_list, list) { in configure_sync_endpoint()
606 fp, subs->cur_audiofmt, in configure_sync_endpoint()
610 sync_fp = fp; in configure_sync_endpoint()
838 struct audioformat *fp) in hw_check_valid_format() argument
849 check_fmts.bits[0] = (u32)fp->formats; in hw_check_valid_format()
850 check_fmts.bits[1] = (u32)(fp->formats >> 32); in hw_check_valid_format()
853 hwc_debug(" > check: no supported format %d\n", fp->format); in hw_check_valid_format()
857 if (fp->channels < ct->min || fp->channels > ct->max) { in hw_check_valid_format()
858 hwc_debug(" > check: no valid channels %d (%d/%d)\n", fp->channels, ct->min, ct->max); in hw_check_valid_format()
862 if (fp->rate_min > it->max || (fp->rate_min == it->max && it->openmax)) { in hw_check_valid_format()
863 hwc_debug(" > check: rate_min %d > max %d\n", fp->rate_min, it->max); in hw_check_valid_format()
866 if (fp->rate_max < it->min || (fp->rate_max == it->min && it->openmin)) { in hw_check_valid_format()
867 hwc_debug(" > check: rate_max %d < min %d\n", fp->rate_max, it->min); in hw_check_valid_format()
872 ptime = 125 * (1 << fp->datainterval); in hw_check_valid_format()
885 struct audioformat *fp; in hw_rule_rate() local
893 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_rate()
894 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_rate()
897 if (rmin > fp->rate_min) in hw_rule_rate()
898 rmin = fp->rate_min; in hw_rule_rate()
899 if (rmax < fp->rate_max) in hw_rule_rate()
900 rmax = fp->rate_max; in hw_rule_rate()
902 rmin = fp->rate_min; in hw_rule_rate()
903 rmax = fp->rate_max; in hw_rule_rate()
937 struct audioformat *fp; in hw_rule_channels() local
945 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_channels()
946 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_channels()
949 if (rmin > fp->channels) in hw_rule_channels()
950 rmin = fp->channels; in hw_rule_channels()
951 if (rmax < fp->channels) in hw_rule_channels()
952 rmax = fp->channels; in hw_rule_channels()
954 rmin = fp->channels; in hw_rule_channels()
955 rmax = fp->channels; in hw_rule_channels()
988 struct audioformat *fp; in hw_rule_format() local
996 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_format()
997 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_format()
999 fbits |= fp->formats; in hw_rule_format()
1019 struct audioformat *fp; in hw_rule_period_time() local
1028 list_for_each_entry(fp, &subs->fmt_list, list) { in hw_rule_period_time()
1029 if (!hw_check_valid_format(subs, params, fp)) in hw_rule_period_time()
1031 min_datainterval = min(min_datainterval, fp->datainterval); in hw_rule_period_time()
1059 struct audioformat *fp; in snd_usb_pcm_check_knot() local
1067 list_for_each_entry(fp, &subs->fmt_list, list) { in snd_usb_pcm_check_knot()
1068 if (fp->rates & SNDRV_PCM_RATE_CONTINUOUS) in snd_usb_pcm_check_knot()
1070 count += fp->nr_rates; in snd_usb_pcm_check_knot()
1071 if (fp->rates & SNDRV_PCM_RATE_KNOT) in snd_usb_pcm_check_knot()
1084 list_for_each_entry(fp, &subs->fmt_list, list) { in snd_usb_pcm_check_knot()
1086 for (i = 0; i < fp->nr_rates; i++) in snd_usb_pcm_check_knot()
1087 rate_list[count++] = fp->rate_table[i]; in snd_usb_pcm_check_knot()
1104 struct audioformat *fp; in setup_hw_info() local
1118 list_for_each_entry(fp, &subs->fmt_list, list) { in setup_hw_info()
1119 runtime->hw.rates |= fp->rates; in setup_hw_info()
1120 if (runtime->hw.rate_min > fp->rate_min) in setup_hw_info()
1121 runtime->hw.rate_min = fp->rate_min; in setup_hw_info()
1122 if (runtime->hw.rate_max < fp->rate_max) in setup_hw_info()
1123 runtime->hw.rate_max = fp->rate_max; in setup_hw_info()
1124 if (runtime->hw.channels_min > fp->channels) in setup_hw_info()
1125 runtime->hw.channels_min = fp->channels; in setup_hw_info()
1126 if (runtime->hw.channels_max < fp->channels) in setup_hw_info()
1127 runtime->hw.channels_max = fp->channels; in setup_hw_info()
1128 if (fp->fmt_type == UAC_FORMAT_TYPE_II && fp->frame_size > 0) { in setup_hw_info()
1131 fp->frame_size; in setup_hw_info()
1133 pt = 125 * (1 << fp->datainterval); in setup_hw_info()