From: Vinod Koul <vinod.koul@intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
Hardik T Shah <hardik.t.shah@intel.com>,
liam.r.girdwood@linux.intel.com, patches.audio@intel.com,
Jeeja KP <jeeja.kp@intel.com>,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Subject: Re: [PATCH 3/9] ASoC: Intel: Skylake: add DSP platform widget event handlers
Date: Sat, 15 Aug 2015 19:12:08 +0530 [thread overview]
Message-ID: <20150815134208.GD13546@localhost> (raw)
In-Reply-To: <20150814214336.GU10748@sirena.org.uk>
[-- Attachment #1.1: Type: text/plain, Size: 3295 bytes --]
On Fri, Aug 14, 2015 at 10:43:36PM +0100, Mark Brown wrote:
> On Sat, Aug 08, 2015 at 01:06:18AM +0530, Subhransu S. Prusty wrote:
>
> > + /* If its not SKL DSP type dont handle */
> > + if (source->priv == NULL && (!is_skl_dsp_widget_type(w)))
> > + return 0;
>
> Why would this event be assigned to a widget that is not a suitable
> type, and what if it's an unsuitable widget type that happens ton have
> private data? I'm not sure I understand the priv check.
Yes rethinking now I don't see why this would be called for events we don't
register as you pointed. I will recheck this bit and get back.
> You've also got a typo with "don't" and an extra space after the &&.
Oops, will fix. Thanks for pointing.
> > + list_for_each_entry(p, &w->sinks, list_source) {
> > + if (!p->connect)
> > + continue;
>
> Hrm. Do we handle routing changes well?
Yes we do :)
This is the pmu handler for a mixer widget. Here we need to send Bind event
to firmware for the paths which are connected, so if a path is not connected
we don't need to send bind event so we skip that.
>
> > + /* Add connected path to one global list */
> > + path_list->dapm_path = p;
> > + list_add_tail(&path_list->node, &skl->dapm_path_list);
> > + break;
>
> We have our own private path list here which includes the DAPM path...
> can't we outsource some of this to the topology and DAPM code? I'm a
> little fuzzy on what the list is for, it appears to be used mainly for
> deallocation though it's called dapm_path_list (which is a bit worrying).
If you look at the usage of the dapm_path_list, it is used in pmd handler
for this mixer. For a mixer there can be many paths and we need to
disconnect the previously connected path. DAPM will disconnect and send
event, so we wont know which paths were disconnected and thats why we keep a
track if this by using this list. At PMU we keep adding and at PMD we check
the path which was disconnected and send the event for that.
This gives driver very quick lookup of which disconnect to send. I am not
sure if we should be changing framework for this...
> > +static int skl_tplg_mixer_dapm_post_pmu_event(struct snd_soc_dapm_widget *w,
> > + struct skl *skl)
> > +{
>
> This looks a lot like the previous function, there's similar duplication
> in the other event functions.
Actually logic is quite different. The skl_tplg_mixer_dapm_post_pmu_event is
for mixer and is supposed to bind to source pipe and start
The previous one is for PGA and starts sink pipelines it is connected to and
then its own. It doesn't do bind.
Said that I will check and try to see if common code for checking and
starting can be factored out from these into a common helper
>
> > + }
> > + if (src_pipe_started) {
>
> Missing blank line here.
Will fix
>
> > +/*
> > + * In modelling, we assume ther will be one mixer in a pipeline. If a second
> > + * one is required that is created as another pipe entity.
> > + * The mixer is resposible for pipe management and represent a pipeline
> > + * instance
> > + */
>
> You mean to say you assume there will be *exactly* one mixer?
Yes :) and if we need another mixer then that will become another pipeline
Thanks
--
~Vinod
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2015-08-15 13:40 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 19:36 [PATCH 0/9] Add DSP topology management for SKL Subhransu S. Prusty
2015-08-07 19:36 ` [PATCH 1/9] ASoC: Intel: Skylake: Add pipe and modules handlers Subhransu S. Prusty
2015-08-14 21:30 ` Mark Brown
2015-08-15 12:55 ` Vinod Koul
2015-08-15 17:03 ` Mark Brown
2015-08-15 17:19 ` Vinod Koul
2015-08-07 19:36 ` [PATCH 2/9] ASoC: Intel: Skylake: Add module configuration helpers Subhransu S. Prusty
2015-08-07 19:36 ` [PATCH 3/9] ASoC: Intel: Skylake: add DSP platform widget event handlers Subhransu S. Prusty
2015-08-14 21:43 ` Mark Brown
2015-08-15 13:42 ` Vinod Koul [this message]
2015-08-15 14:36 ` Mark Brown
2015-08-15 15:12 ` Vinod Koul
2015-08-15 16:46 ` Mark Brown
2015-08-07 19:36 ` [PATCH 4/9] ASoC: Intel: Skylake: Add FE and BE hw_params handling Subhransu S. Prusty
2015-08-14 21:53 ` Mark Brown
2015-08-15 14:00 ` Vinod Koul
2015-08-15 14:46 ` Mark Brown
2015-08-15 15:13 ` Vinod Koul
2015-08-07 19:36 ` [PATCH 5/9] ASoC: Intel: Skylake: Add topology core init and handlers Subhransu S. Prusty
2015-08-14 22:03 ` Mark Brown
2015-08-15 14:16 ` Vinod Koul
2015-08-15 17:00 ` Mark Brown
2015-08-15 17:21 ` Vinod Koul
2015-08-07 19:36 ` [PATCH 6/9] ASoC: Intel: Skylake: Initialize and load DSP controls Subhransu S. Prusty
2015-08-07 19:36 ` [PATCH 7/9] ASoC: Intel: Skylake: Add DSP support and enable it Subhransu S. Prusty
2015-08-07 19:36 ` [PATCH 8/9] ASoC: Intel: Skylake: Initialize NHLT table Subhransu S. Prusty
2015-08-07 19:36 ` [PATCH 9/9] ASoC: Intel: Skylake: Remove CPU dai that is not used Subhransu S. Prusty
2015-08-14 22:06 ` Mark Brown
2015-08-15 14:19 ` Vinod Koul
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=20150815134208.GD13546@localhost \
--to=vinod.koul@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=hardik.t.shah@intel.com \
--cc=jeeja.kp@intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=patches.audio@intel.com \
--cc=subhransu.s.prusty@intel.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