Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Juergen Beisert <jbe@pengutronix.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: SoC sound support for imx27
Date: Thu, 8 May 2008 10:33:39 +0100	[thread overview]
Message-ID: <20080508093339.GA17836@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <200805080954.28299.jbe@pengutronix.de>

On Thu, May 08, 2008 at 09:54:28AM +0200, Juergen Beisert wrote:

> It seems the documentation in the "asoc-v2-dev" 
> (Documentation/sound/alsa/soc/) is still v1, isn't it?

Yes.

> I'm confused how to link the pcm-layer and the transmission layer together. 
> pxa2xx-i2s.c registers a codec-dai (line 346), while the imx-ssi.c registers 
> (line 864) a platform-dai (internally called a cpu_dai. BTW: why a different 
> name?). I _believe_ the CPU DAI tries to connect the CPU-pcm to the 
> transmission interface like ssi or i2s on the same chip. But both 
> implementations are using the same layering (pcm-dma and ssi/i2s), but 
> registering different DAIs. 

The i.MX code is correct here.  

The PXA I2S code isn't a good example to use - it doesn't compile at the
minute due to changes in the underlying PXA platform code - and has only
been translated mechanically for ASoC v2.  If you're looking for
examples then the most heavily tested in-tree configurations for ASoC v2
are:

 - i.MX31 I2S with WM8350
 - PXA3xx AC97 with WM9713

> Now I have an ssi driver for my CPU (to be more precise: Two instances of it, 
> when I registering two ssi devices in my BSP file). But how to tell the CPU 
> pcm-layer which one it should use (and for what purpose, play, capture)? And 
> only the ssi driver itself knows how to interact with the DMA controller. But 
> this information is needed in the CPU pcm-layer as it setup the DMA.

The CPU DAI has a dma_data member intended for this purpose - it can set
up information the DMA driver will need in there for the DMA driver to
pick up when it needs it.  The PXA code sets this up in hw_params since
the DMA configuration depends on if the stream is mono or stereo but
there's no need to set it up that late if you don't have a similar
requirement.

> Does a list exists, where I can store driver's private data in each layer 
> (mapped iomem addresses for example)? And how to access it, when I only get 
> a "struct snd_pcm_substream" as a parameter?

Yes.  ASoC sets the private_data of snd_pcm_substream to point to the
struct snd_soc_pcm_runtime for the substream.  That in turn contains
pointers to the platform, codec and CPU DAIs.  Each of those has a
private_data member which you can use.

  reply	other threads:[~2008-05-08  9:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-23 14:54 SoC sound support for imx27 Juergen Beisert
2008-04-23 15:36 ` Liam Girdwood
2008-04-24 11:19   ` Juergen Beisert
2008-04-24 14:26     ` Liam Girdwood
2008-04-24 14:31       ` Timur Tabi
2008-04-24 14:11   ` Juergen Beisert
2008-04-24 14:30     ` Liam Girdwood
2008-05-05 10:56       ` Juergen Beisert
2008-05-05 12:42         ` Mark Brown
2008-05-05 12:55           ` Juergen Beisert
2008-05-05 13:12             ` Mark Brown
2008-05-08  7:54           ` Juergen Beisert
2008-05-08  9:33             ` Mark Brown [this message]
2008-05-08 10:27               ` How are events of headphone plug/unplug handled in ASOC Srinivas.Kandagatla
2008-05-08 10:31                 ` Mark Brown
2008-05-08 11:25             ` SoC sound support for imx27 Liam Girdwood
2008-04-23 15:44 ` Timur Tabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080508093339.GA17836@rakim.wolfsonmicro.main \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=jbe@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox