Skip to content

Commit db4bfcb

Browse files
rddunlaprichardweinberger
authored andcommitted
um: Fix hostaudio build errors
Use "select" to ensure that the required kconfig symbols are set as expected. Drop HOSTAUDIO since it is now equivalent to UML_SOUND. Set CONFIG_SOUND=m in ARCH=um defconfig files to maintain the status quo of the default configs. Allow SOUND with UML regardless of HAS_IOMEM. Otherwise there is a kconfig warning for unmet dependencies. (This was not an issue when SOUND was defined in arch/um/drivers/Kconfig. I have done 50 randconfig builds and didn't find any issues.) This fixes build errors when CONFIG_SOUND is not set: ld: arch/um/drivers/hostaudio_kern.o: in function `hostaudio_cleanup_module': hostaudio_kern.c:(.exit.text+0xa): undefined reference to `unregister_sound_mixer' ld: hostaudio_kern.c:(.exit.text+0x15): undefined reference to `unregister_sound_dsp' ld: arch/um/drivers/hostaudio_kern.o: in function `hostaudio_init_module': hostaudio_kern.c:(.init.text+0x19): undefined reference to `register_sound_dsp' ld: hostaudio_kern.c:(.init.text+0x31): undefined reference to `register_sound_mixer' ld: hostaudio_kern.c:(.init.text+0x49): undefined reference to `unregister_sound_dsp' and this kconfig warning: WARNING: unmet direct dependencies detected for SOUND Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Fixes: d886e87 ("sound: make OSS sound core optional") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: kernel test robot <lkp@intel.com> Closes: lore.kernel.org/r/202307141416.vxuRVpFv-lkp@intel.com Cc: Richard Weinberger <richard@nod.at> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: linux-um@lists.infradead.org Cc: Tejun Heo <tj@kernel.org> Cc: Takashi Iwai <tiwai@suse.de> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Nicolas Schier <nicolas@fjasle.eu> Cc: linux-kbuild@vger.kernel.org Cc: alsa-devel@alsa-project.org Reviewed-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent f5ff432 commit db4bfcb

File tree

5 files changed

+7
-15
lines changed

5 files changed

+7
-15
lines changed

arch/um/configs/i386_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ CONFIG_TTY_CHAN=y
3434
CONFIG_XTERM_CHAN=y
3535
CONFIG_CON_CHAN="pts"
3636
CONFIG_SSL_CHAN="pts"
37+
CONFIG_SOUND=m
3738
CONFIG_UML_SOUND=m
3839
CONFIG_DEVTMPFS=y
3940
CONFIG_DEVTMPFS_MOUNT=y

arch/um/configs/x86_64_defconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ CONFIG_TTY_CHAN=y
3232
CONFIG_XTERM_CHAN=y
3333
CONFIG_CON_CHAN="pts"
3434
CONFIG_SSL_CHAN="pts"
35+
CONFIG_SOUND=m
3536
CONFIG_UML_SOUND=m
3637
CONFIG_DEVTMPFS=y
3738
CONFIG_DEVTMPFS_MOUNT=y

arch/um/drivers/Kconfig

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,14 @@ config SSL_CHAN
111111

112112
config UML_SOUND
113113
tristate "Sound support"
114+
depends on SOUND
115+
select SOUND_OSS_CORE
114116
help
115117
This option enables UML sound support. If enabled, it will pull in
116-
soundcore and the UML hostaudio relay, which acts as a intermediary
118+
the UML hostaudio relay, which acts as a intermediary
117119
between the host's dsp and mixer devices and the UML sound system.
118120
It is safe to say 'Y' here.
119121

120-
config SOUND
121-
tristate
122-
default UML_SOUND
123-
124-
config SOUND_OSS_CORE
125-
bool
126-
default UML_SOUND
127-
128-
config HOSTAUDIO
129-
tristate
130-
default UML_SOUND
131-
132122
endmenu
133123

134124
menu "UML Network Devices"

arch/um/drivers/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ obj-$(CONFIG_UML_NET) += net.o
5454
obj-$(CONFIG_MCONSOLE) += mconsole.o
5555
obj-$(CONFIG_MMAPPER) += mmapper_kern.o
5656
obj-$(CONFIG_BLK_DEV_UBD) += ubd.o
57-
obj-$(CONFIG_HOSTAUDIO) += hostaudio.o
57+
obj-$(CONFIG_UML_SOUND) += hostaudio.o
5858
obj-$(CONFIG_NULL_CHAN) += null.o
5959
obj-$(CONFIG_PORT_CHAN) += port.o
6060
obj-$(CONFIG_PTY_CHAN) += pty.o

sound/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
menuconfig SOUND
33
tristate "Sound card support"
4-
depends on HAS_IOMEM
4+
depends on HAS_IOMEM || UML
55
help
66
If you have a sound card in your computer, i.e. if it can say more
77
than an occasional beep, say Y.

0 commit comments

Comments
 (0)