10 Sep, 2009
1 commit
-
* topic/midi:
sound: rawmidi: disable active-sensing-on-close by default
sound: seq_oss_midi: remove magic numbers
sound: seq_midi: do not send MIDI reset when closing
seq-midi: always log message on output overrun
20 Jul, 2009
1 commit
-
When build SND_SEQUENCER in kernel then OSS sequencer(alsa_seq_oss_init)
is initialized before System (snd_seq_system_client_init) which leads to
memory leak :unreferenced object 0xf6b0e680 (size 256):
comm "swapper", pid 1, jiffies 4294670753
backtrace:
[] create_object+0x135/0x204
[] kmemleak_alloc+0x26/0x4c
[] kmem_cache_alloc+0x72/0xff
[] seq_create_client1+0x22/0x160
[] snd_seq_create_kernel_client+0x72/0xef
[] snd_seq_oss_create_client+0x86/0x142
[] alsa_seq_oss_init+0xf6/0x155
[] do_one_initcall+0x4f/0x111
[] kernel_init+0x115/0x166
[] kernel_thread_helper+0x7/0x10
[] 0xffffffff
unreferenced object 0xf688a580 (size 64):
comm "swapper", pid 1, jiffies 4294670753
backtrace:
[] create_object+0x135/0x204
[] kmemleak_alloc+0x26/0x4c
[] kmem_cache_alloc+0x72/0xff
[] snd_seq_pool_new+0x1c/0xb8
[] seq_create_client1+0x87/0x160
[] snd_seq_create_kernel_client+0x72/0xef
[] snd_seq_oss_create_client+0x86/0x142
[] alsa_seq_oss_init+0xf6/0x155
[] do_one_initcall+0x4f/0x111
[] kernel_init+0x115/0x166
[] kernel_thread_helper+0x7/0x10
[] 0xffffffff
unreferenced object 0xf6b0e480 (size 256):
comm "swapper", pid 1, jiffies 4294670754
backtrace:
[] create_object+0x135/0x204
[] kmemleak_alloc+0x26/0x4c
[] kmem_cache_alloc+0x72/0xff
[] snd_seq_create_port+0x51/0x21c
[] snd_seq_ioctl_create_port+0x57/0x13c
[] snd_seq_do_ioctl+0x4a/0x69
[] snd_seq_kernel_client_ctl+0x33/0x49
[] snd_seq_oss_create_client+0xf5/0x142
[] alsa_seq_oss_init+0xf6/0x155
[] do_one_initcall+0x4f/0x111
[] kernel_init+0x115/0x166
[] kernel_thread_helper+0x7/0x10
[] 0xffffffffThe correct order should be :
System (snd_seq_system_client_init) should be initialized before
OSS sequencer(alsa_seq_oss_init) which is equivalent to :1. insmod sound/core/seq/snd-seq-device.ko
2. insmod sound/core/seq/snd-seq.ko
3. insmod sound/core/seq/snd-seq-midi-event.ko
4. insmod sound/core/seq/oss/snd-seq-oss.koIncluding sound/core/seq/oss/Makefile after other seq modules
fixes the ordering and memory leak.Signed-off-by: Jaswinder Singh Rajput
Signed-off-by: Takashi Iwai
15 Jul, 2009
4 commits
-
Sending an Active Sensing message when closing a port can interfere with
the following data if the port is reopened and a note-on is sent before
the device's timeout has elapsed. Therefore, it is better to disable
this setting by default.Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
Instead of using magic numbers for the controlles sent when resetting
a port, use the symbols from asoundef.h.Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
Sending a MIDI reset message when closing a port is wrong because we
only want to shut the device up, not to reset all settings.
Furthermore, many devices ignore this message.Fortunately, the RawMIDI layer already shuts the device up, so we can
ignore this matter here.Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai -
It turns out that the main cause of output buffer overruns is not slow
drivers but applications that generate too many messages. Therefore, it
makes more sense to make that error message always visible, and to
rate-limit it.Signed-off-by: Clemens Ladisch
Signed-off-by: Takashi Iwai
22 Jun, 2009
2 commits
-
* topic/seq-midi-fix:
sound: seq_midi_event: fix decoding of (N)RPN events -
When decoding (N)RPN sequencer events into raw MIDI commands, the
extra_decode_xrpn() function had accidentally swapped the MSB and LSB
controller values of both the parameter number and the data value.Signed-off-by: Clemens Ladisch
Cc:
Signed-off-by: Takashi Iwai
29 May, 2009
1 commit
-
Instead of mangling the CONFIG_* variables in the makefiles over and
over, set a few helper variables in Kconfig.Signed-off-by: Michal Marek
Signed-off-by: Takashi Iwai
14 Apr, 2009
1 commit
-
Remove open-coded memdup_user().
Signed-off-by: Li Zefan
Signed-off-by: Takashi Iwai
05 Feb, 2009
1 commit
-
Signed-off-by: Takashi Iwai
25 Oct, 2008
1 commit
-
Added the hrtimer backend for ALSA timer interface.
It can be used for the sequencer timer source.Signed-off-by: Takashi Iwai
13 Aug, 2008
1 commit
-
Kill snd_assert() in sound/core/*, either removed or replaced with
if () with snd_BUG_ON().Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela
05 Aug, 2008
1 commit
-
snd_seq_oss_synth_make_info() incorrectly reports information
to userspace without first checking for the validity of the
device number, leading to possible information leak (CVE-2008-3272).Reported-By: Tobias Klein
Acked-and-tested-by: Takashi Iwai
Cc: stable@kernel.org
Signed-off-by: Willy Tarreau
Signed-off-by: Linus Torvalds
10 Jul, 2008
1 commit
-
A bunch of things in alsa depend on CONFIG_KMOD,
use CONFIG_MODULES instead where the dependency
is needed at all.Signed-off-by: Johannes Berg
Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela
24 Apr, 2008
1 commit
-
Removed invalid BUG() - the driver should handle the error case properly
rather than issuing BUG().Signed-off-by: Takashi Iwai
15 Feb, 2008
1 commit
-
The sound drivers and the pnpbios core test for current->root != NULL. This
test seems to be unnecessary since we always have rootfs mounted before
initializing the drivers.Signed-off-by: Jan Blunck
Acked-by: Christoph Hellwig
Cc: Bjorn Helgaas
Cc: Jaroslav Kysela
Acked-by: Takashi Iwai
Cc: Al Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Feb, 2008
3 commits
-
This header file exists only for some hacks to adapt alsa-driver
tree. It's useless for building in the kernel. Let's move a few
lines in it to sound/core.h and remove it.
With this patch, sound/driver.h isn't removed but has just a single
compile warning to include it. This should be really killed in
future.Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela -
sound/core/seq: move declarations of globally visible variables to proper headers
Signed-off-by: Marcin Ślusarz
Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela -
Remove sequencer instrument layer from the tree.
This mechanism hasn't been used much with the actual devices. The only
reasonable user was OPL3 loader, and now it was rewritten to use hwdep
instead. So, let's remove the rest of rotten codes.Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela
20 Oct, 2007
1 commit
-
Fix the various misspellings of "system", controller", "interrupt" and
"[un]necessary".Signed-off-by: Robert P. J. Day
Signed-off-by: Adrian Bunk
16 Oct, 2007
7 commits
-
Signed-off-by: Jaroslav Kysela
-
Replace schedule_timeout() with schedule_timeout_uninterruptible()
to avoid signals in loop.Signed-off-by: Rene Herman
Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela -
Check for a valid event type when encoding a system real-time message to
prevent the bytes F9 or FD resulting in an empty sequencer message.Signed-off-by: Clemens Ladisch
Signed-off-by: Jaroslav Kysela -
Reorganize the encoder logic to prevent status bytes that appear where
data bytes are expected from being interpreted as data bytes.Signed-off-by: Clemens Ladisch
Signed-off-by: Jaroslav Kysela -
Reset the event type after encoding a system message to prevent any
following data bytes from being interpreted as data for a running status
system message, which is not allowed in MIDI.Signed-off-by: Clemens Ladisch
Signed-off-by: Jaroslav Kysela -
Create a new state ST_INVALID for the encoder to prevent data bytes at
the beginning of a stream or after a sysex message being interpreted as
note-off parameters.Signed-off-by: Clemens Ladisch
Signed-off-by: Jaroslav Kysela -
This patch fixes:
1) a resource leak (CID: 1817)
2) various code cleanupsSigned-off-by: Eugene Teo
Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela
20 Jul, 2007
2 commits
-
Fixed the invalid use of schedule_timeout_interruptible() without
checking pending signals. Simply replaced with schedule_timeout().
Suggestions thanks to Jeff Garzik.Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela -
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).
Here is a short excerpt of the semantic patch performing
this transformation:@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);@@
expression E1,E2,E3;
@@- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Acked-by: Russell King
Cc: Bryan Wu
Acked-by: Jiri Slaby
Cc: Dave Airlie
Acked-by: Roland Dreier
Cc: Jiri Kosina
Acked-by: Dmitry Torokhov
Cc: Benjamin Herrenschmidt
Acked-by: Mauro Carvalho Chehab
Acked-by: Pierre Ossman
Cc: Jeff Garzik
Cc: "David S. Miller"
Acked-by: Greg KH
Cc: James Bottomley
Cc: "Antonino A. Daplas"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 May, 2007
1 commit
-
Remove includes of where it is not used/needed.
Suggested by Al Viro.Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).Signed-off-by: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Feb, 2007
1 commit
-
After Al Viro (finally) succeeded in removing the sched.h #include in module.h
recently, it makes sense again to remove other superfluous sched.h includes.
There are quite a lot of files which include it but don't actually need
anything defined in there. Presumably these includes were once needed for
macros that used to live in sched.h, but moved to other header files in the
course of cleaning it up.To ease the pain, this time I did not fiddle with any header files and only
removed #includes from .c-files, which tend to cause less trouble.Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
configs in arch/arm/configs on arm. I also checked that no new warnings were
introduced by the patch (actually, some warnings are removed that were emitted
by unnecessarily included header files).Signed-off-by: Tim Schmielau
Acked-by: Russell King
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Feb, 2007
1 commit
-
Many struct file_operations in the kernel can be "const". Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data. In addition it'll catch accidental writes at compile time to
these shared resources.Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Feb, 2007
2 commits
-
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
Signed-off-by: Jaroslav Kysela -
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
Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela
20 Dec, 2006
1 commit
-
Use the roundup macro instead of manual calculations.
Signed-off-by: Clemens Ladisch
Signed-off-by: Jaroslav Kysela
23 Sep, 2006
2 commits
-
Orignally proposed by Sam Revitch .
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
Signed-off-by: Jaroslav Kysela -
- 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
Signed-off-by: Jaroslav Kysela
03 Aug, 2006
1 commit
-
sound: Conversions from kmalloc+memset to k(c|z)alloc.
Signed-off-by: Panagiotis Issaris
Signed-off-by: Takashi Iwai
Signed-off-by: Jaroslav Kysela
04 Jul, 2006
1 commit
-
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
Cc: Ingo Molnar
Cc: Takashi Iwai
Cc: Jaroslav Kysela
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds