[alsa-devel] [PATCH 4/7] Alchemy: DB1200 AC97+I2S audio support.
broonie at opensource.wolfsonmicro.com
Mon Jun 8 13:53:36 CEST 2009
On Mon, Jun 08, 2009 at 01:25:57PM +0200, Manuel Lauss wrote:
> On Mon, Jun 8, 2009 at 12:20 PM, Mark
> Brown<broonie at opensource.wolfsonmicro.com> wrote:
> > Well, like I say if it's going via MIPS I'd really prefer it to go in
> > this merge window. If not then I'd expect that splitting out the
> > architecture parts from the machine driver as I suggested ought to deal
> > with the merge issues.
> I'll split it in two: pure ASoC part and pure board part. Agreed?
Yes, that's fine for me.
> how to pass DAI private data to the ac97 callbacks), and I also don't see how
> to handle for instance 2 I2S machines with a WM8731 attached to each
> (i.e. how do I tell ASoC that wm8731 at bus0/0x1b belongs to machine A
> and wm8731 at bus0/0x1c belongs to machine B?)
When multiple cards are supported the struct device for the CODEC will
be used to distinguish between instances of the same device - this is
why the DAI registration functions are being encouraged to use to
provide a struct device, once the multi-card support is in place it will
become much more important to have this information.
> > If you move the selection of the switch position to the architecture
> > code then it can arrange to register only the device that is in use in
> > the current configuration. If the DMA and DAI drivers both need the
> > same resources they can cooperate with each other - the system will only
> > bring the card on-line once both the DMA and DAI driver are present.
> I think you misuderstood me. Could you point out an in-kernel machine which
> already implements what you suggested?
> The AC97/I2S dai drivers (psc-ac97/psc-i2s) extract the base address of the PSC
> they're supposed to drive from the platform_device passed via the probe()
> callbacks, these in turn are called when a "soc_audio" platform device
> is called.
Sure, that's exactly what I see you doing and what I'm suggesting that
> I need to set either the ac97 or I2S platform data for soc_audio based on the
> switch setting. I can't register a "db1200_audio" platform device in the board
> code which in turn registers the "soc_audio" device and have them share
> the PSC mmio/irq/dma resources.
You should convert the DAI drivers to probe as normal platform devices
and attach the resources used by the CPU to those devices rather than
attaching the data to soc-audio. pxa2xx-ac97 does this, as do the
PowerPC drivers and the s3c64xx-i2s driver. The DaVinci drivers
currently on the davinci branch of my git for merge after the merge
window do this too.
More information about the Alsa-devel