[E3-hacking] [RFC] [PATCH] ASoC: OMAP: full duplex mode fix

Jarkko Nikula jhnikula at gmail.com
Mon Aug 3 09:29:50 BST 2009


Hi

On Mon, 3 Aug 2009 03:32:04 +0200
Janusz Krzysztofik <jkrzyszt at tis.icnet.pl> wrote:

> 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.
> 
Do you have some specific test case how to trigger this? I haven't
seen this on 2420 or 34xx (e.g. with 'arecord -d 1 -f dat |aplay') but
I have no doubt that this can happen on 1510. At least this doesn't
cause any harm on Beagle so I'm fine with the fix.

> @@ -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;
Minor note: See preferred style for multi-line comments in
Documentation/CodingStyle. I'm not 100 % sure about the braces but I
think they are also preferred if there are indented comment lines with
the single code line.


-- 
Jarkko



More information about the e3-hacking mailing list