[RFC 2/2] ASoC: rt5670: Add LED trigger support

Mark Brown broonie at kernel.org
Tue Feb 23 14:45:06 CET 2021


On Mon, Feb 15, 2021 at 03:24:19PM +0100, Hans de Goede wrote:

> Add support for controlling a speaker and/or microphone mute LED through
> LED triggers using the new generic LED trigger module.

> -	SOC_DOUBLE_EXT("DAC1 Playback Switch", SND_SOC_NOPM, 0, 1, 1, 0,
> +	SOC_DOUBLE_EXT_ACCESS("DAC1 Playback Switch", SND_SOC_NOPM, 0, 1, 1, 0,
> +			SNDRV_CTL_ELEM_ACCESS_SPK_LED,
>  			rt5670_dac1_playback_switch_get, rt5670_dac1_playback_switch_put),

> -	SOC_DOUBLE("ADC Capture Switch", RT5670_STO1_ADC_DIG_VOL,
> -		RT5670_L_MUTE_SFT, RT5670_R_MUTE_SFT, 1, 1),
> +	SOC_DOUBLE_ACCESS("ADC Capture Switch", RT5670_STO1_ADC_DIG_VOL,
> +			  RT5670_L_MUTE_SFT, RT5670_R_MUTE_SFT, 1, 1,
> +			  SNDRV_CTL_ELEM_ACCESS_MIC_LED),

Why just these particular controls - what if a system has separate mutes
for speakers or something?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20210223/d7f00424/attachment.sig>


More information about the Alsa-devel mailing list