aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-02-09[ALSA] Fix possible deadlocks in sequencer at removal of portsTakashi Iwai1-1/+1
Fix possible rwsem deadlocks in sequencer code at removal of sequencer ports. The list_lock of port group can be double locked. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09[ALSA] alsa core: convert to list_for_each_entry*Johannes Berg4-59/+33
This patch converts most uses of list_for_each to list_for_each_entry all across alsa. In some place apparently an item can be on a list with different pointers so of course that isn't compatible with list_for_each, I therefore didn't touch those places. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-12-20[ALSA] use the roundup macroClemens Ladisch1-1/+1
Use the roundup macro instead of manual calculations. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] Unregister device files at disconnectionTakashi Iwai1-11/+0
Orignally proposed by Sam Revitch <sam.revitch@gmail.com>. Unregister device files at disconnection to avoid the futher accesses. Also, the dev_unregister callback is removed and replaced with the combination of disconnect + free. A new function snd_card_free_when_closed() is introduced, which is used in USB disconnect callback. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-09-23[ALSA] Fix disconnection of proc interfaceTakashi Iwai3-6/+5
- Add the linked list to each proc entry to enable a single-shot disconnection (unregister) - Deprecate snd_info_unregister(), use snd_info_free_entry() - Removed NULL checks of snd_info_free_entry() Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-08-03[ALSA] Conversions from kmalloc+memset to k(z|c)allocPanagiotis Issaris1-2/+1
sound: Conversions from kmalloc+memset to k(c|z)alloc. Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-07-03[PATCH] lockdep: annotate sound/core/seq/seq_device.cArjan van de Ven1-0/+6
The ops structure has complex locking rules, where not all ops are equal, some are subordinate on others for some complex sound cards. This requires for lockdep checking that each individual reg_mutex is considered in separation for its locking rules. Has no effect on non-lockdep kernels. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: 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-07-03[PATCH] lockdep: annotate sound/core/seq/seq_ports.cIngo Molnar1-2/+2
Teach special (recursive) locking code to the lock validator. Has no effect on non-lockdep kernels. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Cc: 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-06-28[ALSA] Fix misuse of __list_add() in seq_ports.cTakashi Iwai1-4/+2
seq_ports.c::snd_seq_delete_all_ports() uses __list_add() to replace the whole list entries. This results in BUG() with recent FC5 kernel due to a sanity check in __list_add(). The patch fixes this misue of __list_add() by using standard macros instead (although a bit more code is needed). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2006-06-26spelling fixesAndreas Mohr1-1/+1
acquired (aquired) contiguous (contigious) successful (succesful, succesfull) surprise (suprise) whether (weather) some other misspellings Signed-off-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-22[ALSA] Remove nested mutexes in seq_ports.cTakashi Iwai1-2/+0
Removed nested mutexes in the removal routine of port connections. The port is guaranteed to be offline before calling it, so no mutex is needed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22[ALSA] Remove zero-initialization of static variablesTakashi Iwai2-2/+2
Removed zero-initializations of static variables. A tiny optimization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22[ALSA] rawmidi: add get_port_info callback for sequencer information flagsClemens Ladisch1-0/+3
Add a get_port_info callback to the snd_rawmidi_global_ops structure to allow the USB MIDI driver to supply information flags for the sequencer ports created by seq_midi. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-06-22[ALSA] add more sequencer port type information bitsClemens Ladisch3-3/+9
Add four new information flags SNDRV_SEQ_PORT_TYPE_HARDWARE, _SOFTWARE, _SYNTHESIZER, _PORT for sequencer ports. This makes it easier for apps like Rosegarden to make policy decisions based on the port type. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-06-22[ALSA] Remove unneeded read/write_size fields in proc text opsTakashi Iwai3-8/+5
Remove unneeded read/write_size fields in proc text ops. snd_info_set_text_ops() is fixed, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22[ALSA] Clean up EXPORT_SYMBOL()s in snd-seq moduleTakashi Iwai5-22/+20
Move EXPORT_SYMBOL()s to places adjacent to functions/variables. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-06-22[ALSA] Change seq_midi.c so client name is card, rather than port, specificAlan Horstmann1-2/+2
Change snd_seq_midisynth_register_port() in seq_midi.c so that if a new client is created, the client name string is based on card->shortname not (port-specific) info->name. Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2006-03-22[ALSA] Fix seq_clientmgr dereferences before NULL checkEugene Teo1-2/+1
Modules: ALSA sequencer cptr->pool must be non-NULL there, so just the if (cptr->pool) is superfluous. Thanks Takashi. Signed-off-by: Eugene Teo <eugene.teo@eugeneteo.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22[ALSA] Fix sleep in atomic in virmidi driverTakashi Iwai1-2/+2
Modules: ALSA sequencer Debug: sleeping function called from invalid context at /usr/src/linux/include/linux/rwsem.h:43 in_atomic():1, irqs_disabled():0 [<f999d15e>] snd_seq_deliver_event+0xb4/0x1a8 [snd_seq] [<f999d2be>] snd_seq_kernel_client_dispatch+0x6c/0x7c [snd_seq] [<f93321fc>] snd_virmidi_output_trigger+0xca/0xe5 [snd_seq_virmidi] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-03-22[ALSA] semaphore -> mutex (core part)Ingo Molnar9-83/+85
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. 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 Sorensen1-4/+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-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] Optimize for config without PROC_FS (seq and oss parts)Takashi Iwai11-21/+40
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] dynamic minors (6/6): increase maximum number of sound cardsClemens Ladisch1-6/+25
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 (3/6): store device-specific object pointers dynamicallyClemens Ladisch3-5/+11
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 (1/6): store device type in struct snd_minorClemens Ladisch2-15/+4
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] 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>
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] 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] Remove snd_runtime_check() macroTakashi Iwai1-2/+0
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-10-28[PATCH] gfp_t: soundAl Viro3-5/+7
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-08[PATCH] gfp flags annotations - part 1Al Viro1-1/+1
- 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] rtctimer: add option to make RTC timer the default sequencer timerClemens Ladisch1-1/+7
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] sparse address space annotationsClemens Ladisch1-2/+5
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-07-28[ALSA] sound/core Fix the sparse warning 'implicit cast to nocast type'Victor Fusco2-4/+7
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] 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-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-22[ALSA] Remove redundant NULL checks before kfreeJesper Juhl2-20/+9
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-05-29[ALSA] sound/core/: possible cleanupsAdrian Bunk6-9/+10
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] 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>