alsa-devel.alsa-project.org archive mirror
 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: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1376458802-11923-1-git-send-email-alex.hung@canonical.com>
     [not found] ` <1376458937.30031.1.camel@x230>
     [not found]   ` <CAJ=jqua8STZQideGbQTDh2W8iHcF4J9OJAC5tw-bkdBLLzsP2A@mail.gmail.com>
     [not found]     ` <1376459647.30031.2.camel@x230>
     [not found]       ` <CAJ=jqub1sRSzBRv_R6soDVAydRL+5nmA9-pMC4E+sgXhP6tbPw@mail.gmail.com>
     [not found]         ` <1376460872.30031.4.camel@x230>
     [not found]           ` <CAJ=jquaCHpBPKVYHKKCyMoih3NVCL8VmyiiN5Vy0UmTTTrwKjQ@mail.gmail.com>
     [not found]             ` <1376463610.30031.6.camel@x230>
     [not found]               ` <CAJ=jqubPzq+pwY9F4tMEFRHr6rG+-1Hxm++5L45AbpR6mfFeJw@mail.gmail.com>
2013-08-14  7:43                 ` [PATCH 0/2] add sysfs for acpi interfaces of thinkpad hardware mute 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

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;
as well as URLs for NNTP newsgroup(s).