Commit graph

162 commits

Author SHA1 Message Date
Takashi Iwai
91726ddf83 Fix the build with old glibc
The old systems don't support CLOCK_MONOTONIC although clock_gettime() API
itself exists.  This causes compile errors.
2008-03-07 14:35:25 +01:00
Jaroslav Kysela
2c1318803f Impemented snd_pcm_htimestamp() function. 2008-01-09 13:50:45 +01:00
Jaroslav Kysela
309a274454 Add support for monotonic timestamps 2008-01-09 11:13:34 +01:00
Takashi Iwai
679cea4125 Remove sleep_min and tick
The sleep_min and tick are removed features from the kernel.
This patch cleans the corresponding part in alsa-lib.
2008-01-08 18:36:18 +01:00
Takashi Iwai
cf15e49d84 Remove PCM xfer_align
The PCM xfer_align is a removed feature from the kernel.
This patch cleans up the corresponding part in alsa-lib.
2008-01-08 18:35:29 +01:00
Takashi Iwai
7dca3ab1ea Make local functions really local
Rename the local functions to snd1_* so that they won't be exported
out of alsa-lib.

Some functions are still kept because aserver requires them.  Sigh.
2007-11-30 18:26:13 +01:00
Takashi Iwai
72ede8a12d Set PCM name properly in empty and asym plugins
The PCM name isn't set properly on empty and asym plugins due to its call
of snd_pcm_open_slave().  Now a new function snd_pcm_open_named_slave()
is created and make snd_pcm_open_slave() an inline function calling the
new one with name=NULL.
2007-11-26 12:29:37 +01:00
Takashi Iwai
683c8bc4a2 Clean up using gettimestamp()
Introduce a new local function gettimestamp() to get the current timestamp.
2007-11-21 12:19:43 +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
4cdb17c601 Split mmap-emulation code from hw layer
Move out mmap-emulation code from hw layer to its own plugin.
This cleans up the mess in pcm_hw.c.
2007-07-11 17:44:09 +02:00
Takashi Iwai
36987b02c0 String array for default rate plugin list
Change the rate converter type to allow string arrays in addition to
a string.  When a string array is given, the rate plugin probes each
string and try to load the converter plugin in the order of the list.

For example, you can set
	defaults.pcm.rate_converter	[ "samplerate" "linear" ]
so that samplerate plugin is preferred to linear plugin if it's
installed.
2007-03-22 00:58:42 +01:00
Takashi Iwai
36cc1daad8 Remove _snd_pcm_link_descriptors() and more comments
Removed the obsoleted _snd_pcm_link_descriptors() from pcm_local.h.
Added more comments on multi plugin.
2007-03-13 10:44:28 +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
Takashi Iwai
eafb7ae5d8 Use O_APPEND mode with dmix & co plugins
Use O_APPEND mode (only if available) with dmix, dsnoop and dshare
plugins.  Using this mode, the plugin requires no resource server
any more.
2006-04-28 15:55:32 +02:00
Takashi Iwai
33d69ef33b Create rate converter plugin SDK
Created a new rate converter plugin SDK.
A rate converter can be replaced as an extra plugin now.
The default rate converter is a built-in linear converter.

You can find a sample external converter in alsa-plugins package.
2006-04-06 18:37:55 +02: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
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
Takashi Iwai
ffdb04c3ea Fix buffer allocation and mmap with plugins
Fixed the bug producing silent tones with some combinations of plugins.
The internal buffer handling is now better (cleaner) integrated with
snd_pcm_generic_*().
2005-09-02 16:36:40 +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
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
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
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
Jaroslav Kysela
eafb492512 - added SYNC_PTR ioctl support for pcm_hw plugin 2004-05-22 10:14:32 +00:00
Clemens Ladisch
4861d237e6 define SND_PCM_INFO_RESUME 2004-05-03 14:37:53 +00:00
Takashi Iwai
965222c3d9 fixed compile warnings. 2004-04-15 12:52:49 +00:00
Takashi Iwai
494f3e66e4 fixed the handling of EINTR in read/write.
EINTR can be returned during ACPI suspend/resume.
2004-04-15 12:22:26 +00:00
Jaroslav Kysela
7c201b510a - added poll_ask callback to mangle avail_min (rate_plugin as example)
- added mangling of avail_min to rate_plugin
- added poll_fd_count variable
- FIXME: move poll_revents callback to fast_ops
2004-03-17 11:48:14 +00:00
Jaroslav Kysela
131d6610fc Fixed file plugin - mmap access was broken and revents were not handled correctly 2004-02-08 10:19:52 +00:00
Takashi Iwai
08874160c8 - fixed the type punning (compilation warnings with the recent GCC). 2004-01-31 12:16:32 +00:00
Jaroslav Kysela
63c19961b9 Takashi: added shadow pcm to avoid problem with plug plugin and mmaped access 2003-08-08 09:06:41 +00:00
Jaroslav Kysela
573f85dc1d - added shm area manager code
- fixed parsing of period_size/buffer_size options for dmix, dsnoop and
  dshare plugins
2003-04-23 12:41:55 +00:00
Jaroslav Kysela
7b09000813 Removed snd_pcm_hwdiff() function 2003-02-22 17:53:01 +00:00
Jaroslav Kysela
2dab1dfbc3 Removed snd_pcm_hwptr().
Added snd_pcm_hwdiff() and snd_pcm_forward().
Returned the behaviour for snd_pcm_mmap_begin().
2003-02-22 17:19:02 +00:00
Jaroslav Kysela
fbd99fdec0 Added snd_pcm_hwptr() and enhanced snd_pcm_mmap_begin() for no xrun mode. 2003-02-22 10:19:53 +00:00
Jaroslav Kysela
b5316c86cc Fixed compilation problem for dmix (donot_close) 2003-02-12 11:49:47 +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
Jaroslav Kysela
3b6638e8ce More pcm params functions returns an error rather than do assert().
Some cleanups in refine.
Added more debug code to refine.
Improved dmix refine method.
2003-02-08 16:35:24 +00:00
Jaroslav Kysela
8720faaccb Cleanups in IPC stuff.
Cleanups in snd_pcm_close().
Added initial code for dmix plugin:
  - only skeleton, but all major problems should be solved
2003-02-04 14:48:51 +00:00
Takashi Iwai
1b41de0653 - fixed the rate selection in the plug layer:
the multiples of the given rate is chosen if available.
  the nearest rate is selected as usual if not available.
2003-01-27 11:34:50 +00:00
Jaroslav Kysela
0d7d11889d Added missing snd_dlclose() calls 2002-11-07 15:18:45 +00:00
Jaroslav Kysela
6979732fa5 Changed sw_params to follow hw_params (unify functions) 2002-10-19 19:09:46 +00:00
Jaroslav Kysela
8205a95376 Replaced snd_pcm_avail() with snd_pcm_hwsync() 2002-10-12 11:49:53 +00:00
Jaroslav Kysela
dac0626b9f Added snd_pcm_hw_params_current() function and clear() functions for structures 2002-10-12 10:38:43 +00:00
Jaroslav Kysela
e859cf2644 Implemented snd_pcm_avail() function.
More documentation updates for snd_pcm_avail_update() and snd_pcm_delay().
Updated behaviour of read/write functions (wait when buffer is full) to
follow kernel.
2002-10-11 18:39:24 +00:00
Takashi Iwai
25e41cf1e8 fixed the build without versioned symbols.
the rc4 symbols are defined as __ prefix, which are aliased in
pcm.h as well as the versioned symbol binary.
2002-10-10 11:01:18 +00:00
Jaroslav Kysela
f0e5677f29 Fixed mmap_xxxx_delay() to follow kernel code 2002-10-09 06:44:45 +00:00