alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>
Cc: Oder Chiou <oder_chiou@realtek.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"swarren@nvidia.com" <swarren@nvidia.com>,
	"swarren@wwwdotorg.org" <swarren@wwwdotorg.org>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	Bard Liao <bardliao@realtek.com>, Flove <flove@realtek.com>
Subject: Re: [PATCH] ASoC: rt5640: change widgetsequencefordepop
Date: Wed, 07 Aug 2013 12:47:16 +0200	[thread overview]
Message-ID: <520225B4.5050208@metafoo.de> (raw)
In-Reply-To: <20130807093629.GU6427@sirena.org.uk>

On 08/07/2013 11:36 AM, Mark Brown wrote:
> On Wed, Aug 07, 2013 at 10:26:35AM +0200, Lars-Peter Clausen wrote:
>
>> That isn't really supported right now. If muting and unmuting the control is
>> such a complex sequence maybe it is better to stay with you previous
>> solution, without autodisable.
>
> Adding an event callback shouldn't be hard?
>

But tricky. The widget of course can have a event callback, but since the 
widget is created by the DAPM layer and not the codec driver there is currently 
no way to setup the callback. And then there is of course the question when do 
you want to run the callback, only if DAPM unmutes the control, if the user 
unmutes the control or both.

One thing that could work is to setup SND_SOC_DAPM_{PRE,POST}_REG events for 
the SWITCH widget. This callback gets called whenever user changes the control 
(and it is not disabled by DAPM). The next step then would be to set up an 
internal event callback for kcontrol widgets which then again calls the event 
callbacks for the kcontrol's widgets like we do in dapm_widget_update(). But 
I'm not convinced that this is the best way to solve this. I think it makes 
things more complicated than they need to be. I think having a OUTDRV widget 
along the path that runs the mute and unmute sequence might be a better option. 
And then have virtual switch control to let userspace disconnect the path, so 
that it is still possbile to manually mute it.

- Lars

  reply	other threads:[~2013-08-07 10:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05  4:19 [PATCH] ASoC: rt5640: change widget sequence for depop bardliao
2013-08-05 14:48 ` Mark Brown
2013-08-05 17:21   ` Lars-Peter Clausen
2013-08-05 17:58     ` Mark Brown
2013-08-06  8:07     ` [PATCH] ASoC: rt5640: change widget sequencefordepop Bard Liao
2013-08-06  8:45       ` Lars-Peter Clausen
2013-08-06  9:13         ` [PATCH] ASoC: rt5640: change widgetsequencefordepop Bard Liao
2013-08-06  9:35           ` Lars-Peter Clausen
2013-08-06 10:07             ` Bard Liao
2013-08-06 10:16               ` Lars-Peter Clausen
2013-08-06 11:04                 ` Bard Liao
2013-08-06 11:31                   ` Lars-Peter Clausen
2013-08-07  1:32                     ` Bard Liao
2013-08-07  5:40                     ` Bard Liao
2013-08-07  7:45                       ` Lars-Peter Clausen
2013-08-07  8:03                         ` Bard Liao
2013-08-07  8:26                           ` Lars-Peter Clausen
2013-08-07  8:31                             ` Bard Liao
2013-08-07  9:36                             ` Mark Brown
2013-08-07 10:47                               ` Lars-Peter Clausen [this message]
2013-08-07 13:05                                 ` Mark Brown
2013-08-09  9:05                                 ` Bard Liao
2013-08-09 13:37                                   ` Lars-Peter Clausen
2013-08-09 14:58                                     ` Mark Brown
2013-08-12  7:27                                       ` Bard Liao
2013-08-05 17:17 ` [PATCH] ASoC: rt5640: change widget sequence for depop Stephen Warren
2013-08-05 17:19 ` 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=520225B4.5050208@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=flove@realtek.com \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    /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).