Commit graph

156 commits

Author SHA1 Message Date
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
c7e1676dcd Don't set PCM pointer at error in snd_pcm_hw_open()
snd_pcm_hw_open() may set a non-NULL to pcmp even if it returns an error.
Some codes like dmix expects it's NULL, and cause the double free().
2007-08-06 16:09:27 +02:00
Clemens Ladisch
fca29a6172 remove unused variables
Remove some unused variables that the compiler warned about.
2007-07-13 12:44:43 +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
845d9222b2 fix mmap emulation bug of recording doesn't work
From: Roy Huang <royhuang9@gmail.com>

Record doesn't work if enabling mmap emulation and rate conversion
needed, this patch fix this bug.
2007-07-05 12:15:16 +02: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
a2ee8e20e8 Fix 32/64bit problem with multi plugin
Fix the problems of multi plugin with 32bit apps on 64bit kernel.
The forward/backward of hw plugin are fixed, too.
2006-04-06 18:55:59 +02:00
Takashi Iwai
18a6132a66 Fix PCM without control/status mmap
Fix the update of appl_ptr via mmap_commit when control/status structs
are not mmapped (e.g. 32bit compatible mode on 64bit kernel).
2006-03-29 09:32:18 +00:00
Takashi Iwai
38a3aa096c Fix restoration of PCM open mode
The original PCM open mode was lost by the change of default non-blocking
open.  The patch fix the restoration of the original open mode.
2006-03-20 11:22:23 +00:00
Takashi Iwai
90112fff1e Add restriction parameters to pcm hw layer
Add restriction parameters to pcm hw layer.

The PCM hw has optional parameters, format, rate and channels, to restrict
the configuration.  This is useful for definition of surround slave PCMs,
for example.
2006-03-17 18:09:07 +00:00
Clemens Ladisch
09f598e57c allow changing of device directory path
Add configuration options to change the default device path from the
default /dev/snd.  This is useful for embedded systems that do not want
subdirectories in /dev.
2006-02-27 10:03:19 +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
Takashi Iwai
67868a886f Fix check of nonblock option
Fix the check of nonblock option for all hw layer.
Instead of passing in asound.conf, check the option in snd_pcm_hw_open()
so that the nonblock option is referred in the case of "type hw ..." style
definition, too.
2006-02-17 20:49:21 +00:00
Takashi Iwai
3d0e3e2517 Add "nonblock" option for hw layer
Added a new "nonblock" option for hw layer.  This controls the non-blocking
"open" mode as default.

This option is set to TRUE as the default configuration.  If the old behavior
is preferred, set "defaults.pcm.nonblock" to 0 in /etc/asound.conf.
2006-01-13 11:52:01 +00:00
Jaroslav Kysela
bdfbbed5ca pcm dump() routines update: use spaces to indent texts 2005-12-11 08:24:13 +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
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
10557ca6b9 Fix playback start with sync_ptr mode
Fix by Istvan Varadi <ivaradi@gmail.com>

- start the playback with snd_pcm_hw_start failed with -EPIPE, because
 some pointers were not updated. I attached a patch for alsa-lib 1.0.8,
 in which sync_ptr is called before SNDRV_PCM_IOCTL_START. It seems to
 solve the problem, though I don't know alsa-lib enough to be sure that
 this is the right solution...
2005-05-13 14:14:10 +00:00
Takashi Iwai
809e31561a Initialize structs for ioctls
Initialize the argument structs before calling ioctls to make
valgrind happy.
2005-02-24 20:57:56 +00:00
Takashi Iwai
f9b9015245 Fix resmgr support
Call normal open() before trying with res_open_device().
snd_open_device() is defined to do this procedure.
2005-02-11 16:35:24 +00:00
Takashi Iwai
77c925a71f Add resmgr support
Added the support for resmgr.  A new configure option --with-resmgr is added
to enable the resmgr support.
2005-01-26 10:50: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
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
Jaroslav Kysela
457b8777ab fix for capture for case when status/control structures are not mmaped 2004-11-16 16:03:01 +00:00
Jaroslav Kysela
6987a8555c appl_ptr sync fix when status/control structures are not mmaped
The prepare and reset ioctls can modify appl_ptr, thus the user space
must take modified appl_ptr from driver.
2004-11-16 15:05:49 +00:00
Jaroslav Kysela
090fa69b51 Added check_std_error to avoid extra verbosity 2004-09-28 10:54:05 +00:00
Jaroslav Kysela
509e30494f compilation fix 2004-05-24 18:44:04 +00:00
Jaroslav Kysela
eafb492512 - added SYNC_PTR ioctl support for pcm_hw plugin 2004-05-22 10:14:32 +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
0acc42d0d7 VERSION_MAX == 2.0.5 2004-03-05 08:05:21 +00:00
Jaroslav Kysela
62ad89e954 Fixed warning 2004-02-01 19:23:41 +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
68f5980103 Fixed fcntl() call 2003-05-04 20:07:30 +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
2459a6d1d1 Fixed tstamps for newer driver 2003-03-01 20:32:02 +00:00
Jaroslav Kysela
cf9e518d51 Timestamp update (struct timeval -> struct timespec). 2003-02-28 17:23:28 +00:00
Jaroslav Kysela
2950dbf725 A try to fix the errno mess 2003-02-23 20:00:07 +00:00
Jaroslav Kysela
0c72d7555a Use FORWARD ioctl 2003-02-23 19:48:08 +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
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
c7d58f398e Added rmask/cmask handling in refine 2003-02-08 09:26:43 +00:00
Jaroslav Kysela
073dff1ba1 Commented out FD_CLOEXEC fcntl() calls 2003-02-05 11:00:16 +00:00
Jaroslav Kysela
d4c27edb1c Fixed error paths in open 2003-02-04 16:40:47 +00:00