aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
AgeCommit message (Collapse)AuthorFilesLines
2006-03-06[PATCH] alsa: fix error paths in snd_ctl_elem_add()Takashi Iwai1-4/+2
Fix bugs in error paths of snd_ctl_elem_add() - NULL reference - double free (already freed in snd_ctl_add()) Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: Jaroslav Kysela <perex@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-20[PATCH] Fix snd-usb-audio in 32-bit compat environmentJuergen Kreileder1-5/+11
I'm getting oopses with snd-usb-audio in 32-bit compat environments: control_compat.c:get_ctl_type() doesn't initialize 'info', so 'itemlist[uinfo->value.enumerated.item]' in usbmixer.c:mixer_ctl_selector_info() might access random memory (The 'if ((int)uinfo->value.enumerated.item >= cval->max)' doesn't fix all problems because of the unsigned -> signed conversion.) Signed-off-by: Juergen Kreileder <jk@blackdown.de> Cc: Jaroslav Kysela <perex@suse.cz> Acked-by: Takashi Iwai <tiwai@suse.de> Cc: Greg KH <greg@kroah.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-22[ALSA] Remove BKL from sound/core/info.cIngo Molnar1-22/+11
Modules: ALSA Core Remove BKL from sound/core/info.c Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-09[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_semJes Sorensen2-6/+0
This patch converts the inode semaphore to a mutex. I have tested it on XFS and compiled as much as one can consider on an ia64. Anyway your luck with it might be different. Modified-by: Ingo Molnar <mingo@elte.hu> (finished the conversion) Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2006-01-04[ALSA] Revert the nested-device patchTakashi Iwai2-10/+3
Modules: ALSA Core Revert the nested-device patch to keep the compatibility with the current HAL configuration. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] seq: reorganize sequencer client numbersClemens Ladisch2-28/+33
Modules: ALSA sequencer Reduce the maximum possible number of global clients to 16 to make more numbers available for card clients, and allow dynamically allocated card client numbers to share the same range as application client numbers to make sure that all 32 cards can be used at the same time. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] seq: set client name in snd_seq_create_kernel_client()Clemens Ladisch6-69/+23
All users of snd_seq_create_kernel_client() have to set the client name anyway, so we can just pass the name as parameter. This relieves us from having to muck around with a struct snd_seq_client_info in these cases. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] seq: remove struct snd_seq_client_callbackClemens Ladisch7-37/+8
The fields of struct snd_seq_client_callback either aren't used or are always set to the same value, so we can get rid of it altogether. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] seq: remove superfluous fieldsClemens Ladisch2-6/+0
Modules: ALSA sequencer None of the fields of struct snd_seq_kernel_client was actually used, so remove them. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] pcm - Fix wrong assertsTakashi Iwai1-4/+3
Modules: PCM Midlevel Fixed wrong or supreflous snd_assert()'s. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Nest sound devicesClemens Ladisch2-3/+10
Modules: ALSA Core Make the control device parent of all other ALSA devices of a card. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] pcm - Make the support of old API selectableTakashi Iwai2-0/+14
Modules: ALSA Core,PCM Midlevel Make the support of old API selectable via config option. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Optimize for config without PROC_FS (seq and oss parts)Takashi Iwai13-21/+50
Modules: ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer Optimize the code when compiled without CONFIG_PROC_FS (in seq and oss emulation parts). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Optimize for config without PROC_FSTakashi Iwai8-120/+184
Modules: HWDEP Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel Optimize the code when compiled without CONFIG_PROC_FS. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] sound/: possible cleanupsAdrian Bunk1-3/+2
Modules: RawMidi Midlevel,HDA generic driver This patch contains the following possible cleanups: - pci/hda/hda_proc.c should #include 'hda_local.h' for including the prototype of it's global function snd_hda_codec_proc_new() - core/rawmidi.c: make the needlessly global and EXPORT_SYMBOL'ed function snd_rawmidi_info() static Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Fix a missing includeTakashi Iwai1-0/+1
Modules: ALSA Core Fix missing include <linux/device.h> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] rawmidi: adjust runtime->avail when changing output buffer sizeClemens Ladisch1-0/+1
Modules: RawMidi Midlevel When the output buffer size is changed, runtime->avail must be adjusted to the new size; otherwise, draining of a bigger buffer would appear to fail because avail does not reach buffer_size. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] dynamic minors (6/6): increase maximum number of sound cardsClemens Ladisch5-20/+43
Modules: ALSA Core,Memalloc module,ALSA sequencer With dynamic minor numbers, we can increase the number of sound cards. This requires that the sequencer client numbers of some kernel drivers are allocated dynamically, too. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] dynamic minors (5/6): reduce maximum number of MIDI devices per cardClemens Ladisch1-3/+3
Modules: ALSA sequencer,Generic drivers To allow increasing the maximum number of sound cards, we have to limit the number of sequencer clients per card because client numbers are still allocated statically. Reducing the number of clients to four limits the number of sequencer MIDI ports to 1024 per card. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] dynamic minors (4/6): dynamic minor number allocationClemens Ladisch2-19/+57
Modules: ALSA Core,ALSA Minor Numbers Add an option to allocate device file minor numbers dynamically. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] dynamic minors (3/6): store device-specific object pointers dynamicallyClemens Ladisch13-191/+266
Instead of storing the pointers to the device-specific structures in an array, put them into the struct snd_minor, and look them up dynamically. This makes the device type modules independent of the minor number encoding. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] dynamic minors (2/6): simplify storage of snd_minor structuresClemens Ladisch2-88/+48
Modules: ALSA Core Store the snd_minor structure pointers in one array instead of using a separate list for each card. This simplifies the mapping from device files to minor struct by removing the need to know about the encoding of the card number in the minor number. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] dynamic minors (1/6): store device type in struct snd_minorClemens Ladisch12-109/+102
Instead of a comment string, store the device type in the snd_minor structure. This makes snd_minor more flexible, and has the nice side effect that we don't need anymore to create a separate snd_minor template for registering a device but can pass the file_operations directly to snd_register_device(). Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] rawmidi: protect against invalid device number in ↵Clemens Ladisch1-0/+2
snd_rawmidi_info_select() Modules: RawMidi Midlevel In snd_rawmidi_info_select(), check that the device identified by the passed device number actually exists. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-01-03[ALSA] Fix possible races in timer callbacksTakashi Iwai1-2/+3
Fix possible races in timer callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Add error messagesTakashi Iwai6-16/+42
Add error messages in the critial error path to be more verbose. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] pcm - NULL check in snd_pcm_suspend*()Takashi Iwai1-0/+6
Modules: PCM Midlevel Add NULL check in snd_pcm_suspend*() so that the caller doesn't have to do it by itself. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Decentralize PM controlTakashi Iwai4-272/+3
Modules: ALSA Core,Control Midlevel,/oss/Makefile Remove the centralized PM control in the sound core. Each driver is responsible to get callbacks from bus/driver now. SND_GENERIC_DRIVER is removed together with this action. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: Sequencer OSS-emulationTakashi Iwai17-347/+340
Modules: ALSA<-OSS sequencer,ALSA sequencer Remove xxx_t typedefs from the core sequencer OSS-emulation codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: Instrument layerTakashi Iwai4-149/+149
Modules: Instrument layer Remove xxx_t typedefs from the core instrument layer codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: SequencerTakashi Iwai26-916/+1069
Modules: ALSA sequencer Remove xxx_t typedefs from the core sequencer codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: PCM OSS-emulationTakashi Iwai9-511/+524
Modules: ALSA<-OSS emulation Remove xxx_t typedefs from the core PCM OSS-emulation codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: Mixer OSS-emulationTakashi Iwai1-120/+120
Modules: ALSA<-OSS emulation Remove xxx_t typedefs from the core mixer OSS-emulation codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: OSS-emulationTakashi Iwai2-19/+22
Modules: ALSA Core Remove xxx_t typedefs from the core OSS-emulation codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: PCMTakashi Iwai7-645/+699
Modules: PCM Midlevel Remove xxx_t typedefs from the core PCM codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: Proc handlerTakashi Iwai1-55/+55
Modules: ALSA Core Remove xxx_t typedefs from the core proc handler codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: HwdepTakashi Iwai2-48/+57
Modules: HWDEP Midlevel Remove xxx_t typedefs from the core hwdep codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: Raw MIDITakashi Iwai2-145/+157
Modules: RawMidi Midlevel Remove xxx_t typedefs from the core raw MIDI codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: TimerTakashi Iwai3-196/+194
Modules: RTC timer driver,Timer Midlevel Remove xxx_t typedefs from the core timer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: ControlsTakashi Iwai2-161/+186
Modules: Control Midlevel Remove xxx_t typedefs from the core controls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Remove xxx_t typedefs: Core componentTakashi Iwai3-77/+83
Modules: ALSA Core Remove xxx_t typedefs from the core component. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03[ALSA] Use standard bitmap functionsTakashi Iwai5-113/+53
Modules: ALSA<-OSS emulation Use standard bitmap functions instead of in-house ones. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-22[PATCH] unpaged: fix sound Bad page statesHugh Dickins1-0/+2
Earlier I unifdefed PageCompound, so that snd_pcm_mmap_control_nopage and others can give out a 0-order component of a higher-order page, which won't be mistakenly freed when zap_pte_range unmaps it. But many Bad page states reported a PG_reserved was freed after all: I had missed that we need to say __GFP_COMP to get compound page behaviour. Some of these higher-order pages are allocated by snd_malloc_pages, some by snd_malloc_dev_pages; or if SBUS, by sbus_alloc_consistent - but that has no gfp arg, so add __GFP_COMP into its sparc32/64 implementations. I'm still rather puzzled that DRM seems not to need a similar change. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[DRIVER MODEL] Convert platform drivers to use struct platform_driverRussell King2-12/+13
This allows us to eliminate the casts in the drivers, and eventually remove the use of the device_driver function pointer methods for platform device drivers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-11-07[ALSA] Cleanup - remove sound/core/wrappers.cJaroslav Kysela1-40/+0
Signed-off-by: Jaroslav Kysela <perex@suse.de>
2005-11-04[ALSA] Fix a typo in the last fixTakashi Iwai1-1/+1
Modules: ALSA Core Fix a typo (bogus check) in the last patch to fix Oops with suspend/resume. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04[ALSA] fix improper CONFIG_SND_MAJOR usageClemens Ladisch3-16/+7
Modules: HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel,ALSA Core Replace usage of CONFIG_SND_MAJOR with snd_major, where appropriate. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-11-04[ALSA] clean up device types symbolsClemens Ladisch1-2/+2
Modules: ALSA Core,ALSA Minor Numbers Remove the unused and undefined symbols SNDRV_DEVICE_TYPE_{MIXER, PCM_PLOOP,PCM_CLOOP}, and introduce a new symbol SNDRV_MINOR_GLOBAL for non-card-specific devices like the sequencer or the timer. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-11-04[ALSA] Fix schedule_timeout usageNishanth Aravamudan3-12/+6
Use schedule_timeout_{,un}interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Also use human-time conversion functions instead of hard-coded division to avoid rounding issues. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04[ALSA] Add missing KERN_* prefixTakashi Iwai2-4/+8
Modules: ALSA<-OSS emulation,USB generic driver,USB USX2Y Added missing KERN_* prefix to printk. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04[ALSA] seq-timer: restrict timer frequenciesClemens Ladisch1-3/+17
Modules: ALSA sequencer When no default timer frequency has been set, initialize_timer() just uses the maximum frequency supported by the timer, which is ridiculously high on 96 kHz timers. This patch introduces a default frequency of 1000 Hz for this case, and makes sure that a frequency set by the user isn't too high. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-11-04[ALSA] timer: formatting changesClemens Ladisch1-112/+167
Modules: Timer Midlevel Split or rewrite lines that are longer than 80 characters, and remove whitespaces at the end of lines. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-11-04[ALSA] timer: remove list_entry() type castsClemens Ladisch1-21/+22
Modules: Timer Midlevel The return value of list_entry() already has the type from the second argument, so we don't need to typecase it again. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-11-04[ALSA] timers: add module refcounting for global timersClemens Ladisch2-4/+7
Modules: RTC timer driver,Timer Midlevel Add a module pointer to the timer structure and use it for refcounting instead of the card's module pointer to prevent the global timer modules (rtctimer and hpetimer) from being removed while in use. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-11-04[ALSA] timer: fix timer instance memory allocation checksClemens Ladisch1-18/+24
Modules: Timer Midlevel Add checks to return -ENOMEM in case snd_timer_instance_new() fails. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-11-04[ALSA] Remove kmalloc wrappersTakashi Iwai6-186/+4
Modules: ALSA Core Remove kmalloc wrappers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04[ALSA] Remove vmalloc wrapper, kfree_nocheck()Takashi Iwai4-67/+10
- Remove vmalloc wrapper - Add release_and_free_resource() to remove kfree_nocheck() from each driver and simplify the code Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04[ALSA] Make snd_task_name() module localTakashi Iwai3-12/+11
Modules: ALSA Core,ALSA<-OSS emulation Remove a global function snd_task_name(), and move it local to snd-pcm-oss module. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04[ALSA] Use getnstimeofday()Takashi Iwai3-14/+8
Modules: Documentation,PCM Midlevel,Timer Midlevel,ALSA Core Use the standard getnstimeofday() function instead of ALSA's own one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04[ALSA] Remove snd_runtime_check() macroTakashi Iwai8-36/+60
Remove snd_runtime_check() macro. This macro worsens the readability of codes. They should be either normal if() or removable asserts. Also, the assert displays stack-dump, instead of only the last caller pointer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-11-04[ALSA] sequencer: remove superfluous function parameterClemens Ladisch1-5/+4
Modules: ALSA sequencer Remove the last parameter of snd_seq_timer_set_tick_resolution() because it is always one. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-11-04[ALSA] rtctimer: optimize module parameter validationClemens Ladisch1-8/+3
Modules: RTC timer driver The check whether rtctimer_freq is a power of two can be done easier with a simple bit operation. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-11-04[ALSA] rtctimer: remove superfluous rtc_inc variableClemens Ladisch1-8/+1
Modules: RTC timer driver The rtc_inc variable is never used outside the interrupt handler, and is always one where it matters, so we can just remove it. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-10-31Merge master.kernel.org:/home/rmk/linux-2.6-drvmodelLinus Torvalds1-0/+2
Manual #include fixups for clashes - there may be some unnecessary
2005-10-29[PATCH] core remove PageReservedNick Piggin1-6/+3
Remove PageReserved() calls from core code by tightening VM_RESERVED handling in mm/ to cover PageReserved functionality. PageReserved special casing is removed from get_page and put_page. All setting and clearing of PageReserved is retained, and it is now flagged in the page_alloc checks to help ensure we don't introduce any refcount based freeing of Reserved pages. MAP_PRIVATE, PROT_WRITE of VM_RESERVED regions is tentatively being deprecated. We never completely handled it correctly anyway, and is be reintroduced in future if required (Hugh has a proof of concept). Once PageReserved() calls are removed from kernel/power/swsusp.c, and all arch/ and driver code, the Set and Clear calls, and the PG_reserved bit can be trivially removed. Last real user of PageReserved is swsusp, which uses PageReserved to determine whether a struct page points to valid memory or not. This still needs to be addressed (a generic page_is_ram() should work). A last caveat: the ZERO_PAGE is now refcounted and managed with rmap (and thus mapcounted and count towards shared rss). These writes to the struct page could cause excessive cacheline bouncing on big systems. There are a number of ways this could be addressed if it is an issue. Signed-off-by: Nick Piggin <npiggin@suse.de> Refcount bug fix for filemap_xip.c Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29Create platform_device.h to contain all the platform device details.Russell King1-0/+2
Convert everyone who uses platform_bus_type to include linux/platform_device.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28Merge ../bleed-2.6Greg KH4-7/+9
2005-10-28[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacksRussell King1-10/+4
In PM v1, all devices were called at SUSPEND_DISABLE level. Then all devices were called at SUSPEND_SAVE_STATE level, and finally SUSPEND_POWER_DOWN level. However, with PM v2, to maintain compatibility for platform devices, I arranged for the PM v2 suspend/resume callbacks to call the old PM v1 suspend/resume callbacks three times with each level in order so that existing drivers continued to work. Since this is obsolete infrastructure which is no longer necessary, we can remove it. Here's an (untested) patch to do exactly that. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] Driver Core: fix up all callers of class_device_create()Greg Kroah-Hartman1-1/+1
The previous patch adding the ability to nest struct class_device changed the paramaters to the call class_device_create(). This patch fixes up all in-kernel users of the function. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] gfp_t: soundAl Viro4-7/+9
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-24[PATCH] ALSA: Fix Oops of suspend/resume with generic driversTakashi Iwai1-2/+4
The patch fixes Oops from sound drivers using generic platform device but have no suspend/resume callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-08[PATCH] gfp flags annotations - part 1Al Viro4-8/+8
- added typedef unsigned int __nocast gfp_t; - replaced __nocast uses for gfp flags with gfp_t - it gives exactly the same warnings as far as sparse is concerned, doesn't change generated code (from gcc point of view we replaced unsigned int with typedef) and documents what's going on far better. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-12[ALSA] Replace with kzalloc() - seq stuffTakashi Iwai22-32/+32
ALSA sequencer,Instrument layer,ALSA<-OSS sequencer Replace kcalloc(1,..) with kzalloc(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12[ALSA] Replace with kzalloc() - core stuffTakashi Iwai14-46/+46
Control Midlevel,ALSA Core,HWDEP Midlevel,PCM Midlevel,RawMidi Midlevel Timer Midlevel,ALSA<-OSS emulation Replace kcalloc(1,..) with kzalloc(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12[ALSA] pcm-oss - Add bugg-yptr optionTakashi Iwai1-1/+7
Documentation,ALSA<-OSS emulation Added 'buggy-ptr' proc option to switch the behavior of GETOPTR ioctl. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12[ALSA] pci_find_device removeJiri Slaby1-1/+2
Memalloc module,CS46xx driver,VIA82xx driver,ALI5451 driver au88x0 driver Replace pci_find_device() with pci_get_device() and pci_dev_put(). Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12[ALSA] Fix DocBook warningsTakashi Iwai4-6/+124
PCM Midlevel,RawMidi Midlevel Fix DocBook warnings. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12[ALSA] rtctimer: add option to make RTC timer the default sequencer timerClemens Ladisch2-1/+19
ALSA Core,ALSA sequencer Add an option to make the RTC timer the default sequencer timer. This becomes necessary for precise MIDI timing when the system timer runs at less than 1000 Hz. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-09-12[ALSA] Introduce snd_card_set_generic_dev()Takashi Iwai3-86/+116
ALSA Core A new function snd_card_set_generic_dev() is introduced to add the 'generic device' support for devices without proper bus on sysfs. It's a last resort, and should be removed in future when they have a proper bus, instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-09-12[ALSA] sparse address space annotationsClemens Ladisch4-8/+18
ALSA Core,RawMidi Midlevel,ALSA<-OSS emulation,ALSA sequencer RME32 driver,RME96 driver,EMU10K1/EMU10K2 driver,NM256 driver Add sparse annotations where we do strange this with __iomem/__user pointers. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-09-07[PATCH] ALSA: convert kcalloc to kzallocPekka Enberg1-4/+10
This patch introduces a memory-leak tracking version of kzalloc for ALSA. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Jaroslav Kysela <perex@suse.cz> Signed-off-by: Jiri Slaby <xslaby@fi.muni.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-08-30[PATCH] Assign device pointer to OSS devicesTakashi Iwai1-2/+5
Add register_sound_special_device() function to allow assignment of device pointer to a specific OSS device for HAL. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30[ALSA] pcm - Fix zero-division in 32bit compat layerTakashi Iwai1-3/+8
PCM Midlevel Fixed zero-division bug in PCM 32bit compat layer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30[ALSA] Fix compilation without CONFIG_PROC_FSTakashi Iwai1-2/+1
Memalloc module Fix an error when built without CONFIG_PROC_FS. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30[ALSA] ALSA timer - fixed compilationJaroslav Kysela1-2/+2
Timer Midlevel Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-08-30[ALSA] Timer API - added SUSPEND/RESUME eventsJaroslav Kysela2-5/+11
PCM Midlevel,Timer Midlevel,ALSA Core - added SNDRV_TIMER_EVENT_SUSPEND / RESUME events - changed timer events from PAUSE / CONTINUE in PCM midlevel to SUSPEND / RESUME Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-08-30[ALSA] Fix PCM 32bit compat layerTakashi Iwai1-14/+28
PCM Midlevel Fixed the handling of boundary in PCM 32bit compat layer. Positions in hwsync are bound in the 32bit boundary size. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30[ALSA] make local objects staticClemens Ladisch3-5/+5
Memalloc module,PCM Midlevel,Timer Midlevel,GUS Library,AC97 Codec ALI5451 driver,RME9652 driver Make some functions/variables that are used in only one file static. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-08-30[ALSA] ALSA's struct _snd_pcm_substream: Obsolete open_flagKarsten Wiese3-16/+21
PCM Midlevel,ALSA<-OSS emulation,USB USX2Y This patch removes open_flag from struct _snd_pcm_substream. All of its uses are substituted by querying struct _snd_pcm_substream's member ffile instead. Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-30[ALSA] adds __init and in snd_memory_init()Henrik Kretzschmar1-1/+1
ALSA Core This patch adds the __init macro to snd_memory_init(). Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-08-23[PATCH] Kconfig fix (ISA_DMA_API and sound/*)Al Viro2-2/+2
fixed kconfig dependencies on ISA_DMA_API for parts of sound/* that rely on it. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-28[ALSA] sound/core Fix the sparse warning 'implicit cast to nocast type'Victor Fusco5-10/+14
Memalloc module,ALSA Core,Instrument layer Fix the sparse warning 'implicit cast to nocast type' File/Subsystem:sound/core Signed-off-by: Victor Fusco <victor@cetuc.puc-rio.br> Signed-off-by: Domen Puncer <domen@coderock.org> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-07-28[ALSA] seq-midi - silently ignore non-MIDI eventsClemens Ladisch1-10/+6
ALSA sequencer When non-MIDI sequencer events are sent to a RawMIDI port, silently ignore them instead of returning a confusing error code which may upset the sequencer and abort the current write() to /dev/snd/seq. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-07-28[ALSA] typo-fix and snd_assert()-expression-splitHenrik Kretzschmar1-2/+3
ALSA Core This patch corrects a typo in the kerneldocs of snd_info_get_str(). It also splits the expressions of snd_assert() in snd_info_unregister() into one-expression-per-call for better debugging. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-07-28[ALSA] Fix dependency of GUS driverTakashi Iwai1-1/+1
ALSA sequencer Add the missing snd-seq-midi-emul to SND_GUS_SYNTH list. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-07-28[ALSA] Fix two typos and changes on snd_assert()Henrik Kretzschmar1-6/+9
ALSA Core Both typos were in the kerneldocs. I splitted the snd_assert() calls in one-expression-per-call for better debugging. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-07-27[PATCH] clean up inline static vs static inlineJesper Juhl3-6/+6
`gcc -W' likes to complain if the static keyword is not at the beginning of the declaration. This patch fixes all remaining occurrences of "inline static" up with "static inline" in the entire kernel tree (140 occurrences in 47 files). While making this change I came across a few lines with trailing whitespace that I also fixed up, I have also added or removed a blank line or two here and there, but there are no functional changes in the patch. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-23[PATCH] create a kstrdup library functionPaulo Marques7-33/+25
This patch creates a new kstrdup library function and changes the "local" implementations in several places to use this function. Most of the changes come from the sound and net subsystems. The sound part had already been acknowledged by Takashi Iwai and the net part by David S. Miller. I left UML alone for now because I would need more time to read the code carefully before making changes there. Signed-off-by: Paulo Marques <pmarques@grupopie.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-22[ALSA] Add const prefixTakashi Iwai1-1/+1
Control Midlevel Add const prefix to snd_kcontrol_new_t pointer for better protection. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-06-22[ALSA] OSS PCM emulation - The 2nd final fix for SNDCTL_DSP_GETOPTR problemJaroslav Kysela1-4/+4
ALSA<-OSS emulation The problem was negative/wrong result (info.bytes) in a specific condition at playback startup. Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-06-22[ALSA] OSS PCM emulation - The final fix for SNDCTL_DSP_GETOPTR problemJaroslav Kysela1-2/+5
ALSA<-OSS emulation The problem was negative result (info.bytes) in a specific condition at playback startup. Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-06-22[ALSA] Fix races between PCM drain and other opsTakashi Iwai1-34/+36
PCM Midlevel Fix semaphore races between PCM drain and other ops. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-06-22[ALSA] Add write support to snd-page-alloc proc fileTakashi Iwai1-92/+109
Documentation,Memalloc module,RME HDSP driver,RME9652 driver Add the write support to snd-page-alloc proc file for buffer pre-allocation. Removed the pre-allocation codes via module options. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-06-22[ALSA] Remove redundant NULL checks before kfreeJesper Juhl3-28/+13
Timer Midlevel,ALSA sequencer,ALSA<-OSS sequencer,Digigram VX core I2C tea6330t,GUS Library,VIA82xx driver,VIA82xx-modem driver CA0106 driver,CS46xx driver,EMU10K1/EMU10K2 driver,YMFPCI driver Digigram VX Pocket driver,Common EMU synth,USB generic driver,USB USX2Y Checking a pointer for NULL before calling kfree() on it is redundant, kfree() deals with NULL pointers just fine. This patch removes such checks from sound/ This patch also makes another, but closely related, change. It avoids casting pointers about to be kfree()'ed. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-06-21Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.gitJaroslav Kysela1-3/+3
2005-06-20[PATCH] class: convert sound/* to use the new class api instead of class_simplegregkh@suse.de1-3/+3
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-05-29[ALSA] Fix compilation on 32bit archTakashi Iwai1-1/+10
ALSA<-OSS emulation Fix the division with int64 for 32bit architectures. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] alsa-oss - 2nd - improved readabilityJaroslav Kysela1-2/+2
ALSA<-OSS emulation Use 'long' for byte counters in snd_pcm_oss_bytes() snd_pcm_alsa_bytes(). Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-05-29[ALSA] alsa-oss - improve readability of snd_pcm_oss_bytes() functionJaroslav Kysela1-3/+3
ALSA<-OSS emulation Added bytes variable and do not use the frames argument as a temporaly storage for the byte counter. Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-05-29[ALSA] Reverted last patch for SNDCTL_DSP_GETOPTR fix & possible overflow fixJaroslav Kysela1-4/+3
ALSA<-OSS emulation This reverts the last patch which wrongly mixes bytes and frames. The real culprit might be the 32-bit overflow, so the return expression uses 64-bit values now in snd_pcm_oss_bytes(). Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-05-29[ALSA] pcm_oss - fix SNDCTL_DSP_GETOPTR not working correctlyRoger Mach1-2/+3
ALSA<-OSS emulation This patch changes snd_pcm_oss_bytes() by adding a local variable for the frames -> bytes conversion, which means that the frame count is no longer corrupted by this conversion. Signed-off-by: Roger Mach <bigmach@us.ibm.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-05-29[ALSA] Make docproc happyTakashi Iwai1-3/+3
PCM Midlevel Make docproc happy by moving '#if 0' before comments. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] sound/core/: possible cleanupsAdrian Bunk11-43/+42
PCM Midlevel,ALSA Core,Timer Midlevel,ALSA sequencer,Virtual Midi This patch contains the following possible cleanups: - make needlessly global code static - #if 0 the following unused global functions - remove the following unneeded EXPORT_SYMBOL's Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] Export missing snd_pcm_format_*()Takashi Iwai2-16/+1
PCM Midlevel Export snd_pcm_format_size(). This function is used by some out-of-kernel drivers. Make snd_pcm_format_cpu_endian() macro for optimization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] fixed PAUSE ioctl for user space interfaceJaroslav Kysela1-1/+1
Timer Midlevel - fixed traditional cut-n-paste error Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-05-29[ALSA] Change some timer ioctls due to conflictionTakashi Iwai2-0/+15
Timer Midlevel,ALSA Core Change values of some timer ioctls to avoid confliction with FIO* ioctls. The protocol version is increased to indicate this change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] Add missing PAUSE ioctlTakashi Iwai2-0/+13
Timer Midlevel Added the missing implemenation of TIMER PAUSE ioctl. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] Suppress debug messageTakashi Iwai1-1/+1
Control Midlevel Suppress 'unknown ioctl' debug message (replaced with snd_printdd). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] Fix capture on OSS emulationTakashi Iwai1-1/+2
ALSA<-OSS emulation Fix the noisy capture on some hardwares over OSS emulation. Change back to avail_min = period_size for capture direction. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] Fix permissions in some /proc filesTakashi Iwai2-0/+2
PCM Midlevel,CA0106 driver,EMU10K1/EMU10K2 driver Fix by Guillaume Chazarain <guichaz@yahoo.fr>: Some tunables in /proc have a write() function, but as their permission does not reflect it, it can be confusing to the user. So here is a patch that corrects the mode of those files. Note that I have only tested the 'xrun_debug' entry. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] virmidi - fix ioctl parameter passing when setting client nameClemens Ladisch1-1/+1
ALSA sequencer The last change to reduce stack usage did not adjust the parameter to SNDRV_SEQ_IOCTL_SET_CLIENT_IOCTL which resulted in passing the address of the pointer instead of the structure. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-05-29[ALSA] virmidi - fix ioctl parameter passing when creating seq portClemens Ladisch1-1/+1
ALSA sequencer The last change to reduce stack usage did not adjust the parameter to SNDRV_SEQ_IOCTL_CREATE_PORT which resulted in passing the address of the pointer instead of the structure. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2005-05-29[ALSA] timer - added tread semaphoreJaroslav Kysela1-20/+37
Timer Midlevel Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2005-05-29[ALSA] Fix memory leakTakashi Iwai1-0/+2
ALSA sequencer Fixed memory leak by the last change of stack reduction. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-05-29[ALSA] kill dead codeAdrian Bunk1-4/+1
ALSA<-OSS emulation The Coverity checker found this obviously dead code. I'm not sure which of the if (plugin == NULL) is correct - this patch removes the one that couldn't be true. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2005-04-16[PATCH] fix pm_message_t vs. u32 in alsaPavel Machek1-2/+2
I thought I'm done with fixing u32 vs. pm_message_t ... unfortunately that turned out not to be the case as Russel King pointed out. This fixes last few bits in alsa. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds95-0/+43314
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!