Using the Linux 2.6.18 kernel from the latest DVSDK (V2.00) for the DM644x it is easy to show there is a problem with the audio sub-system. To demonstrate this problem you need to have two scripts running at the same time.
The first script continuously runs the ALSA application speaker-test
while [ 1 ] ; do speaker-test ; done
The second script interrupts speaker-test every 1/4 second
while [ 1 ] ; do killall speaker-test ; usleep 250000 ; done
This test will fail after no more than 3 minutes. We found the follow change to davinci_pcm_trigger() allows the test to run reliably. Clearly this is not the right fix.
Index: linux-2.6.18/sound/soc/davinci/davinci-pcm.c
===================================================================
--- linux-2.6.18.orig/sound/soc/davinci/davinci-pcm.c 2011-01-06 07:43:06.204436738 -0600
+++ linux-2.6.18/sound/soc/davinci/davinci-pcm.c 2011-01-06 07:44:43.244439037 -0600
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/dma-mapping.h>
+#include <linux/delay.h>
#include <sound/driver.h>
#include <sound/core.h>
@@ -174,7 +175,9 @@
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_RESUME:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
+ mdelay(100);
davinci_start_dma(prtd->master_lch);
+ mdelay(100);
break;
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
Can someone please reproduce the error and post the correct fix to this problem, along with an explanation if the code change isn't obvious.
Thanks,
Todd