Skip to content

Commit 2c86907

Browse files
committed
fixup! gpu: drm: apple: Add DCP audio driver
1 parent 748df0d commit 2c86907

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

drivers/gpu/drm/apple/audio.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff 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-
109107
static 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

131123
static void dcpaud_consult_elements(struct dcp_audio *dcpaud,

0 commit comments

Comments
 (0)