Skip to content

Commit d6d69ae

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 3d8878d commit d6d69ae

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sound/usb/mixer_quirks.c

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

530+
#if IS_REACHABLE(CONFIG_INPUT)
530531
/*
531532
* Sony DualSense controller (PS5) jack detection
532533
*
@@ -783,6 +784,7 @@ static int snd_dualsense_controls_create(struct usb_mixer_interface *mixer)
783784

784785
return snd_dualsense_jack_create(mixer, "Headset Mic Jack", false);
785786
}
787+
#endif /* IS_REACHABLE(CONFIG_INPUT) */
786788

787789
/* ASUS Xonar U1 / U3 controls */
788790

@@ -2639,10 +2641,12 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
26392641
err = snd_emu0204_controls_create(mixer);
26402642
break;
26412643

2644+
#if IS_REACHABLE(CONFIG_INPUT)
26422645
case USB_ID(0x054c, 0x0ce6): /* Sony DualSense controller (PS5) */
26432646
case USB_ID(0x054c, 0x0df2): /* Sony DualSense Edge controller (PS5) */
26442647
err = snd_dualsense_controls_create(mixer);
26452648
break;
2649+
#endif /* IS_REACHABLE(CONFIG_INPUT) */
26462650

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

0 commit comments

Comments
 (0)