diff options
author | Sumit Bhattacharya <sumitb@nvidia.com> | 2011-11-02 22:37:18 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:43 -0800 |
commit | b65bc666f1521f2e55d2f03c7162ded303b715d6 (patch) | |
tree | 427857b14cfa3885d185aae090771f136fc26112 /sound/soc | |
parent | 9a975335313dcb2c024d0ee243e44f02e09217c5 (diff) |
ASoC: tegra: Constraint period size to be multiple of 8
Constraint period size to be multiple of 8 as Tegra DMA double
continuous mode needs transfer size to be multiple of 8.
Bug 872652
Signed-off-by: Sumit Bhattacharya <sumitb@nvidia.com>
Change-Id: I848373d7d137200589c0ae3cd239cd2d29499d48
Reviewed-on: http://git-master/r/61914
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R49ecf7654c0d2e8d72bf1b6cb71d56cb66d37875
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/tegra/tegra_pcm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c index d0d9f730018f..74844cef1fc1 100644 --- a/sound/soc/tegra/tegra_pcm.c +++ b/sound/soc/tegra/tegra_pcm.c @@ -170,6 +170,12 @@ static int tegra_pcm_open(struct snd_pcm_substream *substream) /* Set HW params now that initialization is complete */ snd_soc_set_runtime_hwparams(substream, &tegra_pcm_hardware); + /* Ensure period size is multiple of 8 */ + ret = snd_pcm_hw_constraint_step(runtime, 0, + SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 0x8); + if (ret < 0) + goto err; + /* Ensure that buffer size is a multiple of period size */ ret = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); |