aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@nokia.com>2009-03-27 09:32:01 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-04-02 11:34:17 -0400
commit6984992bf0520a07b931124d33f46b46437f6e1c (patch)
treeba0f7f83df9c5e6c5cb0178426d0a7f772b972da /sound
parent7220b9f4bd4fad41f6f7299fe74c2c38ec85d793 (diff)
ASoC: OMAP: Set minimum buffer size constraint for McBSP2 in OMAP3
McBSP2 in OMAP3 has 1 ksample (1k x 32 bit) internal FIFO. During initial playback startup, this FIFO is keeping the DMA request active until the FIFO is full. So now if ALSA buffer size is smaller, DMA is looping around it while filling up the HW FIFO, generating burst of interrupts as well and SW doesn't have any change to fill enough data. Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/omap/omap-mcbsp.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index d6882be33452..9c09b94f0cf8 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -146,6 +146,17 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream,
146 struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); 146 struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data);
147 int err = 0; 147 int err = 0;
148 148
149 if (cpu_is_omap343x() && mcbsp_data->bus_id == 1) {
150 /*
151 * McBSP2 in OMAP3 has 1024 * 32-bit internal audio buffer.
152 * Set constraint for minimum buffer size to the same than FIFO
153 * size in order to avoid underruns in playback startup because
154 * HW is keeping the DMA request active until FIFO is filled.
155 */
156 snd_pcm_hw_constraint_minmax(substream->runtime,
157 SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 4096, UINT_MAX);
158 }
159
149 if (!cpu_dai->active) 160 if (!cpu_dai->active)
150 err = omap_mcbsp_request(mcbsp_data->bus_id); 161 err = omap_mcbsp_request(mcbsp_data->bus_id);
151 162