All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>, Oder Chiou <oder_chiou@realtek.com>,
	alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
	Bard Liao <bard.liao@intel.com>
Subject: Re: [RFC 2/2] ASoC: rt5670: Add LED trigger support
Date: Tue, 23 Feb 2021 20:03:58 +0100	[thread overview]
Message-ID: <fe2941de-02ce-9ed0-70ff-d7967aeecc44@redhat.com> (raw)
In-Reply-To: <20210223172055.GI5116@sirena.org.uk>

Hi,

On 2/23/21 6:20 PM, Mark Brown wrote:
> On Tue, Feb 23, 2021 at 05:14:32PM +0100, Jaroslav Kysela wrote:
>> Dne 23. 02. 21 v 15:21 Takashi Iwai napsal(a):
> 
>>> That's one of my concerns in the recent actions for putting the
>>> hard-coded mute LED controls.  So far, the only usage of led-audio
>>> trigger is HD-audio, and it's enabled only for selected devices and
>>> setups.  OTOH, if we apply the audio-led trigger generically in ASoC
>>> codec driver, it's always done and might misfit; e.g. what happens if
>>> two codecs are present on the system?.
> 
>> That's the abstraction issue. We can use PCI, ACPI, DMI or DT checks at the
>> _right_ place (machine top-level code) to mark those controls with the LED
>> flags in the kernel space. I've never said that the right place is the generic
>> ASoC codec driver.
> 
> We already need ACPI and DMI quirks in the CODEC drivers anyway due to
> the limitations of ACPI so it wouldn't be particularly surprising to
> have stuff there.  OTOH this would fix things per machine while with
> fancier hardware things might easily be flexible enough that there's
> multiple choices that could be made depending on use case.

I have a feeling from the discussion here that you would prefer this
per model/machine option over the current patch which unconditionally
sets the SNDRV_CTL_ELEM_ACCESS_SPK/MIC_LED flag on the main DAC/ADC
mute controls ?

So I believe that it would be best for me to respin this patch
series moving to making this a per model/machine thing, correct?

> I'd be a lot more comfortable with ASoC having some runtime control for
> overriding which controls get mapped, even if we try to pick defaults
> with quirks.

The drivers in question already allow overriding their quirks bitmap
via a module-parameter.  If we are going to enable the mixer-element
access-flag which enables LED control on a per-model basis based on
DMI quirks, then I plan to simply add 1 new flag in the quirks bitmap
for this for each mixer-element on which we need the flag.

So for now this would be just 2 new flags, since atm we only need
the SNDRV_CTL_ELEM_ACCESS_SPK_LED resp. SNDRV_CTL_ELEM_ACCESS_SPK_LED
flag on one mixer-element each.

And then the user can always override the settings using the quirk
module parameter. This is not exactly runtime control, but IMHO it
is close enough and anything else will just overcomplicate things.
I'm aware of only 3 model 2-in-1s which need this and on those
3 the implementation is very straight forward.

Regards,

Hans


  reply	other threads:[~2021-02-23 19:05 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
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 [this message]
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=fe2941de-02ce-9ed0-70ff-d7967aeecc44@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    --cc=perex@perex.cz \
    --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.