All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@ti.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] ASoC: dapm - Add API calls to query valid DAPM paths.
Date: Thu, 7 Jul 2011 09:38:43 -0700	[thread overview]
Message-ID: <20110707163842.GF16325@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <4E15DC67.70803@ti.com>

On Thu, Jul 07, 2011 at 05:18:47PM +0100, Liam Girdwood wrote:

[Please fix your mailer to word wrap within paragraphs, I've reflowed
all your text.]

> The reason for using a separate walk here was because this code is
> taken from my old auto-router and it was to avoid the extra logic
> introduced by the auto-router. The auto-router did need to check for
> loops and always select the shortest path when > 1 path was viable
> (interesting as WM9713 has both loops and multiple paths). Let me see
> how cleanly I can merge it into the current walk.

Alternatively could we replace the current walk?  It's O(n^2) or so in
the number of widgets so it's not the greatest treasure ever.  So long
as we only have one walk and it works I'm happy.

> > It does also occur to me that perhaps what we want to do here is allow
> > widgets to find out about paths when they're being activated anyway?

> For dynamic PCM, we need to also work out which DAIs are active based
> on the graph. Hence for playback we can supply the DAC/AIF and find
> out all the connected output AIF/Speakers/Pins/etc. This is required
> at the start of open() in order that we can call the other PCM ops for
> each DAI, codec and platform.

Right, that's not really what I'm saying though - I'm saying that
widgets in general could be interested in this information.  For
example, some charge pumps can save additional power with some input
signal paths (which is currently handled but this would make that code
more general).

> >> + * snd_soc_dapm_get_connected_widgets_type - query audio path and it's widgets.
> >> + * @dapm: the dapm context.
> >> + * @stream_name: stream name.
> >> + * @list: list of active widgets for this stream.
> >> + * @stream: stream direction.
> >> + * @type: Initial widget type.
> >> + *
> >> + * Queries DAPM graph as to whether an valid audio stream path exists for
> >> + * the DAPM stream and initial widget type specified. This takes into account
> >> + * current mixer and mux kcontrol settings. Creates list of valid widgets.
> > 
> > Why would someone want to query by type?  That seems surprising.  Name
> > and/or direction yes but type seems hard to find a use for.

> We query by type so that we can qualify the root widget for a shared
> common stream name. i.e. Dynamic DSP needs to find the AIF rather than
> a DAC for stream X.

It does?  Hrm.  Perhaps it would make life simpler if we just mandated
the use of explicit AIF widgets?

  reply	other threads:[~2011-07-07 16:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-06 19:49 [PATCH] ASoC: dapm - Add API calls to query valid DAPM paths Liam Girdwood
2011-07-07  3:32 ` Mark Brown
2011-07-07 16:18   ` Liam Girdwood
2011-07-07 16:38     ` Mark Brown [this message]
2011-07-07 18:20       ` Liam Girdwood
  -- strict thread matches above, loose matches on Subject: below --
2011-07-07 19:50 Mark Brown
2011-07-07 20:01 ` Liam Girdwood

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=20110707163842.GF16325@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.