alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Oder Chiou <oder_chiou@realtek.com>,
	alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Mark Brown <broonie@kernel.org>, Bard Liao <bard.liao@intel.com>
Subject: Re: [RFC 2/2] ASoC: rt5670: Add LED trigger support
Date: Wed, 24 Feb 2021 09:52:20 +0100	[thread overview]
Message-ID: <s5h8s7du9tn.wl-tiwai@suse.de> (raw)
In-Reply-To: <776b4ad9-2612-b08a-cb76-c3e1ce02388a@perex.cz>

On Wed, 24 Feb 2021 09:14:41 +0100,
Jaroslav Kysela wrote:
> 
> Dne 24. 02. 21 v 8:12 Takashi Iwai napsal(a):
> > On Tue, 23 Feb 2021 21:56:16 +0100,
> > Jaroslav Kysela wrote:
> >>
> >> Dne 23. 02. 21 v 17:20 Takashi Iwai napsal(a):
> >>>>> Of course, this implementation would make the integration much easier,
> >>>>> and that's a big benefit.  So I have a mixed feeling and not decided
> >>>>> yet whether we should go for it right now...
> >>>>
> >>>> I think that we can reconsider the LED handling implementation later, when
> >>>> someone brings something better on the table.
> >>>
> >>> What worried me is the plan to expose this capability to user-space.
> >>> If it's only a kernel-internal, we can fix it in the kernel and
> >>> nothing else broken, but if it's a part of API, that's not easy.
> >>>
> >>> So, if any, I'd like to avoid exposing to the user-space at first.
> >>> (But then it comes to the question how to deal with a case like AMD
> >>> ACP...)
> >>
> >> I tried to propose a complete solution and the ACP was one strong reason for
> >> this kernel / user space API. So without the user space support, it's just
> >> a half solution for known issues.
> >>
> >> Frankly, I don't see any drawback or a problem even if we remove this API
> >> later.
> > 
> > Removing the user-space API is absolutely no-go.  The only exception
> > would be either the case really no one uses it or it's too buggy and
> > unfixable.
> 
> This is a special case. Even if those LED bits are ignored by kernel in
> future, we expect to be replaced with another layer. Thus the functionality
> must be retained.

Well, we cannot know whether the replacement really happens or
happened, and hence we never kill the old one.  That's the problem.

> >> The LED group bits are just informal for the user space and it's
> >> expected to create the user controls tied to this LED functionality only in
> >> alsa-lib/plugins at the moment. The kernel may return an error when the user
> >> space tries to set those new bits when the API is deprecated and I believe
> >> that the hardware design faults like AMD ACP (without the hardware mute) are rare.
> > 
> > The experience tells us that users are creative enough to (ab)use a
> > new ABI in any unexpected ways, and we have no control for it.  So
> > it's not about how alsa-lib is implemented but rather how ABI could be
> > abused :)
> 
> Ok, I don't have other ideas. I don't agree with your argumentation for this
> particular case, where the functionality is marginal. Ideally, the AMD driver
> may be recoded to use double-buffering and software mute switch, so we should
> handle everything in the kernel space.

My argument is that we're trying to add too much freedom just for this
"marginal" problem.  Honestly speaking, I would feel rather more
comfortable if it were a kernel control element that just does trigger
the LED like the original patch from AMD guys.  Then you cannot do
much wrong.  OTOH, creating a virtual capture switch and let alsa-lib
handling the software mute, while PA should ignores the soft-mute but
dealing only with the assigned mute LED...  Sounds too complex to me.


thanks,

Takashi

  reply	other threads:[~2021-02-24  8:53 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-15 14:24 [RFC 0/2] ASoC: rt5670: Add LED trigger support Hans de Goede
2021-02-15 14:24 ` [RFC 1/2] ASoC: Add new SOC_DOUBLE*_ACCESS() macros Hans de Goede
2021-02-15 14:24 ` [RFC 2/2] ASoC: rt5670: Add LED trigger support Hans de Goede
2021-02-23 13:45   ` Mark Brown
2021-02-23 13:59     ` Hans de Goede
2021-02-23 14:09       ` Mark Brown
2021-02-23 14:21         ` Takashi Iwai
2021-02-23 16:14           ` Jaroslav Kysela
2021-02-23 16:20             ` Takashi Iwai
2021-02-23 20:56               ` Jaroslav Kysela
2021-02-24  7:12                 ` Takashi Iwai
2021-02-24  8:14                   ` Jaroslav Kysela
2021-02-24  8:52                     ` Takashi Iwai [this message]
2021-02-24  9:27                       ` Jaroslav Kysela
2021-02-24  9:38                         ` Takashi Iwai
2021-02-24  9:49                           ` Jaroslav Kysela
2021-02-24 10:33                             ` Takashi Iwai
2021-02-24 10:56                               ` Jaroslav Kysela
2021-02-24 11:43                                 ` Takashi Iwai
2021-02-24 12:08                                   ` Jaroslav Kysela
2021-02-24 12:42                                     ` Takashi Iwai
2021-02-24 17:57                                       ` Jaroslav Kysela
2021-02-25 11:00                                         ` Takashi Iwai
2021-02-25 18:09                                           ` Jaroslav Kysela
2021-02-26  8:41                                             ` Takashi Iwai
2021-02-26  9:22                                               ` Jaroslav Kysela
2021-02-23 17:07             ` Hans de Goede
2021-02-23 17:20             ` Mark Brown
2021-02-23 19:03               ` Hans de Goede
2021-02-24 12:59                 ` Mark Brown
2021-02-24 19:14                   ` Hans de Goede
2021-02-24 19:36                     ` Mark Brown
2021-02-24 20:09                       ` Hans de Goede
2021-02-25 14:59                         ` Mark Brown
2021-02-25 18:45                           ` Hans de Goede
2021-03-01 13:23                             ` Mark Brown
2021-03-01 13:39                               ` Hans de Goede
2021-03-01 19:15                                 ` Mark Brown
2021-03-01 19:49                                   ` Hans de Goede
2021-03-01 20:43                                     ` Mark Brown
2021-03-01 21:26                                       ` Hans de Goede
2021-03-02 12:41                                         ` Mark Brown
2021-03-02 21:14                                         ` Jaroslav Kysela
2021-03-04 19:39                                           ` Hans de Goede
2021-03-05 13:02                                             ` Jaroslav Kysela
2021-03-07 13:51                                               ` Hans de Goede

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=s5h8s7du9tn.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=broonie@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.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 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).