X86 platform drivers
 help / color / mirror / Atom feed
From: Matthew Garrett <matthew.garrett@nebula.com>
To: David Henningsson <david.henningsson@canonical.com>
Cc: Alex Hung <alex.hung@canonical.com>,
	Tim Chen <tim.chen119@canonical.com>,
	"ibm-acpi@hmh.eng.br" <ibm-acpi@hmh.eng.br>,
	"ibm-acpi-devel@lists.sourceforge.net"
	<ibm-acpi-devel@lists.sourceforge.net>,
	"platform-driver-x86@vger.kernel.org"
	<platform-driver-x86@vger.kernel.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	YK <yk@canonical.com>
Subject: Re: [PATCH 0/2] add sysfs for acpi interfaces of thinkpad hardware mute
Date: Wed, 14 Aug 2013 07:51:31 +0000	[thread overview]
Message-ID: <1376466691.30031.14.camel@x230> (raw)
In-Reply-To: <520B3511.7020604@canonical.com>

On Wed, 2013-08-14 at 09:43 +0200, David Henningsson wrote:

> First, the hardware mute. Because this is directly connected to the
> internal speaker (and headphones?), it needs to turn into a ALSA
> kcontrol on the sound card that controls speaker and/or headphones. And
> it needs to named accordingly, e g "Speaker Playback Switch" if it
> controls the speaker only.
> Exactly how this is going to work out given the arbitrary module load
> order of snd-hda-intel and thinkpad-acpi, I'm not sure, but the way of
> creating another sound card (which I've seen on some thinkpads) just
> isn't working out for userspace.

Sure. There was arguably a benefit in exposing the hardware mixer back
in the *40 and earlier machines, since volume was also under hardware
control back then. The mute support is somewhat vestigial, and I don't
think trying to tie into it is going to make things better.

> Second, about the mute LEDs and mic-mute LEDs, we currently have several
> interfaces to choose from:
>  a) HP LEDs currently uses a ALSA kcontrol to control them. For Mute LED
> there is also a limited automatic control of this LED from kernel space
> (by default), so it follows the status of "Master Playback Switch" IIRC.

HDA has support for mute LEDs that are tied to GPIO lines on the codec -
is this the extent of it?

>  b) thinkpad-acpi currently uses custom sysfs nodes to control the LEDs.

Right.

>  c) and we also have the /sys/class/leds interface.

Yeah.

> It's important we get a consistent interfaces towards userspace for the
> LEDs. And we should also make sure we don't have a permissions problem:
> if we want the mute/mic-mute LED to follow the status of the currently
> selected sound card in PulseAudio, which IMO should be our goal, writes
> cannot be root-only.

I'm not convinced that should be our goal - if the mic mute light is on,
I'd expect *all* mics to be muted, since the point of the light there is
something of a privacy guard. It's not quite as clear that I'd expect
the mute LED to bind to everything. However, given a single "currently
selected sound card", there's no obviously user-visible difference
between muting the current device and muting all devices.

Given the privacy concerns around the microphone LED, I think any
exposed LED would have to be either under kernel control. Having a
compromised component of a user session be able to record audio while
leaving the LED lit would be a problem.

-- 
Matthew Garrett <matthew.garrett@nebula.com>

  reply	other threads:[~2013-08-14  7:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-14  5:40 [PATCH 0/2] add sysfs for acpi interfaces of thinkpad hardware mute Alex Hung
2013-08-14  5:40 ` [PATCH 1/2] thinkpad-acpi: add sysfs for getting and setting " Alex Hung
2013-08-14  5:40 ` [PATCH 2/2] thinkpad-acpi: add sysfs for enabling and disabling " Alex Hung
     [not found] ` <1376458802-11923-1-git-send-email-alex.hung-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2013-08-14  5:42   ` [PATCH 0/2] add sysfs for acpi interfaces of thinkpad " Matthew Garrett
2013-08-14  5:53     ` Alex Hung
2013-08-14  5:54       ` Matthew Garrett
2013-08-14  6:11         ` Alex Hung
2013-08-14  6:14           ` Matthew Garrett
2013-08-14  6:41             ` Alex Hung
2013-08-14  7:00               ` Matthew Garrett
2013-08-14  7:08                 ` Alex Hung
     [not found]                   ` <CAJ=jqubWWeWH+xsGrTVaNguNuw7gm2E=CZmXY_SxO+Bxg1Hxag-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-08-14 23:30                     ` Henrique de Moraes Holschuh
2013-08-14  7:16                 ` Alex Hung
2013-08-14  7:43                   ` David Henningsson
2013-08-14  7:51                     ` Matthew Garrett [this message]
2013-08-14  9:27                       ` David Henningsson
2013-08-14 14:57                         ` Matthew Garrett
2013-08-14 19:53                           ` David Henningsson
2013-08-14 20:05                             ` Matthew Garrett
2013-08-14 20:36                               ` David Henningsson
2013-08-14 20:38                                 ` Matthew Garrett
2013-08-14 20:59                                   ` David Henningsson
2013-08-14 21:15                                     ` Matthew Garrett
2013-08-15 14:55                                       ` David Henningsson
2013-08-15 14:24                       ` [alsa-devel] " Arun Raghavan
     [not found]           ` <CAJ=jqub1sRSzBRv_R6soDVAydRL+5nmA9-pMC4E+sgXhP6tbPw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-08-14  6:15             ` Alex Hung

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=1376466691.30031.14.camel@x230 \
    --to=matthew.garrett@nebula.com \
    --cc=alex.hung@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ibm-acpi@hmh.eng.br \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=tim.chen119@canonical.com \
    --cc=yk@canonical.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox