From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH 7/7] ASoC: Instantiate all DAPM widgets at once
Date: Thu, 28 Apr 2011 22:25:05 +0200 [thread overview]
Message-ID: <4DB9CD21.4040707@metafoo.de> (raw)
In-Reply-To: <20110428200737.GE16837@opensource.wolfsonmicro.com>
On 04/28/2011 10:07 PM, Mark Brown wrote:
> On Thu, Apr 28, 2011 at 06:46:13PM +0200, Lars-Peter Clausen wrote:
>> Currently after each codec or auxdev has been probed its DAPM widgets are
>> instantiated.
>>
>> Since widgets are kept in a per card list and routes can interconnect between
>> widgets from different DAPM contexts on the same card it is possible that
>> snd_soc_dapm_new_widgets is run on an incomplete DAPM configuration which might
>> cause unnecessary register writes and/or cause audible problems.
>>
>> This patch addresses the issue by instantiating all widgets from all DAPM contexts
>> after all components of the card have been initialized.
>
> Except it doesn't because...
Well, a driver can of course decide that it wants to instantiate the widgets
now, but...
>
>> +static inline int snd_soc_dapm_new_widgets(struct snd_soc_dapm_context *dapm)
>> +{
>> + return snd_soc_dapm_card_new_widgets(dapm->card);
>> +}
>
> ...we can still instantiate widgets at any time, and lots of code will
> do just that (and needs to do that because it needs the widgets to be
> present in order to allow paths to be added).
... there are exactly 5 codec drivers which call snd_soc_dapm_new_widgets, all
of them call this at the end of their codec probe callback, which means it can
be dropped, because the core will call it again just right after the codecs
probe callback (without this patch).
snd_soc_dapm_new_widgets was mainly left in to let drivers register widgets
after the initialization phase which could be required for dynamic
reconfiguration of some DSPs.
Routes can be added just fine without the widgets being instantiated. In fact
snd_soc_dapm_new_widgets requires the routes to be setup to initialize some
widgets(mixers,muxs) properly.
>
> There's also the fact that this mixes in the functional change to move
> the instantiation of the widgets around with the argument change and a
> rename, it'd be better to split the two of those out so we can clearly
> see the functional change.
ok.
next prev parent reply other threads:[~2011-04-28 20:25 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-28 16:46 [PATCH 1/7] ASoC: Fix cards getting stuck in a powered state Lars-Peter Clausen
2011-04-28 16:46 ` [PATCH 2/7] ASoC: DAPM: Pass snd_dapm_soc_update as parameter Lars-Peter Clausen
2011-04-28 19:40 ` Mark Brown
2011-04-28 20:39 ` Lars-Peter Clausen
2011-04-28 20:58 ` Mark Brown
2011-04-28 21:24 ` Lars-Peter Clausen
2011-04-28 21:48 ` Mark Brown
2011-04-28 22:04 ` Lars-Peter Clausen
2011-04-28 22:18 ` Mark Brown
2011-04-28 22:23 ` Mark Brown
2011-04-28 22:34 ` Lars-Peter Clausen
2011-04-28 22:48 ` Mark Brown
2011-04-28 22:58 ` Lars-Peter Clausen
2011-04-28 22:59 ` Mark Brown
2011-04-28 16:46 ` [PATCH 3/7] ASoC: Drop unused parameter from dapm_seq_run Lars-Peter Clausen
2011-04-28 16:46 ` [PATCH 4/7] ASoC: Pass snd_soc_card instead of snd_soc_dapm_context were appropriate Lars-Peter Clausen
2011-04-28 19:47 ` Mark Brown
2011-04-28 20:13 ` Mark Brown
2011-04-28 16:46 ` [PATCH 5/7] ASoC: Move DAPM debugfs directory creation to snd_soc_dapm_debugfs_init Lars-Peter Clausen
2011-04-28 16:46 ` [PATCH 6/7] ASoC: Move DAPM widget debugfs entry creation to snd_soc_dapm_new_widgets Lars-Peter Clausen
2011-04-28 16:46 ` [PATCH 7/7] ASoC: Instantiate all DAPM widgets at once Lars-Peter Clausen
2011-04-28 20:07 ` Mark Brown
2011-04-28 20:25 ` Lars-Peter Clausen [this message]
2011-04-28 21:18 ` Mark Brown
2011-04-28 19:15 ` [PATCH 1/7] ASoC: Fix cards getting stuck in a powered state Mark Brown
2011-04-28 19:47 ` Lars-Peter Clausen
2011-04-28 19:52 ` Mark Brown
2011-04-28 23:14 ` Lars-Peter Clausen
2011-04-28 23:17 ` Mark Brown
2011-04-28 23:40 ` Lars-Peter Clausen
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=4DB9CD21.4040707@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
/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.