diff --git a/[refs] b/[refs] index 4368d32fe5ed..fa963cea292f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b32300a4ce78b4df92f33c455ffe644b36f0ff1a +refs/heads/master: f5e09ef0985ff01af6b4a12954840467f153a41c diff --git a/trunk/sound/spi/at73c213.c b/trunk/sound/spi/at73c213.c index aa571152f034..09802e8a6fb8 100644 --- a/trunk/sound/spi/at73c213.c +++ b/trunk/sound/spi/at73c213.c @@ -210,7 +210,13 @@ static int snd_at73c213_pcm_open(struct snd_pcm_substream *substream) { struct snd_at73c213 *chip = snd_pcm_substream_chip(substream); struct snd_pcm_runtime *runtime = substream->runtime; + int err; + /* ensure buffer_size is a multiple of period_size */ + err = snd_pcm_hw_constraint_integer(runtime, + SNDRV_PCM_HW_PARAM_PERIODS); + if (err < 0) + return err; snd_at73c213_playback_hw.rate_min = chip->bitrate; snd_at73c213_playback_hw.rate_max = chip->bitrate; runtime->hw = snd_at73c213_playback_hw;