Hello,
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@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 long.
With the test code from Grazvydas Ignotas: http://notaz.gp2x.de/misc/alsa_period_test.c
I don't see underrun issues with period_protection = 1 on BeagleBoard.
Regards, Peter --- Peter Ujfalusi (3): ASoC: omap-mcbsp: buffer size constraint only applies to playback stream 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(-)