[alsa-devel] [PATCH 0/3] ASoC: omap-mcbsp: Constraint handling changes

Peter Ujfalusi peter.ujfalusi at ti.com
Tue Mar 20 12:13:38 CET 2012


This series will add the following changes:
1. We do not need to place buffer size constraint in case of a capture stream.

2. Grazvydas Ignotas <notasas at gmail.com> reported that on Pandora they have
issues with legacy applications (and OSS emulation) when they open the playback
with small period size (smaller than the FIFO size). Since these legacy
applications can not be fixed (and it is not feasible), this series will provide
a solution to overcome with the underruns at the stream start.

With the introduction of the new sysfs file (period_protection) the user can
request the driver to place the constraint to the period size instead of the
buffer size.
With the period_protection one can specify the number of samples they want to
have as protection in period size constraint over the McBSP FIFO size.

As an example:
OMAP3, McBSP2, stereo stream.
the FIFO is 640 samples long.
period_protection = 1 will ensure that the period size is minimum of 641 samples

With the test code from Grazvydas Ignotas:

I don't see underrun issues with period_protection = 1 on BeagleBoard.

Peter Ujfalusi (3):
  ASoC: omap-mcbsp: buffer size constraint only applies to playback
  ASoC: omap-mcbsp: Restructure omap_mcbsp_dai_startup code
  ASoC: omap-mcbsp: Add period size protection mode

 sound/soc/omap/mcbsp.c      |    2 +
 sound/soc/omap/mcbsp.h      |    1 +
 sound/soc/omap/omap-mcbsp.c |   71 ++++++++++++++++++++++++++++++++++--------
 3 files changed, 60 insertions(+), 14 deletions(-)


More information about the Alsa-devel mailing list