diff options
Diffstat (limited to 'sound/spi/at73c213.c')
-rw-r--r-- | sound/spi/at73c213.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/spi/at73c213.c b/sound/spi/at73c213.c index aa571152f034..09802e8a6fb8 100644 --- a/sound/spi/at73c213.c +++ b/sound/spi/at73c213.c | |||
@@ -210,7 +210,13 @@ static int snd_at73c213_pcm_open(struct snd_pcm_substream *substream) | |||
210 | { | 210 | { |
211 | struct snd_at73c213 *chip = snd_pcm_substream_chip(substream); | 211 | struct snd_at73c213 *chip = snd_pcm_substream_chip(substream); |
212 | struct snd_pcm_runtime *runtime = substream->runtime; | 212 | struct snd_pcm_runtime *runtime = substream->runtime; |
213 | int err; | ||
213 | 214 | ||
215 | /* ensure buffer_size is a multiple of period_size */ | ||
216 | err = snd_pcm_hw_constraint_integer(runtime, | ||
217 | SNDRV_PCM_HW_PARAM_PERIODS); | ||
218 | if (err < 0) | ||
219 | return err; | ||
214 | snd_at73c213_playback_hw.rate_min = chip->bitrate; | 220 | snd_at73c213_playback_hw.rate_min = chip->bitrate; |
215 | snd_at73c213_playback_hw.rate_max = chip->bitrate; | 221 | snd_at73c213_playback_hw.rate_max = chip->bitrate; |
216 | runtime->hw = snd_at73c213_playback_hw; | 222 | runtime->hw = snd_at73c213_playback_hw; |