Commit graph

47 commits

Author SHA1 Message Date
Jaroslav Kysela
4fb83669ef pcm: ladspa - Use LFS calls (readdir64)
Continue the work in commit ba86ac55 ("conf: Use LFS calls when reading
config files") and fix the PCM LADSPA code, too.

Fixes: https://github.com/alsa-project/alsa-lib/pull/223
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2022-05-20 09:55:12 +02:00
Jaroslav Kysela
5b9041bced Change FSF address (Franklin Street)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2017-11-14 14:29:26 +01:00
Takashi Iwai
f07e9af7ee pcm: ladspa: Fix segfault due to a wrong channel reference
Because of a typo in referencing the input array in
snd_pcm_ladspa_allocate_memory(), ladpsa PCM plugin may cause a
segfault at prepare when input and and output channels are different:
 #0  0x00007ffff78623ef in snd_pcm_ladspa_allocate_memory (pcm=0x626fa0, pcm=0x626fa0, pcm=0x626fa0, ladspa=0x621ad0) at pcm_ladspa.c:753
 #1  snd_pcm_ladspa_init (pcm=0x626fa0) at pcm_ladspa.c:834
 #2  0x00007ffff7842946 in snd_pcm_plugin_prepare (pcm=0x626fa0) at pcm_plugin.c:171
 #3  0x00007ffff784290f in snd_pcm_plugin_prepare (pcm=0x62c760) at pcm_plugin.c:162
 #4  0x000000000040256a in ?? ()
 #5  0x00007ffff7222ec5 in __libc_start_main (main=0x401d80,a argc=4, argv=0x7fffffffde28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde18) at libc-start.c:287
 #6  0x0000000000402fdd in ?? ()

This patch corrects the wrong reference.

Reported-and-tested-by: Andreas Hartmann <mail@andreashartmann.eu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-02 11:55:36 +02:00
Takashi Iwai
65ff6fdafb pcm: Implement timestamp type handling in all plugins
Now all PCM plugins do support the proper timestamp type or pass it
over slaves.  The internal monotonic flag is dropped and replaced with
tstamp_type in all places.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-14 18:12:34 +02:00
Matthias Larisch
8dcce52ee0 pcm: ladspa: Delay LADSPA plugin activate call
Some LADSPA Plugins rely on connected control ports on activate call.
While this is not okay by spec, the spec also encourages the activate
call happening as late as possible.

Signed-off-by: Matthias Larisch <mail@matthias-larisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-04-03 12:02:03 +02:00
Olivier Langlois
670e228c69 minor malloc changes
replace malloc + memset with calloc since calloc may skip the memset if
returned memory comes directly from sbrk()

use malloc instead of malloc if first thing done with allocated memory is
to flip all bits to 1.

Signed-off-by: Olivier Langlois <olivier@trillion01.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-12-13 09:43:51 +01:00
Jaroslav Kysela
49dde08641 Reduce compilation warnings
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2012-10-30 13:09:10 +01:00
Takashi Iwai
3c4a22ea49 Implement the channel mapping API
Added new channel-mapping API functions.
Not all plugins are covered, especially the route, multi and external
plugins don't work yet.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11 11:34:50 +02:00
Julia Lawall
03aa1a57c9 src/pcm/pcm_ladspa.c: add missing free
Something that is allocated using calloc is not freed on some
error paths.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Suman Saha <sumsaha@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-22 12:49:54 +02:00
Jaroslav Kysela
3f589c9369 pcm - ladspa: fix small memory leak in snd_pcm_ladspa_free_instances()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-07-22 11:33:20 +02:00
Diego E. 'Flameeyes' Pettenò
8b14625cc3 Make all the PCM plugins ops structure constant.
This ensures they are emitted in .data.rel.ro rather than .data.rel,
which should make a nice difference when using prelink.

Signed-off-by: Diego E. 'Flameeyes' Pettenò <flameeyes@gmail.com>
2008-11-21 20:38:49 +01:00
Jaroslav Kysela
309a274454 Add support for monotonic timestamps 2008-01-09 11:13:34 +01:00
Jaroslav Kysela
d25e281230 Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz 2007-10-15 10:24:55 +02:00
Takashi Iwai
70e4ec9d08 Allow build without libdl and libpthread
Allow building alsa-lib without libdl and libpthread.
Added new options to configure, --with-libdl and --with-pthread.
2007-03-22 00:48:18 +01:00
Jaroslav Kysela
4a1cefd24d pcm_ladspa - fix none policy
In some configurations, channel samples were not copied correctly.
Also, fix memory leaks and remove extra end-of-line chars from SNDERR
strings.
2006-12-20 16:01:27 +01:00
Clemens Ladisch
4433248bf3 remove superfluous free() checks
free() correctly handles NULL pointers, so we can omit explicit checks
for that condition.
2006-02-27 09:58:32 +00:00
Takashi Iwai
eccc92a34d Fix infinite parse of recursive definitions
Fixed the infinite parse (and eventually segfault) of recursive definitions.
Also fixed the parse of a string slave PCM of direct plugins.
2006-01-30 14:41:51 +00:00
Nathan Kurz
d9cfe1e9ff pcm_ladspa - setup control outputs all times
It turned out that plugins that had control outputs were not being set
up properly if there was no corresponding "output" section.

Signed-off-by: Nathan Kurz <nate@verse.com>
2006-01-20 08:17:49 +00:00
Clemens Ladisch
9a8a3374a1 LADSPA plugin: fix compilation
Fix a typo in the LADSPA plugin.
2006-01-19 08:23:22 +00:00
Jaroslav Kysela
48d731debf pcm laspa plugin - Added credits to MediaNet AG 2006-01-16 19:01:13 +00:00
Jaroslav Kysela
aa21cf4d7c ladspa plugin - SIGSEGV fix when label is not specified 2005-12-13 14:25:13 +00:00
Jaroslav Kysela
1f231e2e1a big ALSA LADSPA plugin rewrite for multiple channel LADSPA plugins
This is major rewrite of the LADSPA plugin to satisfy requirements for
the LADSPA plugins with multiple audio inputs and / or outputs.
2005-12-13 14:08:58 +00:00
Jaroslav Kysela
bdfbbed5ca pcm dump() routines update: use spaces to indent texts 2005-12-11 08:24:13 +00:00
Jaroslav Kysela
1439c2be86 pcm_ladspa plugin - more verbose output
Added more verbose output for dump() callback inspired with bug#1554 .
2005-12-05 15:20:28 +00:00
Takashi Iwai
d9680921a9 Use snd_user_file() in pcm_ladpsa.c
Use snd_user_file() in pcm_ladpsa.c to get rid of wordexp.
2005-11-29 15:20:07 +00:00
Jaroslav Kysela
64e9372874 pcm_ladspa - fix locale issues
See bug#1553 for more details.
2005-11-14 09:50:29 +00:00
Takashi Iwai
087184b0f9 Fix doxygen documents
Fix the warnings of doxygen parsing.
Add some missing documentation.
2005-05-24 14:14:28 +00:00
Takashi Iwai
dd37bb20ee Move poll_* callbacks to fast_ops
Moved poll_* callbacks to fast_ops.
These callbacks may be called frequently indeed.
2005-05-23 09:03:16 +00:00
Takashi Iwai
842b573424 Add poll_descriptors and poll_descriptors_count callbacks
Added poll_descriptors and poll_descriptors_count callbacks for multiple
poll_fd's.
2005-05-18 10:45:06 +00:00
Jaroslav Kysela
836987aa99 improved stream linking and plugin code cleanups
- added link/unlink/link_fd fast_ops callbacks
- moved code from snd_pcm_link to pcm_hw.c
- moved "empty" routines pointing to slave to pcm_generic.c
- introduced snd_pcm_generic_t
2005-01-20 15:07:51 +00:00
Takashi Iwai
01f217d581 fixed debug messages by Erik Inge Bolso. 2004-05-04 15:54:01 +00:00
Takashi Iwai
d91948db49 - check the return value of malloc & co. 2004-02-25 11:24:29 +00:00
Takashi Iwai
7716fd1e3d fixes by Art Haas <ahaas@airmail.net>:
rewritten with C99 struct initialization style.
2003-07-25 17:02:00 +00:00
Jaroslav Kysela
3298a54dbd One more fix to dlsym 2003-06-14 07:38:28 +00:00
Jaroslav Kysela
8bf6c1e5e6 Do not use snd_dl*() functions, dev->activate can be NULL 2003-06-14 07:31:54 +00:00
Jaroslav Kysela
af89cefd99 More changes for dmix plugin:
- added poll_events to main pcm structure
  - added poll_revents callback to pcm->ops structure
  - fixed snd_pcm_wait() - call revents function and enhanced
    error code reporting
DMIX plugin:
  - more complete code (works at least for one instance)
  - still no "mix" code (it's silent)
2003-02-11 18:14:43 +00:00
Takashi Iwai
2dc8cba51c fixed dlopen & co. for hook, ladspa and meter types. 2003-01-20 17:15:54 +00:00
Jaroslav Kysela
c941c548f8 Moved ring buffer pointers and added a mechanism to transfer them via shm 2002-04-23 15:51:29 +00:00
Jaroslav Kysela
e128bf856e Cleaned the mmap_commit implementations in plugins.
Added undo callbacks for snd_pcm_plugin based plugins.
  - helpers when mmap_commit proceed only a partial transfer
Fixes to avail_update implementation in pcm_hw.c.
2002-02-21 15:01:34 +00:00
Jaroslav Kysela
2cc79806a2 Added description of shm, null and rate plugins 2002-01-22 14:27:25 +00:00
Jaroslav Kysela
a24b602f28 Added initial comments for PCM plugins 2002-01-16 16:42:40 +00:00
Jaroslav Kysela
3e3df2d32b Updated GNU GPL license (address).
Changed GNU LGPL licence from 2.0 to 2.1.
2001-12-30 09:22:54 +00:00
Jaroslav Kysela
75911f89a7 Initial working code 2001-12-07 17:16:30 +00:00
Jaroslav Kysela
23ab0b3509 Added more code.. Still unfinished 2001-11-30 17:15:30 +00:00
Jaroslav Kysela
095cbbb467 Finished lfloat plugin.
Added code to plug plugin to handle linear float / integer conversions.
2001-11-27 14:24:44 +00:00
Jaroslav Kysela
dcc691073e Added more configuration parsing code, seems working now, but the plugin engine is not written yet (I should write float<->linear conversion plugin at first) 2001-11-26 15:28:27 +00:00
Jaroslav Kysela
26c3afa171 Added LADSPA plugin (only framework, no implementation yet) 2001-11-25 09:55:53 +00:00