usb audio from dave, thx

SVN-Revision: 1882
This commit is contained in:
Waldemar Brodkorb 2005-09-10 13:14:00 +00:00
parent 3c6b5e928b
commit a72596d5e4
5 changed files with 69 additions and 2 deletions

View 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

View file

@ -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

View 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 \

View 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
#

View file

@ -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);