Skip to content

Commit 6b66c71

Browse files
tiwaigregkh
authored andcommitted
ALSA: usb-audio: Fix build with CONFIG_INPUT=n
[ Upstream commit d0630a0 ] The recent addition of DualSense mixer quirk relies on the input device handle, and the build can fail if CONFIG_INPUT isn't set. Put (rather ugly) workarounds to wrap with IS_REACHABLE() for avoiding the build error. Fixes: 79d561c ("ALSA: usb-audio: Add mixer quirk for Sony DualSense PS5") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202506130733.gnPKw2l3-lkp@intel.com/ Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://patch.msgid.link/20250613081543.7404-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a9bed48 commit 6b66c71

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sound/usb/mixer_quirks.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ static int snd_emu0204_controls_create(struct usb_mixer_interface *mixer)
531531
&snd_emu0204_control, NULL);
532532
}
533533

534+
#if IS_REACHABLE(CONFIG_INPUT)
534535
/*
535536
* Sony DualSense controller (PS5) jack detection
536537
*
@@ -787,6 +788,7 @@ static int snd_dualsense_controls_create(struct usb_mixer_interface *mixer)
787788

788789
return snd_dualsense_jack_create(mixer, "Headset Mic Jack", false);
789790
}
791+
#endif /* IS_REACHABLE(CONFIG_INPUT) */
790792

791793
/* ASUS Xonar U1 / U3 controls */
792794

@@ -4222,10 +4224,12 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
42224224
err = snd_emu0204_controls_create(mixer);
42234225
break;
42244226

4227+
#if IS_REACHABLE(CONFIG_INPUT)
42254228
case USB_ID(0x054c, 0x0ce6): /* Sony DualSense controller (PS5) */
42264229
case USB_ID(0x054c, 0x0df2): /* Sony DualSense Edge controller (PS5) */
42274230
err = snd_dualsense_controls_create(mixer);
42284231
break;
4232+
#endif /* IS_REACHABLE(CONFIG_INPUT) */
42294233

42304234
case USB_ID(0x0763, 0x2030): /* M-Audio Fast Track C400 */
42314235
case USB_ID(0x0763, 0x2031): /* M-Audio Fast Track C400 */

0 commit comments

Comments
 (0)