[alsa-devel] [PATCH 3/4] ASoc: kirkwood: merge kirkwood-i2c and kirkwood-dma

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Jul 26 00:58:16 CEST 2013

On Thu, Jul 25, 2013 at 08:16:04PM +0100, Mark Brown wrote:
> On Thu, Jul 25, 2013 at 11:14:28AM +0200, Jean-Francois Moine wrote:
> > To avoid the declaration of a 'kirkwood-pcm-audio' device in the DT,
> > this patch merges the kirkwood-i2c and kirkwood-dma drivers into one
> > module.
> This seems mostly fine, though it may be best to keep kirkwood-dma as a
> separate module for the benefit of the S/PDIF support when it gets added
> - I had a look at the implementation Russell has and it looks like it
> can be added as a separate interface.

You wouldn't want I2S and SPDIF to be separate modules though - they're
the same hardware but different output stream formatters attached to the
DMA FIFO output.  Don't forget the requirements concerning the simultaneous
use of I2S and SPDIF - these "output formatters" must both be enabled and
disabled in unison when concurrent use is required - both bits must be
set or cleared together with a single register write.

> > -	.platform_name = "kirkwood-pcm-audio",
> > +	.platform_name = "kirkwood-i2s",
> Should the name be done as dev_name() for the interface (I don't know if
> there is ever more than one)?

Getting away from "kirkwood-i2s" would be sensible, because it may not be
just "i2s" in this hardware block.  The documentation calls this an "audio
controller" but I guess "kirkwood-pcm" would be a reasonable compromise,
even though it has a separate AC'97 block which could also be construed
as being "pcm".

The AC'97 block uses a separate peripheral DMA controller and so wouldn't
make use of kirkwood-dma.c either.

More information about the Alsa-devel mailing list