Commit 9899a7a8 authored by YueHaibing's avatar YueHaibing Committed by Mark Brown

ASoC: SOF: Fix randbuild error

When LEDS_TRIGGER_AUDIO is m and SND_SOC_SOF is y,

sound/soc/sof/control.o: In function `snd_sof_switch_put':
control.c:(.text+0x587): undefined reference to `ledtrig_audio_set'
control.c:(.text+0x593): undefined reference to `ledtrig_audio_set'
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Fixes: 5d43001a ("ASoC: SOF: acpi led support for switch controls")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191014091308.23688-1-yuehaibing@huawei.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8a3ab38c
......@@ -36,10 +36,12 @@ static void update_mute_led(struct snd_sof_control *scontrol,
scontrol->led_ctl.led_value = temp;
#if IS_REACHABLE(CONFIG_LEDS_TRIGGER_AUDIO)
if (!scontrol->led_ctl.direction)
ledtrig_audio_set(LED_AUDIO_MUTE, temp ? LED_OFF : LED_ON);
else
ledtrig_audio_set(LED_AUDIO_MICMUTE, temp ? LED_OFF : LED_ON);
#endif
}
static inline u32 mixer_to_ipc(unsigned int value, u32 *volume_map, int size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment