[alsa-devel] [PATCH V1 09/11] ASoC: DaVinci: i2s, add davinci_i2s_prepare and shutdown

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Sep 27 02:56:36 CEST 2010

On Fri, Sep 24, 2010 at 02:43:30PM -0500, Ambrose, Martin wrote:
> On Fri, Sep 24, 2010 at 14:14:32, Troy Kisky wrote:

> > My thought was that the device (master) which starts the external
> > wires to wiggling should be last.

> Fair enough. I suppose that is the reasoning for the addition of the
> prepare function.  The assumption being that a cpu_dai callback to the
> prepare function will always proceed a call to the codec_dai trigger
> function. In this way the serial port can be configured and enabled.

These are all generic ALSA things, not ASoC specific - ASoC is just
passing them straight through.  The idea is that prepare() allows the
driver to finalise the configuration of the hardware and do any setup
that can't be done in an atomic context prior to the trigger, there's no
consideration for any aspect of the ASoC design in this arrangement.

> > If the codec is master, and starts the clocks before the mcbsp is
> > ready that could also cause a pop or noise.

> I still a newbie when it comes to the ALSA architecture.
> Is the proper signal indicating everything is ready, including valid
> data, a trigger call with cmd=START?

Yes, the trigger callback actually starts data flowing.  This is mostly
down to DMA, it's rare for anything except the CPU to be involved in the
trigger operation.

More information about the Alsa-devel mailing list