summaryrefslogtreecommitdiff
path: root/openwrt
diff options
context:
space:
mode:
Diffstat (limited to 'openwrt')
-rw-r--r--openwrt/target/linux/Config.in5
-rw-r--r--openwrt/target/linux/control/kmod-usb-audio.control6
-rw-r--r--openwrt/target/linux/linux-2.4/Makefile4
-rw-r--r--openwrt/target/linux/linux-2.4/config/brcm29
-rw-r--r--openwrt/target/linux/linux-2.4/patches/generic/222-sound.patch27
5 files changed, 69 insertions, 2 deletions
diff --git a/openwrt/target/linux/Config.in b/openwrt/target/linux/Config.in
index 3f1ad23309..22b2f8dbd1 100644
--- a/openwrt/target/linux/Config.in
+++ b/openwrt/target/linux/Config.in
@@ -227,6 +227,11 @@ config BR2_PACKAGE_KMOD_USB_PRINTER
default m
depends BR2_PACKAGE_KMOD_USB_CONTROLLER
+config BR2_PACKAGE_KMOD_USB_AUDIO
+ tristate "Support for USB soundcards"
+ default m
+ depends BR2_PACKAGE_KMOD_USB_CONTROLLER
+
config BR2_PACKAGE_KMOD_USB_ACM
tristate "Support for USB modems/isdn controllers"
default m
diff --git a/openwrt/target/linux/control/kmod-usb-audio.control b/openwrt/target/linux/control/kmod-usb-audio.control
new file mode 100644
index 0000000000..31f35728f3
--- /dev/null
+++ b/openwrt/target/linux/control/kmod-usb-audio.control
@@ -0,0 +1,6 @@
+Package: kmod-usb-audio
+Priority: optional
+Section: sys
+Maintainer: David Collett <daveco@users.sourceforge.net>
+Source: buildroot internal
+Description: Kernel Support for USB Soundcards
diff --git a/openwrt/target/linux/linux-2.4/Makefile b/openwrt/target/linux/linux-2.4/Makefile
index 35349d2635..ca00a327fb 100644
--- a/openwrt/target/linux/linux-2.4/Makefile
+++ b/openwrt/target/linux/linux-2.4/Makefile
@@ -135,6 +135,10 @@ $(eval $(call KMOD_template,USB_STORAGE,usb-storage,\
$(eval $(call KMOD_template,USB_PRINTER,usb-printer,\
$(MODULES_DIR)/kernel/drivers/usb/printer.o \
,CONFIG_USB_PRINTER,kmod-usb-core,60,printer))
+$(eval $(call KMOD_template,USB_AUDIO,usb-audio,\
+ $(MODULES_DIR)/kernel/drivers/sound/soundcore.o \
+ $(MODULES_DIR)/kernel/drivers/usb/audio.o \
+,CONFIG_USB_AUDIO,kmod-usb-core,60,soundcore audio))
$(eval $(call KMOD_template,IDE,ide,\
$(MODULES_DIR)/kernel/drivers/ide/*.o \
$(MODULES_DIR)/kernel/drivers/ide/*/*.o \
diff --git a/openwrt/target/linux/linux-2.4/config/brcm b/openwrt/target/linux/linux-2.4/config/brcm
index 19ea26e92d..871cbdc6a2 100644
--- a/openwrt/target/linux/linux-2.4/config/brcm
+++ b/openwrt/target/linux/linux-2.4/config/brcm
@@ -1164,7 +1164,32 @@ CONFIG_VIDEO_PROC_FS=y
#
# Sound
#
-# CONFIG_SOUND is not set
+CONFIG_SOUND=m
+# CONFIG_SOUND_ALI5455 is not set
+# CONFIG_SOUND_BT878 is not set
+# CONFIG_SOUND_CMPCI is not set
+# CONFIG_SOUND_EMU10K1 is not set
+# CONFIG_MIDI_EMU10K1 is not set
+# CONFIG_SOUND_FUSION is not set
+# CONFIG_SOUND_CS4281 is not set
+# CONFIG_SOUND_ES1370 is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
+# CONFIG_SOUND_MAESTRO3 is not set
+# CONFIG_SOUND_FORTE is not set
+# CONFIG_SOUND_ICH is not set
+# CONFIG_SOUND_RME96XX is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+# CONFIG_SOUND_VIA82CXXX is not set
+# CONFIG_MIDI_VIA82CXXX is not set
+# CONFIG_SOUND_OSS is not set
+# CONFIG_SOUND_TVMIXER is not set
+# CONFIG_SOUND_AD1980 is not set
+# CONFIG_SOUND_WM97XX is not set
#
# USB support
@@ -1189,7 +1214,7 @@ CONFIG_USB_OHCI=m
#
# USB Device Class drivers
#
-# CONFIG_USB_AUDIO is not set
+CONFIG_USB_AUDIO=m
# CONFIG_USB_EMI26 is not set
#
diff --git a/openwrt/target/linux/linux-2.4/patches/generic/222-sound.patch b/openwrt/target/linux/linux-2.4/patches/generic/222-sound.patch
new file mode 100644
index 0000000000..351e8c2072
--- /dev/null
+++ b/openwrt/target/linux/linux-2.4/patches/generic/222-sound.patch
@@ -0,0 +1,27 @@
+diff -rNu linux-2.4.30/drivers/sound/sound_core.c linux-2.4.30.new/drivers/sound/sound_core.c
+--- linux-2.4.30/drivers/sound/sound_core.c 2001-10-01 05:26:08.000000000 +1000
++++ linux-2.4.30.new/drivers/sound/sound_core.c 2005-08-27 22:52:55.061719968 +1000
+@@ -174,9 +174,9 @@
+ }
+
+ if (r == low)
+- sprintf (name_buf, "%s", name);
++ snprintf (name_buf, sizeof(name_buf), "%s", name);
+ else
+- sprintf (name_buf, "%s%d", name, (r - low) / SOUND_STEP);
++ snprintf (name_buf, sizeof(name_buf), "%s%d", name, (r - low) / SOUND_STEP);
+ s->de = devfs_register (devfs_handle, name_buf,
+ DEVFS_FL_NONE, SOUND_MAJOR, s->unit_minor,
+ S_IFCHR | mode, fops, NULL);
+@@ -507,9 +507,9 @@
+ * ALSA toplevel modules for soundcards, thus we need
+ * load them at first. [Jaroslav Kysela <perex@jcu.cz>]
+ */
+- sprintf(mod, "sound-slot-%i", unit>>4);
++ snprintf(mod, sizeof(mod), "sound-slot-%i", unit>>4);
+ request_module(mod);
+- sprintf(mod, "sound-service-%i-%i", unit>>4, chain);
++ snprintf(mod, sizeof(mod), "sound-service-%i-%i", unit>>4, chain);
+ request_module(mod);
+ spin_lock(&sound_loader_lock);
+ s = __look_for_unit(chain, unit);