From: Liam Girdwood <lrg@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH v3] ASoC: dapm - Add API call to query the widgets of valid DAPM paths.
Date: Tue, 26 Jul 2011 12:16:36 +0100 [thread overview]
Message-ID: <1311678996.4088.4.camel@CNA0741383> (raw)
In-Reply-To: <20110725211620.GC6086@opensource.wolfsonmicro.com>
On Mon, 2011-07-25 at 23:16 +0200, Mark Brown wrote:
> On Mon, Jul 25, 2011 at 11:15:26AM +0100, Liam Girdwood wrote:
>
> > +int snd_soc_dapm_get_connected_widgets(struct snd_soc_dapm_context *dapm,
> > + const char *stream_name, struct snd_soc_dapm_widget_list **list,
> > + int stream)
>
> > + /* get stream root widget AIF from stream string and direction */
> > + list_for_each_entry(w, &dapm->card->widgets, list) {
> > +
> > + if (w->id != type)
> > + continue;
> > +
> > + if (!strcmp(w->sname, stream_name))
> > + goto found;
> > + }
>
> Hrm, so I must be missing something here but this still has the issue
> with only finding the first widget if we've got more than one widget for
> a stream. For example, the tlv320aic3x driver defines:
>
> SND_SOC_DAPM_DAC("Left DAC", "Left Playback", DAC_PWR, 7, 0),
> SND_SOC_DAPM_DAC("Right DAC", "Right Playback", DAC_PWR, 6, 0),
>
> and hooks them both up to a single "Playback" stream (most devices don't
> even have the distinct names at the widget level).
This will only match on the exact name here. So we can retrieve both
left and right stream widgets by making two separate calls. We should
also not have two AIF widgets with the same stream name within a DAPM
context.
> This makes sense as
> DAPM really does want mono streams to work with but if we only look at
> the first match we'll fail to enumerate some of the widgets connected to
> the stream.
This will only happen if we have AIF widgets with exactly the same
stream names in a dapm context so there should only ever be 1 match.
Liam
next prev parent reply other threads:[~2011-07-26 11:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-25 10:15 [PATCH v3] ASoC: dapm - Add API call to query the widgets of valid DAPM paths Liam Girdwood
2011-07-25 21:16 ` Mark Brown
2011-07-26 11:16 ` Liam Girdwood [this message]
2011-07-26 11:41 ` Mark Brown
2011-07-26 14:26 ` Liam Girdwood
2011-07-26 14:37 ` Mark Brown
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=1311678996.4088.4.camel@CNA0741383 \
--to=lrg@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.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.