Skip to contentSkip to conversation

ASoC: SOF: Fix randbuild error

PATCH In review YueHaibing 3 participants 3 messages Oct 14, 2019

Subsystems (3)
lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 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'

Fixes 5d43001ae436 ("ASoC: SOF: acpi led support for switch controls")
---
 sound/soc/sof/control.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/sof/control.c +2 -0
index 41551e8..2c4abd4 100644
@@ -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)
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · YueHaibing

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'

Fixes 5d43001ae436 ("ASoC: SOF: acpi led support for switch controls")

Thanks for the fix.

Quoted 22 lines
---
  sound/soc/sof/control.c | 2 ++
  1 file changed, 2 insertions(+)
sound/soc/sof/control.c +2 -0
index 41551e8..2c4abd4 100644
@@ -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)
maintainer
#2 lore raw

Applied "ASoC: SOF: Fix randbuild error" to the asoc tree

In reply to YueHaibing

The patch

ASoC: SOF: Fix randbuild error

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

From 9899a7a869935c4c93247b290ac7a70e0deab202 Mon Sep 17 00:00:00 2001
From: YueHaibing <[email protected]>
Date: Mon, 14 Oct 2019 17:13:08 +0800
Subject: [PATCH] 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'

Fixes 5d43001ae436 ("ASoC: SOF: acpi led support for switch controls")
---
 sound/soc/sof/control.c | 2 ++
 1 file changed, 2 insertions(+)
sound/soc/sof/control.c +2 -0
index 41551e8f6ac3..2c4abd406c4f 100644
@@ -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)
Signature · 1 line
2.20.1