Skip to content

Commit 969fbd6

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 02368c6 commit 969fbd6

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
@@ -528,6 +528,7 @@ static int snd_emu0204_controls_create(struct usb_mixer_interface *mixer)
528528
&snd_emu0204_control, NULL);
529529
}
530530

531+
#if IS_REACHABLE(CONFIG_INPUT)
531532
/*
532533
* Sony DualSense controller (PS5) jack detection
533534
*
@@ -784,6 +785,7 @@ static int snd_dualsense_controls_create(struct usb_mixer_interface *mixer)
784785

785786
return snd_dualsense_jack_create(mixer, "Headset Mic Jack", false);
786787
}
788+
#endif /* IS_REACHABLE(CONFIG_INPUT) */
787789

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

@@ -3388,10 +3390,12 @@ int snd_usb_mixer_apply_create_quirk(struct usb_mixer_interface *mixer)
33883390
err = snd_emu0204_controls_create(mixer);
33893391
break;
33903392

3393+
#if IS_REACHABLE(CONFIG_INPUT)
33913394
case USB_ID(0x054c, 0x0ce6): /* Sony DualSense controller (PS5) */
33923395
case USB_ID(0x054c, 0x0df2): /* Sony DualSense Edge controller (PS5) */
33933396
err = snd_dualsense_controls_create(mixer);
33943397
break;
3398+
#endif /* IS_REACHABLE(CONFIG_INPUT) */
33953399

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

0 commit comments

Comments
 (0)