aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openwrt.org>2005-09-10 13:14:00 +0000
committerWaldemar Brodkorb <wbx@openwrt.org>2005-09-10 13:14:00 +0000
commite281de7e89d92742c1aa3844a560f6e74ea83c78 (patch)
treed3df2f8259c2571107179dee47491fba8d3f127a
parentbaa012fc37408dc8c17808d2b9c184a876d7cb75 (diff)
downloadmaster-187ad058-e281de7e89d92742c1aa3844a560f6e74ea83c78.tar.gz
master-187ad058-e281de7e89d92742c1aa3844a560f6e74ea83c78.tar.bz2
master-187ad058-e281de7e89d92742c1aa3844a560f6e74ea83c78.zip
usb audio from dave, thx
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1882 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/Config.in5
-rw-r--r--target/linux/control/kmod-usb-audio.control6
-rw-r--r--target/linux/linux-2.4/Makefile4
-rw-r--r--target/linux/linux-2.4/config/brcm29
-rw-r--r--target/linux/linux-2.4/patches/generic/222-sound.patch27
5 files changed, 69 insertions, 2 deletions
diff --git a/target/linux/Config.in b/target/linux/Config.in
index 3f1ad23309..22b2f8dbd1 100644
--- a/target/linux/Config.in
+++ b/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/target/linux/control/kmod-usb-audio.control b/target/linux/control/kmod-usb-audio.control
new file mode 100644
index 0000000000..31f35728f3
--- /dev/null
+++ b/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/target/linux/linux-2.4/Makefile b/target/linux/linux-2.4/Makefile
index 35349d2635..ca00a327fb 100644
--- a/target/linux/linux-2.4/Makefile
+++ b/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/target/linux/linux-2.4/config/brcm b/target/linux/linux-2.4/config/brcm
index 19ea26e92d..871cbdc6a2 100644
--- a/target/linux/linux-2.4/config/brcm
+++ b/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/target/linux/linux-2.4/patches/generic/222-sound.patch b/target/linux/linux-2.4/patches/generic/222-sound.patch
new file mode 100644
index 0000000000..351e8c2072
--- /dev/null
+++ b/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);