Re: disabling CONFIG_LED_CLASS

From: Randy Dunlap
Date: Wed Oct 14 2020 - 04:44:56 EST


On 10/13/20 9:56 PM, Udo van den Heuvel wrote:
> On 14-10-2020 06:49, Randy Dunlap wrote:
>> If you disable SND_HDA_CODEC_REALTEK, then the rest of the
>> LED kconfig symbols can be disabled.
>
> Sure,
>
> but:
>
> # dmesg|grep audi
> (...)
>
> [ 19.971537] snd_hda_codec_generic hdaudioC0D0: ignore pin 0x7, too
> many assigned pins
> [ 19.973547] snd_hda_codec_generic hdaudioC0D0: autoconfig for
> Generic: line_outs=0 (0x0/0x0/0x0/0x0/0x0) type:line
> [ 19.975642] snd_hda_codec_generic hdaudioC0D0: speaker_outs=0
> (0x0/0x0/0x0/0x0/0x0)
> [ 19.977774] snd_hda_codec_generic hdaudioC0D0: hp_outs=0
> (0x0/0x0/0x0/0x0/0x0)
> [ 19.980176] snd_hda_codec_generic hdaudioC0D0: mono: mono_out=0x0
> [ 19.982257] snd_hda_codec_generic hdaudioC0D0: dig-out=0x3/0x5
> [ 19.984412] snd_hda_codec_generic hdaudioC0D0: inputs:
> [ 20.035088] snd_hda_codec_realtek hdaudioC1D0: autoconfig for
> ALC1220: line_outs=3 (0x14/0x15/0x16/0x0/0x0) type:line
> [ 20.036940] snd_hda_codec_realtek hdaudioC1D0: speaker_outs=0
> (0x0/0x0/0x0/0x0/0x0)
> [ 20.039579] snd_hda_codec_realtek hdaudioC1D0: hp_outs=1
> (0x1b/0x0/0x0/0x0/0x0)
> [ 20.041690] snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0
> [ 20.044076] snd_hda_codec_realtek hdaudioC1D0: dig-out=0x1e/0x0
> [ 20.046173] snd_hda_codec_realtek hdaudioC1D0: inputs:
> [ 20.049252] snd_hda_codec_realtek hdaudioC1D0: Front Mic=0x19
> [ 20.051287] snd_hda_codec_realtek hdaudioC1D0: Rear Mic=0x18
> [ 20.053084] snd_hda_codec_realtek hdaudioC1D0: Line=0x1a
> [ 20.427487] usbcore: registered new interface driver snd-usb-audio
>
> I.e.: it looks like I will lose some funcionality when I disable
> SND_HDA_CODEC_REALTEK.

OK. At present you can't have it both ways, i.e., SND_HDA_CODEC_REALTEK
with no LEDS. That driver apparently wants LEDS.

According to this commit:

commit 7cdf8c49b1df0a385db06c4f9a5ba1b16510fdcc
Author: Takashi Iwai <tiwai@xxxxxxx>
Date: Thu Jun 18 13:08:31 2020 +0200
ALSA: hda: generic: Add a helper for mic-mute LED with LED classdev

the Realtek and other drivers need LED support:

"""
Also, introduce a new kconfig CONFIG_SND_HDA_GENERIC_LEDS, to indicate
the usage of mute / mic-mute LED helpers. It's selected by the codec
drivers (Realtek, Conexant and Sigmatel), while it selects the
necessary LED class dependencies.
"""


--
~Randy