diff options
author | Ricardo Neri <ricardo.neri@ti.com> | 2012-04-06 12:50:36 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2012-04-11 12:58:28 +0800 |
commit | 5d9aed5391a96d2f94632e64bcfaaa0411f1fd81 (patch) | |
tree | d1e47b59ede2ec606c0a4e45e90fca2d1c509ea2 /sound | |
parent | f91ea763a88507f74d97086d1043d39726632869 (diff) |
ASoC: OMAP: HDMI: Reduce the period byte step constraint
Sometimes, users cannot converge to a suitable buffer size when
determining the hw_params. This patch reduces the step size
of the period bytes constraint so that users may find a suitable
buffer and period size.
Also, to keep the alignment between periods and DMA transfers,
reduce the DMA packet size by the same amount.
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/omap/omap-hdmi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/omap/omap-hdmi.c b/sound/soc/omap/omap-hdmi.c index 17be5b23e3e1..8ece7d2c571d 100644 --- a/sound/soc/omap/omap-hdmi.c +++ b/sound/soc/omap/omap-hdmi.c @@ -51,10 +51,10 @@ static int omap_hdmi_dai_startup(struct snd_pcm_substream *substream, int err; /* * Make sure that the period bytes are multiple of the DMA packet size. - * Largest packet size we use is 32 32-bit words = 128 bytes + * Largest packet size we use is 8 32-bit words = 32 bytes */ err = snd_pcm_hw_constraint_step(substream->runtime, 0, - SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 128); + SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 32); if (err < 0) return err; @@ -69,10 +69,10 @@ static int omap_hdmi_dai_hw_params(struct snd_pcm_substream *substream, switch (params_format(params)) { case SNDRV_PCM_FORMAT_S16_LE: - omap_hdmi_dai_dma_params.packet_size = 16; + omap_hdmi_dai_dma_params.packet_size = 4; break; case SNDRV_PCM_FORMAT_S24_LE: - omap_hdmi_dai_dma_params.packet_size = 32; + omap_hdmi_dai_dma_params.packet_size = 8; break; default: err = -EINVAL; |