diff options
author | Mark Brown <broonie@kernel.org> | 2020-09-17 18:35:38 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-09-17 18:35:38 +0300 |
commit | 4db68e62a0b912655c598de829b05b2383da0cab (patch) | |
tree | 14c717646e8de62283aaa9c08b747e8db3871dbd /sound/soc/intel/atom | |
parent | d70a4412e264cd8ff7a034505184c0b54876532a (diff) | |
parent | 244ac15de75ca62ed7a09c7291b67aeead9e12ac (diff) | |
download | linux-4db68e62a0b912655c598de829b05b2383da0cab.tar.xz |
Merge branch 'asoc-5.9' into asoc-5.10
Diffstat (limited to 'sound/soc/intel/atom')
-rw-r--r-- | sound/soc/intel/atom/sst-mfld-platform-pcm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c index 6add70500ed8..9e9b05883557 100644 --- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c +++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c @@ -333,6 +333,17 @@ static int sst_media_open(struct snd_pcm_substream *substream, if (ret_val < 0) goto out_power_up; + /* + * Make sure the period to be multiple of 1ms to align the + * design of firmware. Apply same rule to buffer size to make + * sure alsa could always find a value for period size + * regardless the buffer size given by user space. + */ + snd_pcm_hw_constraint_step(substream->runtime, 0, + SNDRV_PCM_HW_PARAM_PERIOD_SIZE, 48); + snd_pcm_hw_constraint_step(substream->runtime, 0, + SNDRV_PCM_HW_PARAM_BUFFER_SIZE, 48); + /* Make sure, that the period size is always even */ snd_pcm_hw_constraint_step(substream->runtime, 0, SNDRV_PCM_HW_PARAM_PERIODS, 2); |