All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glenn Golden <gdg@zplane.com>
To: David Henningsson <david.henningsson@canonical.com>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	Takashi Iwai <tiwai@suse.de>, Alex Hung <alex.hung@canonical.com>,
	Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
	Raymond Yau <superquad.vortex2@gmail.com>,
	bruno.mueller@gmail.com
Subject: Re: [pulseaudio-discuss] ThinkPad T-510 audio output mute LED non-workingness
Date: Sat, 16 May 2015 14:32:57 -0600	[thread overview]
Message-ID: <20150516203257.GA565@huh.zplane.com> (raw)
In-Reply-To: <5550A70D.20407@canonical.com>

David Henningsson <david.henningsson@canonical.com> [2015-05-11 14:56:45 +0200]:
> 
> 
> On 2015-05-07 02:15, Glenn Golden wrote:
> >  8.  ...because [Alsa? Pulseaudio?] maintains two independent mixer mute state
> >      variables -- one for headphone port, one for speaker port -- the semantics
> >      of both the mute key and the mute LED become less straightforward than
> >      with the hardware-based mute in 3.18.
> 
> The mute LED follows the state of ALSA's "Master Playback Switch". When that
> one is off, neither 3.5 mm headphone nor internal speakers have output -
> they're both muted.
> 
> PulseAudio's abstraction layer sets "Master Playback Switch" according to
> its active port's mute state. PulseAudio's active port (here speaker or
> headphone) will, by default, change automatically as headphones are plugged
> in or unplugged.
> 

Thanks, David.  I updated #7 and #8 per your comments above:

 =============================================================================
 7.  If you elect to have the mute key toggle the Master Playback mute via an
     event which invokes pactl/pacmd/amixer/[insert fave mixer control tool]
     then the mute LED will automatically follow the Master Playback mute state
     as mentioned above, thus no explicit action is required to make the LED
     work.  But! ...

 8.  ...if you also use PulseAudio, then the situation becomes a little more
     complicated, because PA maintains two independent mixer mute state
     variables, one for the headphone port, one for the speaker port, and the
     following caveats apply:

       * The mute key (via your userspace mixer control event handler) will
         toggle only the port (HPH or SPKR) that happens to be active at that
         time, and will have no effect on the mute state of the other port.

       * PulseAudio forces the Master Playback mute state to follow the mute
         state of its curently active port, hence...

       * ...the mute LED will likewise follow the mute state of PA's active
         port via kernel auto-synch (as described in (5) above).

     Taken together, these imply that when PulseAudio is in the picture, no
     unequivocal semantic can be attached to "mute LED on", as it was with
     hardware-based mute in 3.18: All you can say is that if the LED is on,
     then PulseAudio's active port is muted via the mixer; the LED gives no
     information about the inactive port's mute state.  One possibly surprising
     consequence of this is that if the ALSA 'auto-mute' feature is enabled,
     then the mute LED may (or may not) change state simply by the action of
     plugging or unplugging the headphones, since doing so automatically
     switches the active port.
 =============================================================================

      reply	other threads:[~2015-05-16 20:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150418131002.GV562@huh.zplane.com>
     [not found] ` <CAN8cciZOgTzrTdp2m8Y+vPDrGVdO6y+WpXNfSF+pyuz9GswyqA@mail.gmail.com>
     [not found]   ` <20150419133733.GA551@huh.zplane.com>
     [not found]     ` <CAN8cciYqdJ-m+M0+F09115nocy7szAfgdAf834c2bS4=gL7DAA@mail.gmail.com>
     [not found]       ` <20150425013937.GB550@huh.zplane.com>
     [not found]         ` <1429974719.3937109.258484493.7D74FAC6@webmail.messagingengine.com>
     [not found]           ` <20150426152012.GE550@huh.zplane.com>
     [not found]             ` <s5hvbgiho2o.wl-tiwai@suse.de>
     [not found]               ` <CAN8cciZQBRz2Ty3YRt2+3KO9v1BWef-_8FU_d_SsE87mLdgY-w@mail.gmail.com>
     [not found]                 ` <s5hh9s2gj45.wl-tiwai@suse.de>
     [not found]                   ` <20150427135859.GI550@huh.zplane.com>
2015-04-27 17:12                     ` [pulseaudio-discuss] ThinkPad T-510 audio output mute LED non-workingness Takashi Iwai
2015-04-27 17:52                       ` Glenn Golden
2015-04-27 18:49                         ` Takashi Iwai
2015-04-28  0:22                           ` Glenn Golden
2015-04-28  0:02                       ` Glenn Golden
2015-04-28  6:06                         ` Takashi Iwai
2015-04-28 10:16                           ` Glenn Golden
2015-04-28 10:30                             ` Takashi Iwai
2015-04-28 11:39                               ` Glenn Golden
2015-04-28 11:50                                 ` Takashi Iwai
2015-04-28 17:53                                   ` Glenn Golden
2015-04-28 19:21                                     ` Takashi Iwai
2015-04-29 12:46                                       ` Glenn Golden
2015-04-29 13:09                                         ` Henrique de Moraes Holschuh
2015-04-29 17:41                                           ` Glenn Golden
2015-05-01 14:22                         ` Raymond Yau
2015-05-02 16:00                           ` Glenn Golden
2015-05-04 10:37                             ` Henrique de Moraes Holschuh
2015-05-04 12:26                               ` Glenn Golden
2015-05-04 13:16                                 ` Henrique de Moraes Holschuh
2015-05-07  0:15                                   ` Glenn Golden
2015-05-07  1:03                                     ` Raymond Yau
2015-05-07  1:47                                       ` Glenn Golden
2015-05-11 12:56                                     ` David Henningsson
2015-05-16 20:32                                       ` Glenn Golden [this message]

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=20150516203257.GA565@huh.zplane.com \
    --to=gdg@zplane.com \
    --cc=alex.hung@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bruno.mueller@gmail.com \
    --cc=david.henningsson@canonical.com \
    --cc=hmh@hmh.eng.br \
    --cc=superquad.vortex2@gmail.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 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.