From 5d9aed5391a96d2f94632e64bcfaaa0411f1fd81 Mon Sep 17 00:00:00 2001 From: Ricardo Neri Date: Fri, 6 Apr 2012 12:50:36 +0800 Subject: 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 --- sound/soc/omap/omap-hdmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sound') 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; -- cgit v1.2.3