Commit graph

338 commits

Author SHA1 Message Date
Takashi Iwai
21888c5f50 Add config and plugin directory options to configure
Added --with-configdir and --with-plugindir options to configure
which specify the directories for config files and plugin objects
respectively.  The default paths when these options are not
specified are unchanged.
2007-05-03 20:55:54 +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
Takashi Iwai
8048321c76 More better fix for linked start/stop
Instead of link_fd, more generic callback link_slaves is introduced.
This is called for linking the slave streams as the source to the
given master stream.
2007-03-13 02:52:33 +01:00
Clemens Ladisch
f54f03bfc4 fix SNDERR() format strings/arguments 2007-02-12 13:45:57 +01:00
Jaroslav Kysela
1300e70573 more name hint interace updates
- add long card name to device description
- create empty PCM plugin to allow right hint description parsing
- reorder devices in alsa.conf
- make namehint more configurable (using default.namehint.showall switch)
- add two levels basic and exteded for hints to default configuration files
- do not show direct device aliases
- removed all known memory leaks
2006-10-12 14:34:23 +02:00
Jaroslav Kysela
13fdc41785 add snd_device_name_hint() function and initial implementation
- add snd_device_name_hint() and snd_device_name_free_hint() functions
- add snd_ctl_iface_conf_name() functions
- do not accept parameters for the plugin definition without @args section
- add defaults.pcm.dmix.card/device and dsnoop.card/device definitions
- add hints for HDA-Intel.conf, pcm/dmix.conf, pcm/dsnoop.conf and alsa.conf
- add test/namehint test utility
- doxygen related cleanups
2006-10-11 13:18:57 +02:00
Takashi Iwai
1827d9ccff Fix snd_pcm_open_noupdate() to refer alias
Fixed snd_pcm_open_noupdate() to refer alias.  This fixes the call like

	% aplay -Dplug:bah

where bah is an alias of a certain definition.
2006-10-04 17:32:22 +02:00
Jaroslav Kysela
91273c228f Fix examples for PCM API. Fix dogygen warnings. 2006-07-11 21:48:51 +02:00
Takashi Iwai
9984a0a4b4 Fix division-by-zero in snd_pcm_dump_hw_setup()
Fixed division-by-zero error in snd_pcm_dump_hw_setup().
2006-06-16 18:53:32 +02:00
Takashi Iwai
69dda2f660 Fix compilation with assert()
Fix the position of assert() after the variable declarations.
2006-04-10 18:31:39 +02:00
Takashi Iwai
1a9c520529 Fix PCM auto-start conditions
Fix the PCM auto-start conditions

- The capture stream should be started the PCM anyway before reads
- Fixed the endless poll() when the written size doesn't fit to the
  buffer size due to lack of auto-start
2006-03-24 14:51:24 +00:00
Takashi Iwai
912f0d5ddf Fix snd_pcm_write*() return values at start up
If an error occurs at starting the stream, snd_pcm_write*() should return
an error value instead of the size to be written.
2006-03-24 14:41:40 +00:00
Jaroslav Kysela
63207b3ad6 alsa-lib - added ENOTTY and ENODEV to pcm_errors section 2006-03-15 12:38:37 +00:00
Jaroslav Kysela
36eb137f69 alsa-lib - added pcm_errors section 2006-03-15 12:22:29 +00:00
Clemens Ladisch
8f61812f1c return ENODEV for disconnected devices
Return -ENODEV instead of -ENOTTY for disconnected devices.
2006-03-03 14:08:58 +00: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
Clemens Ladisch
45850439b3 Do not abort in snd_xxx_close() functions
Remove several memory leaks by not aborting prematurely from a
snd_xxx_close() function when some operation fails.
This can happen when a USB device was unplugged.
2006-02-27 09:54:57 +00:00
Jaroslav Kysela
59b598fac0 Fixed snd_pcm_set_params() error code 2006-02-01 06:34:43 +00:00
Jaroslav Kysela
937f396663 snd_pcm_set_params() - added workaround for vortex driver 2006-01-31 09:16:05 +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
Jaroslav Kysela
23f7e58fa1 implementation of pcm simple helper function
- snd_pcm_recovery()
- snd_pcm_set_params()
- snd_pcm_get_params()
2006-01-06 19:59:56 +00:00
Jaroslav Kysela
bdfbbed5ca pcm dump() routines update: use spaces to indent texts 2005-12-11 08:24:13 +00:00
Takashi Iwai
2f71b8753b Fix type-punning
Fixed compile warnings on the latest gcc about type-punning.
Removed unnecessary casts.
2005-09-29 19:11:50 +00:00
Jaroslav Kysela
4284d79212 PCM add missing pcm types - DSNOOP, IEC958, IOPLUG, EXTPLUG 2005-09-21 08:23:28 +00:00
Jaroslav Kysela
e38cf30629 pcm - Add SOFTVOL pcm type 2005-09-21 08:20:18 +00:00
Takashi Iwai
4272742a2b Fix compile warnings
Fix compile warnings regarding uninitialized variable.
2005-09-05 15:57:31 +00:00
Jaroslav Kysela
745062ee01 PCM API - handle EINTR from poll() in snd_pcm_wait() function 2005-08-24 14:13:47 +00:00
Takashi Iwai
ea77e08cc6 Misc fixes
Fixes of spots found via valgrind

- non-freed chunks after snd_config_get_ascii()
- zero-fill records (to make valgrind happy)
- compile warning fixes
2005-08-17 17:27:16 +00:00
Takashi Iwai
7a89e3bbca Fix compile warnings with gcc-4
Fixed compile warnings with gcc-4 about pointer signedness.
2005-06-28 10:24:44 +00:00
Takashi Iwai
aa5a4d1f1a Remove the check of start_threshold in sw_params
Removed the invalid check of start_threshold with period_size
in snd_pcm_sw_params().
2005-06-23 10:04:56 +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
4d7c53d280 Add snd_pcm_hw_params_get/set_export_buffer()
Add snd_pcm_hw_params_get/set_export_buffer() API functions.
They control to ensure the buffer export to other processes.
If this flag is set, the local buffer of a plugin is exported over IPC shm.
Otherwise the buffer can be handled only locally (no shm).

Also fixed Version file for 1.0.9.
2005-05-19 16:59:04 +00:00
Takashi Iwai
d5b9823447 Fix snd_pcm_wait() for multiple pollfd's
Fixed snd_pcm_wait() to handle multiple pollfd's.
2005-05-18 13:28:06 +00:00
Takashi Iwai
a6d3b9e4e0 Remove poll_ask callback
Removed poll_ask callbacks.
poll_ask function is merged to poll_descriptors callbacks.
2005-05-18 10:50:09 +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
Takashi Iwai
56b3974439 Show verbose errors for invalid sw_params
Show verbose errors (when $LIBASOUND_DEBUG is set) for some invalid sw_params.
2005-04-20 14:31:33 +00:00
Jaroslav Kysela
f65d9f3108 Added snd_pcm_hw_params_set_rate_resample function
- snd_pcm_hw_params_set_rate_resample()
- snd_pcm_hw_params_get_rate_resample()
2005-04-12 12:09:55 +00:00
Takashi Iwai
72ad0e9ae7 Fix more CPU hang-up bugs in dmix
- Fix CPU hang-up during snd_pcm_drain()
  A new internal function snd_pcm_wait_nocheck() to force to call poll().

- Clean up, fix status() callback of dmix
2005-04-11 10:03:28 +00:00
Takashi Iwai
5c91ee386d Check PCM format aliases
Check PCM format alias strings (e.g. "S16") as acceptable PCM formats.
2005-03-29 16:34:31 +00:00
Takashi Iwai
d8f7de1b16 Support dl-object cache
Added the support of dl-object caches for PCM plugins.
2005-02-14 15:09:09 +00:00
Jaroslav Kysela
a5831c7300 The stream linking problem for pcm_multi.c should be fixed now
- extended link_fd callback
- added snd_pcm_generic_link2()
- added _snd_pcm_link_descriptors()
2005-01-20 18:37:13 +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
340018db8a Fix a typo
Fixed a typo in comment by Kirill Smelkov <kirr@mns.spb.ru>
2005-01-13 17:28:11 +00:00
Takashi Iwai
30f35c1f7a Add softvol PCM plugin
The softvol PCM plugin is added.  It applies the software volume attenuation,
which may be useful for codecs without volume controls.

Currently, the control is only mono.  The attenuation is applied to all
channels equally.  The control is probed and automatically created
when not exists yet.
2004-12-27 14:40:19 +00:00
Clemens Ladisch
5c9ee5ef03 fix changed error message handling
In the last error message handling change, some error conditions
didn't get properly inverted.
2004-12-23 08:15:46 +00:00
Takashi Iwai
2b54677fdb Change error message handling
Change the handling of non-fatal errors.  Now the non-fatal error
messages are not shown in stderr and no assert() as default.  The
behavior can be changed with LIBASOUND_DEBUG environment variable.
2004-12-21 14:11:00 +00:00
Kirill Smelkov
0256e1e8c9 Fixed few typos in documentation.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
2004-12-08 19:22:42 +00:00
Jaroslav Kysela
2d7ca56e2a Return correct error in snd_pcm_wait() after snd_pcm_poll_descriptors() call 2004-11-12 20:27:31 +00:00
Jaroslav Kysela
b7e8f57314 Try to fix period_time/period_size problems for direct plugin slaves 2004-10-29 10:56:13 +00:00