Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Nicolin Chen <Guangyu.Chen@freescale.com>
Cc: alsa-devel@alsa-project.org, liam.r.girdwood@intel.com
Subject: Re: [RFC] A question regarding open ioctl for user space in ASoC driver.
Date: Tue, 20 May 2014 12:30:22 +0100	[thread overview]
Message-ID: <20140520113022.GM12304@sirena.org.uk> (raw)
In-Reply-To: <20140520044323.GA10471@MrMyself>


[-- Attachment #1.1: Type: text/plain, Size: 2595 bytes --]

On Tue, May 20, 2014 at 12:43:24PM +0800, Nicolin Chen wrote:
> On Tue, May 20, 2014 at 01:18:34AM +0100, Mark Brown wrote:
> > On Fri, May 16, 2014 at 06:59:41PM +0800, Nicolin Chen wrote:

> > This is moderately common in mainline already.  You shouldn't need to
> > have any custom code - we should just be able to figure out that the SRC
> > is needed (and a quick glance at your out of tree code shows now ioctl()
> > so that's fine as you say).

> I was thinking about just leaving P2P as an initial version and reserving
> some essential interfaces for M2M function so that I can add it up later
> in our internal branch or we can figure out a better approach in community
> style. And now, it looks like a good idea for me to try this way so as to
> move on quickly.

Yes, that's going to make progress faster and it's probably going to be
the most commonly used bit anyway.

> > > 2) M2M, memory to memory, can simply make ASRC as a sample rate converter
> > >    without playback via any BE sound card, just like using any software
> > >    to convert a WAV file in one sample rate to another WAV in a required
> > >    sample rate. The driver has its self-designed application to compelte
> > >    this function by sending the audio data from a wave file into a misc
> > >    device via non-generic ioctl:

> > I would expect this to be handled by just routing the audio between the
> > two front ends using DAPM/DPCM rather than by having a new kernel API.a

> Two front ends: one for ASRC and the other is...? And how does it transfer
> audio data with user space?

The front ends are the PCMs userspace actually sees and not usually tied
to anything except by routing constraints in the firmware/hardware - I'd
expect to see one available for each side of the ASRC, I guess at least
one of these is just a normal audio streaming FE used to route to the
back ends.

> > If nothing else representing the ASRC block as a CODEC would do the
> > trick though that doesn't entirely play well with DPCM, it is kind of
> > doing the right thing though in that the ASRC block terminates two
> > digital paths.  I'm not loving the elegence there though.

> Sorry I can't understand this CODEC approach either...

> Yes, ASRC has two digital ends but each of them is just a FIFO register
> , input FIFO and output FIFO, waiting for DMA to handle the Tx/Rx job,
> not like a normal CODEC that has DAI outwards.

Right, the DAIs in this case are just connected back to back inside the
device like if you looped line input and line output together in a
normal CODEC but without the DAC and ADC.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



      reply	other threads:[~2014-05-20 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-16 10:59 [RFC] A question regarding open ioctl for user space in ASoC driver Nicolin Chen
2014-05-20  0:18 ` Mark Brown
2014-05-20  4:43   ` Nicolin Chen
2014-05-20 11:30     ` Mark Brown [this message]

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=20140520113022.GM12304@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Guangyu.Chen@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=liam.r.girdwood@intel.com \
    /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