All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: Alex Hung <alex.hung@canonical.com>
Cc: Matthew Garrett <matthew.garrett@nebula.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 09:43:13 +0200	[thread overview]
Message-ID: <520B3511.7020604@canonical.com> (raw)
In-Reply-To: <CAJ=jqubPzq+pwY9F4tMEFRHr6rG+-1Hxm++5L45AbpR6mfFeJw@mail.gmail.com>

(Added alsa-devel to CC)

On 08/14/2013 09:16 AM, Alex Hung wrote:
> Added in David and Tim who also has some ideas to share.
> 
> On Wed, Aug 14, 2013 at 3:00 PM, Matthew Garrett
> <matthew.garrett@nebula.com> wrote:
>> On Wed, 2013-08-14 at 14:41 +0800, Alex Hung wrote:
>>> Hi Matthew,
>>>
>>> The problem is that thinkpad-acpi does not aware of mute is changed by
>>> either hotkey presses or in desktop.
>>
>> Ok, how about this. Register the LED with the kernel LED subsystem. Add
>> a new LED trigger for volume-mute. Have the HDA driver call that trigger
>> whenever the mute state changes.
>>
>> --
>> Matthew Garrett <matthew.garrett@nebula.com>
> 
> 
> 

So, to take a wider grip on this issue.

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.

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.
 b) thinkpad-acpi currently uses custom sysfs nodes to control the LEDs.
 c) and we also have the /sys/class/leds interface.
There might be even more solutions.

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.
To have the HDA driver call into the LED subsystem is better than
nothing, but in the end we would want the LEDs to follow whatever sound
input/output the user currently uses, whether that is bluetooth, USB,
HDMI, or internal audio.


-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

  reply	other threads:[~2013-08-14  7:43 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 [this message]
2013-08-14  7:51                     ` Matthew Garrett
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=520B3511.7020604@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alex.hung@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ibm-acpi-devel@lists.sourceforge.net \
    --cc=ibm-acpi@hmh.eng.br \
    --cc=matthew.garrett@nebula.com \
    --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 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.