File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,8 +104,6 @@ static int dcpaud_interval_bitmask(struct snd_interval *i,
104104 return snd_interval_refine (i , & range );
105105}
106106
107- extern const struct snd_pcm_hw_constraint_list snd_pcm_known_rates ;
108-
109107static void dcpaud_fill_fmt_sieve (struct snd_pcm_hw_params * params ,
110108 struct dcp_sound_format_mask * sieve )
111109{
@@ -115,17 +113,11 @@ static void dcpaud_fill_fmt_sieve(struct snd_pcm_hw_params *params,
115113 SNDRV_PCM_HW_PARAM_RATE );
116114 struct snd_mask * f = hw_param_mask (params ,
117115 SNDRV_PCM_HW_PARAM_FORMAT );
118- int i ;
119116
120117 sieve -> nchans = GENMASK (c -> max , c -> min );
121118 sieve -> formats = f -> bits [0 ] | ((u64 ) f -> bits [1 ]) << 32 ; /* TODO: don't open-code */
122-
123- for (i = 0 ; i < snd_pcm_known_rates .count ; i ++ ) {
124- unsigned int rate = snd_pcm_known_rates .list [i ];
125-
126- if (snd_interval_test (r , rate ))
127- sieve -> rates |= 1u << i ;
128- }
119+ sieve -> rates = snd_pcm_rate_range_to_bits (r -> min + !!r -> openmin ,
120+ r -> max - !!r -> openmax );
129121}
130122
131123static void dcpaud_consult_elements (struct dcp_audio * dcpaud ,
You can’t perform that action at this time.
0 commit comments