From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: Takashi Iwai <tiwai@suse.de>
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: Tue, 9 Feb 2021 07:34:43 +0900 [thread overview]
Message-ID: <20210208223443.GA258185@workstation> (raw)
In-Reply-To: <s5h5z32y0xt.wl-tiwai@suse.de>
Hi,
On Mon, Feb 08, 2021 at 05:33:02PM +0100, Takashi Iwai wrote:
> > > Also, are those new access flags exposed to user-space intentionally,
> > > so that user-space gets some information?
> >
> > Yes, it's one benefit, the second benefit is that we can create user space
> > controls for hardware which does not have any switch / volume controls for the
> > given path.
> >
> > An example is the AMD ACP bridge with the simple digital microphones. We can
> > use alsa-lib's softvol plugin to control the volume for this and it would be
> > nice to mark this user space control with the mic mute LED flag.
>
> OK, makes sense.
I have a concern about the usage of access flag for such kind of
hardware specific stuffs (LED dedicated to specific audio control)
since it's not enough hardware abstraction.
In my opinion, for the case, developers for in-kernel driver tend to use
specific name for control elements (or prefix/suffix of the name). Adding
new access flags for it seems to be overengineering against the original
purpose.
The patch itself includes some remarkable ideas that:
- introduction of association between control elements
- analyzing current status of the association (then operate LEDs)
- communication to userspace stuffs about the association
(here I carefully avoid usage of word 'topology'.)
The association itself seems to be useful when cooperating use case manager
of alsa-lib. I guess that the kind of framework designed for the association
is preferable instead of the patch tight-coupled to LED stuffs.
(And some subsystem already attempts to implement such framework into kernel
land, e.g. media controller devices in media subsystem.)
In another side, I guess that the reason to supply the association to
kernel land is to use 'ledtrig_audio_set()' kernel API. If userspace
stuffs find target LEDs and operate them via userspace interface,
the association could be in userspace. I think it better to investigate
for the direction since I can imagine that the introduction of association
to kernel land brings much codes into kernel land to support wide-variety
of hardware (and going to be obsoleted according to lifetime of actual
hardware sooner or later).
Regards
Takashi Sakamoto
next prev parent reply other threads:[~2021-02-08 22:35 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
2021-02-08 16:17 ` Jaroslav Kysela
2021-02-08 16:33 ` Takashi Iwai
2021-02-08 22:34 ` Takashi Sakamoto [this message]
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=20210208223443.GA258185@workstation \
--to=o-takashi@sakamocchi.jp \
--cc=Perry.Yuan@dell.com \
--cc=alsa-devel@alsa-project.org \
--cc=hdegoede@redhat.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.