This patch tries to correct the problem of full duplex mode not working
over a single McBSP based CPU DAI.

Created against linux-2.6.31-rc5.
Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <[email protected]>
---
--- linux-2.6.31-rc5/sound/soc/omap/omap-mcbsp.c.orig   2009-08-01 
02:40:45.000000000 +0200
+++ linux-2.6.31-rc5/sound/soc/omap/omap-mcbsp.c        2009-08-03 
03:28:07.000000000 +0200
@@ -183,6 +183,7 @@ static int omap_mcbsp_dai_trigger(struct
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
        struct omap_mcbsp_data *mcbsp_data = to_mcbsp(cpu_dai->private_data);
+       u16 buf;
        int err = 0;
 
        switch (cmd) {
@@ -191,6 +192,14 @@ static int omap_mcbsp_dai_trigger(struct
        case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
                if (!mcbsp_data->active++)
                        omap_mcbsp_start(mcbsp_data->bus_id);
+               else if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+                       /* looks like capture already in progress,
+                        * start playback by taking it out of error condition */
+                       omap_mcbsp_pollwrite(mcbsp_data->bus_id, 0x0);
+               else
+                       /* looks like playback already in progress,
+                        * start capture by taking it out of error condition */
+                       omap_mcbsp_pollread(mcbsp_data->bus_id, &buf);
                break;
 
        case SNDRV_PCM_TRIGGER_STOP:

_______________________________________________
e3-hacking mailing list
[email protected]
http://www.earth.li/cgi-bin/mailman/listinfo/e3-hacking

Reply via email to