[alsa-devel] [PATCH 0/10] ASoC: rsnd: add SRC support

Jean-Francois Moine moinejf at free.fr
Tue Jan 7 10:21:40 CET 2014


On Mon, 06 Jan 2014 16:21:01 -0800 (PST)
Kuninori Morimoto <kuninori.morimoto.gx at gmail.com> wrote:

> > > Thank you for your help.
> > > I see, I will start moving it, but I need sample code for it.
> > > Who is using DPCM ?
> > 
> > Nobody in tree unfortunately.  The TI OMAP and Qualcomm production
> > kernels use it as do some of the newer Intel Haswell chips but all of
> > that is out of tree.  There's also the work Russell has been doing for
> > Kirkwood but I don't think he posted the finished version to the list
> > yet (he's waiting for some fixes from Liam which will hopefully come
> > soon).
> 
> Hmm... OK I understood.
> Do you think it is possible to get these out-of-tree codes
> from somewhere/somehow ?
> I can work for DPCM support for our driver,
> but it is very difficult for me without sample code...
> 
> If I could get sample code, and I finished my current task,
> I will start DPCM support. is it OK ?

Kuninori,

Last month I tried to use DPCM in the Cubox (kirkwood audio + nxp
tda998x HDMI transmitter and S/PDIF), and, as your simple-card was not
easy to extend, I proposed an other way to describe a DPCM audio system
in DT:

http://mailman.alsa-project.org/pipermail/alsa-devel/2013-December/070594.html

and also:

http://mailman.alsa-project.org/pipermail/alsa-devel/2014-January/070634.html

In fact, DPCM just needs many DAI links, and a flag 'front-end' /
'back-end':

http://mailman.alsa-project.org/pipermail/alsa-devel/2014-January/070623.html

Actually, I added many DAI links to your simple-card and I am waiting
for Xiubo's patches to be applied before proposing mine.

This will make the Cubox audio system work by selecting the I2S or
S/PDIF PCM, but it will not be DPCM. The reason is that, with the
actual DPCM, the sample rates and formats are the ones of the
front-end, and not the subset of the ones of the DAIs in the sound
route. I explained this problem in:

http://mailman.alsa-project.org/pipermail/alsa-devel/2013-December/070585.html

and it appears that some development is needed in the sound core to
handle this Cubox case.

Coming back to a DPCM example, apart from adding the 'front-end' and
'back-end' flags in the DAI links, the changes were:

- add the global system playback DAI in the audio controller.

  This DAI is the audio entry point (front-end). On audio open, the
  back-end DAIs are searched and started (snd_pcm_open). If there was a
  platform declared in the associated DAI links, the DMA open would be
  called many times, so

- don't set a platform pointer in the back-end DAI links.

That's all.

If you want more information, I may send you the patch I did for DPCM
in the audio controller (kirkwood-i2s.c).

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/


More information about the Alsa-devel mailing list