usb audio from dave, thx
authorwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 10 Sep 2005 13:14:00 +0000 (13:14 +0000)
committerwbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 10 Sep 2005 13:14:00 +0000 (13:14 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@1882 3c298f89-4303-0410-b956-a3cf2f4a3e73

openwrt/target/linux/Config.in
openwrt/target/linux/control/kmod-usb-audio.control [new file with mode: 0644]
openwrt/target/linux/linux-2.4/Makefile
openwrt/target/linux/linux-2.4/config/brcm
openwrt/target/linux/linux-2.4/patches/generic/222-sound.patch [new file with mode: 0644]

index 3f1ad23..22b2f8d 100644 (file)
@@ -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 (file)
index 0000000..31f3572
--- /dev/null
@@ -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
index 35349d2..ca00a32 100644 (file)
@@ -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 \
index 19ea26e..871cbdc 100644 (file)
@@ -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 (file)
index 0000000..351e8c2
--- /dev/null
@@ -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);
This page took 0.034884 seconds and 4 git commands to generate.