All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Hans de Goede <hdegoede@redhat.com>,
	ALSA development <alsa-devel@alsa-project.org>,
	Perry Yuan <Perry.Yuan@dell.com>
Subject: Re: [PATCH] [RFC] ALSA: control - add generic LED API to sound core routines
Date: Mon, 08 Feb 2021 16:11:19 +0100	[thread overview]
Message-ID: <s5him72y4q0.wl-tiwai@suse.de> (raw)
In-Reply-To: <20210207201157.869972-1-perex@perex.cz>

On Sun, 07 Feb 2021 21:11:57 +0100,
Jaroslav Kysela wrote:
> 
> [DO NOT MERGE!]
> [This is just an early proposal for comments]
> [The code is not tested / debugged]
> 
> The recent laptops have usually two LEDs assigned to reflect
> the speaker and microphone mute state. This implementation
> adds a tiny layer on top of the control API which calculates
> the state for those LEDs using the driver callbacks.
> 
> Two new access flags are introduced to describe the controls
> which affects the audio path settings (an easy path for drivers).
> 
> The LED resource can be shared with multiple sound cards with
> this code. The user space controls may be added to the state
> chain, too.
> 
> This code should replace the LED code in the HDA driver and
> add a possibility to easy extend the other drivers (ASoC
> codecs etc.).

Having a common helper in the ALSA core sounds like a good way to go.

My slight concern is that this will end up having the dependency on
LEDS stuff unconditionally when CONFIG_SND_LED=y.

Also, are those new access flags exposed to user-space intentionally,
so that user-space gets some information?

Last but not least: I'm not sure whether we should limit to only two
LEDs (mic and spk).  I'm afraid that there will be more LEDs in
future; people love decorations :)


thanks,

Takashi

  parent reply	other threads:[~2021-02-08 15:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 20:11 [PATCH] [RFC] ALSA: control - add generic LED API to sound core routines Jaroslav Kysela
2021-02-07 20:52 ` Hans de Goede
2021-02-08 11:41   ` Jaroslav Kysela
2021-02-08 14:08     ` Yuan, Perry
2021-02-07 21:45 ` kernel test robot
2021-02-08 15:11 ` Takashi Iwai [this message]
2021-02-08 16:17   ` Jaroslav Kysela
2021-02-08 16:33     ` Takashi Iwai
2021-02-08 22:34       ` Takashi Sakamoto
2021-02-10 11:26         ` Takashi Iwai
2021-02-10 12:06         ` Jaroslav Kysela

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=s5him72y4q0.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=Perry.Yuan@dell.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=hdegoede@redhat.com \
    --cc=perex@perex.cz \
    /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.