From eca6636969dc713ebbff17a71788abe560710f7e Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Fri, 27 Mar 2009 15:32:01 +0200 Subject: [PATCH] --- yaml --- r: 142694 b: refs/heads/master c: 6984992bf0520a07b931124d33f46b46437f6e1c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/omap/omap-mcbsp.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 09a2857f1c59..d54c1fa21d7f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7220b9f4bd4fad41f6f7299fe74c2c38ec85d793 +refs/heads/master: 6984992bf0520a07b931124d33f46b46437f6e1c diff --git a/trunk/sound/soc/omap/omap-mcbsp.c b/trunk/sound/soc/omap/omap-mcbsp.c index d6882be33452..9c09b94f0cf8 100644 --- a/trunk/sound/soc/omap/omap-mcbsp.c +++ b/trunk/sound/soc/omap/omap-mcbsp.c @@ -146,6 +146,17 @@ static int omap_mcbsp_dai_startup(struct snd_pcm_substream *substream, struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data); int err = 0; + if (cpu_is_omap343x() && mcbsp_data->bus_id == 1) { + /* + * McBSP2 in OMAP3 has 1024 * 32-bit internal audio buffer. + * Set constraint for minimum buffer size to the same than FIFO + * size in order to avoid underruns in playback startup because + * HW is keeping the DMA request active until FIFO is filled. + */ + snd_pcm_hw_constraint_minmax(substream->runtime, + SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 4096, UINT_MAX); + } + if (!cpu_dai->active) err = omap_mcbsp_request(mcbsp_data->bus_id);