From: Liam Girdwood <lrg@ti.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [RFC/PATCH] ALSA: PCM - Add PCM creation API for ASoC dynamic PCMs.
Date: Wed, 08 Feb 2012 15:58:09 +0000 [thread overview]
Message-ID: <1328716689.3955.22.camel@odin> (raw)
In-Reply-To: <s5h7gzxlay7.wl%tiwai@suse.de>
On Wed, 2012-02-08 at 14:19 +0100, Takashi Iwai wrote:
> At Wed, 8 Feb 2012 11:55:37 +0000,
> Liam Girdwood wrote:
> >
> > The new ASoC dynamic PCM core needs to create PCMs and substreams that are
> > for use by internal ASoC drivers only and not visible to userspace for
> > direct IO. These new PCMs are similar to regular PCMs expect they have no
> > device nodes or procfs entries. The ASoC component drivers use them in exactly
> > the same way as regular PCMs for PCM and DAI operations.
> >
> > The intention is that a dynamic PCM based driver will register both regular
> > PCMs and dynamic PCMs. The regular PCMs will be used for all IO with userspace
> > however the dynamic PCMs will be used by the driver to route digital audio
> > through numerous back end DAI links (with potentially a DSP providing different
> > hw_params, DAI formats based on the regular front end PCM params) to devices
> > like CODECs, MODEMs, Bluetooth, FM, DMICs, etc
> >
> > This patch adds a new snd_pcm_new_dynamic() API call to create the dynamic PCM
> > without device nodes or procfs. It also adds snd_pcm_new_stream_dynamic() and
> > snd_pcm_dev_register_dynamic() which are used to create the dynamic PCM.
>
> I don't think you need to copy all functions just for stripping some
> features. Instead, add a new flag in snd_pcm indicating that it's
> only for internal-use (or non-exposure, whatever), and set it in
> snd_pcm_new(). Maybe make a static __snd_pcm_new() with an extra bool
> flag and let snd_pcm_new() and snd_pcm_new_dynamic() call the function
> with the appropriate flag value.
>
> In snd_pcm_new_stream(), just skip unnecessary init parts when the pcm
> flag is set. Ditto for snd_pcm_dev_register().
>
Ah, I did originally have something like this but didn't want to add a
flag. Back to plan A.
Liam
prev parent reply other threads:[~2012-02-08 15:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 11:55 [RFC/PATCH] ALSA: PCM - Add PCM creation API for ASoC dynamic PCMs Liam Girdwood
2012-02-08 13:19 ` Takashi Iwai
2012-02-08 15:58 ` Liam Girdwood [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=1328716689.3955.22.camel@odin \
--to=lrg@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).