Commit graph

50 commits

Author SHA1 Message Date
Takashi Iwai
5bf3b31cf1 Fix endianess with dmix plugin
Allow different endianess with the generic dmix code, mainly for
big-endian architectures.
2005-09-19 12:37:08 +00:00
Takashi Iwai
d45d5a1470 Don't return error if chown() fails
Don't take serious even if chown() fails in the creation of direct server.
It happens if a user doesn't belong to the group specified in the config.
2005-09-12 17:50:16 +00:00
Jaroslav Kysela
19284bd325 direct plugins - change group according ipc_gid for the socket file
This patch fixes problem when ipc_perm are 0660 and you want to share dmix
with more users in the specified group.
2005-09-08 06:48:30 +00:00
Takashi Iwai
e62ecc876a Workaround for crash with knotify
Workaround for crash with knotify and KDEMM.
2005-09-01 17:31:52 +00:00
Takashi Iwai
6f938b1cc3 Fix call of semctl IPC_RMID
semctl IPC_RMID removes all semaphore set, so we need to call this only once.
2005-08-29 17:07:41 +00:00
Jaroslav Kysela
f1acd7726c PCM direct plugins - handle EINTR in the resource server
The poll() call in the resource server for PCM direct plugins might be
interrupted with an signal. Handle the case gracefuly and don't exit
the server (which brings another problems - cannot connect to socket -
later).
2005-08-18 10:42:22 +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
Jaroslav Kysela
4bb0721a83 direct plugins - added graceful shutdown for the resource server
- direct plugins
  - added graceful shutdown for the resource server
  - fixed error paths (unclosed socket) in the make_local_socket() function
2005-08-17 14:00:32 +00:00
Jaroslav Kysela
bac9a7de83 direct plugins (dmix) - suspend/resume fixes
- this patch adds support for suspend & result for dmix and other
  direct plugins
- the timer detection / initialization (TREAD support) was redesigned and
  the check for proper driver version was moved to the timer_hw.c
2005-08-16 12:19:15 +00:00
Takashi Iwai
e80f80866f Fix direct plugins running on 32bit emulation with 64bit arch
Fix the problems of dmix/dsnoop/dshare plugins running on 32bit mode with
64bit biarch.
2005-08-12 15:53:02 +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
b69ab56881 Fix bugs in the last change of ipc_gid option
- Fix semaphore gid control
- Do semaphore discard for all semaphores (although currently defined as 1)
- Fix the wrong check of return value from shmctl
2005-05-30 17:56:12 +00:00
Jaroslav Kysela
4b7e3cff81 added ipc_gid for direct plugins 2005-05-30 10:13:54 +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
a3ae02d884 Fix semaphore deadlocks
- Fixed unbalanced semaphores (which may cause deadlock)
- Do semaphore-up before blocking calls for communication with the server
- Don't discard semaphores on the client side
- Open slave PCMs always in non-blocking mode to avoid blocking by semaphore
  with the secondary open
2005-05-23 08:56:48 +00:00
Takashi Iwai
4c6809bf30 Fix poll after XRUN with dmix
Fix the behavior of poll after XRUN with dmix plugin.
Poll should return immediately with an XRUN stream.
2005-05-23 08:48:46 +00:00
Takashi Iwai
4e1723f9a5 More strict permission for IPC shm and sem
Use more strict permission for IPC shm and sem, too.
The permission follows to the value of ipc_perm config option, as
default 0600.
2005-05-19 14:36:04 +00:00
Takashi Iwai
5227c7e170 Fix possible noises and optimization with dmix
dmix transfers data in asynchronously so that it doesn't write on the
last active period.  This will allow the arbitrary buffer size in
future, too.

The hwsync call to slave is removed from commit and hwsync callbacks.
This hack was added to fix the noisy output (typically on xmms/bmp)
but it doesn't happen any more.  Now the hwsync behavior is as same as
on 1.0.8 (i.e. hwsync is called only when slowptr option is set).
2005-05-19 14:14:04 +00:00
Takashi Iwai
51313cb2dd Remove pause and fix timer initialization in prepare
- Removed broken pause implementations.
- Fixed the timer initialization in prepare callback so that poll
  works again after prepare.
2005-05-17 09:28:29 +00:00
Takashi Iwai
48bff53b36 Check timer version for read-block workaround
Check the timer protocl version whether to use poll for a workaround
of read-block problems.
2005-05-15 14:48:19 +00:00
Takashi Iwai
1aaf4a50af Fix blocking during draining in dmix
Fix the blocking during draining in dmix plugin due to ioctl
conflicts (bug #1074).  This is a temporary workaround.
2005-05-15 13:54:00 +00:00
Takashi Iwai
467d69c5bc Fix CPU hog with combination of rate plugin
Fix CPU hog with some apps (e.g. artsd) when rate plugin is used
together with dmix (or possible hw).
2005-04-22 16:36:13 +00:00
Takashi Iwai
9a0f2817bb Fix timer read in non-TREAD mode
Fix timer read in non-TREAD mode.  (the struct is different.)
2005-04-15 09:22:48 +00:00
Takashi Iwai
bdabcb9679 Check timer protocol number for direct plugins
Check timer protocol number before enabling TREAD mode for direct plugins.
2005-04-14 15:29:06 +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
c915659538 Fix compile warning
Fix compile warning (forgot return 0).
2005-04-06 13:08:28 +00:00
Takashi Iwai
aa89f27de4 More fixes for 100% CPU hang with dmix
More fixes for 100% CPU hang-up problem with dmix.

- Clear timer queues properly when XRUN happens.
- Don't check XRUN when the stream isn't really running.
- Do hwsync properly for the delayed start state.
2005-04-05 15:50:15 +00:00
Takashi Iwai
dab2b58e0e Fix resume of dmix, dsnoop and dshare plugins
Fix the resume of dmix, dsnoop and dshare plugins.

[This replaces the timer mode with TREAD mode, and may trigger Oops
 with the older kernel...]
2005-03-15 11:39:51 +00:00
Takashi Iwai
71ee169307 Fix compile warning
Fixed compile warning with printf() and timeval sizes.
2005-01-19 13:43:25 +00:00
Takashi Iwai
8ac16f151c [ALSA-LIB] suppress PAUSE and RESUME for direct plugins
Direct plugins don't work well with PAUSE and RESUME.  The info
bits are cleared for these plugins to suppress these features.
2004-09-15 18:45:51 +00:00
Jaroslav Kysela
64a39728a2 Added early event extension to the timer API - and a fix for the direct plugins 2004-04-06 17:29:25 +00:00
Jaroslav Kysela
f5a5284c6d A next try to fix the snd_pcm_wait() behaviour with direct plugins 2004-03-24 08:50:01 +00:00
Jaroslav Kysela
84c40f4970 Michel Dänzer <michel@daenzer.net>
Apparently these changes from pcm_direct.c revisions 1.12 and 1.14 were
accidentally reverted in revision 1.15. Please reapply.
2004-03-05 18:36:19 +00:00
Takashi Iwai
d91948db49 - check the return value of malloc & co. 2004-02-25 11:24:29 +00:00
Takashi Iwai
3ade181c4f - added --with-tmpdir configure option.
the directory used for socket files of direct pcm plugins.
2004-02-09 17:04:09 +00:00
Takashi Iwai
072eb65902 Stephen Cook <siti_veni@lycos.com>:
- clean up the unnecessary declaration.
2004-01-26 15:55:09 +00:00
Jaroslav Kysela
b798d89c0f <atlka@pg.gda.pl>
- shm memory patch
- optimized a bit sample mixing routines in c and x_86 asm
2004-01-24 16:34:35 +00:00
Jaroslav Kysela
819a85fb2c Added sync_ptr callback 2004-01-23 13:04:43 +00:00
Jaroslav Kysela
c508b496b4 Fixed poll() behaviour for direct plugins, also added snd_pcm_hwsync() call to start callback 2004-01-21 19:21:11 +00:00
Jaroslav Kysela
0fc787b69e More better solution for close all handles in server_job() 2004-01-09 18:32:05 +00:00
Jaroslav Kysela
a8bed129d1 Close all file-descriptors in server_job() 2004-01-09 18:26:48 +00:00
Jaroslav Kysela
0545cf711d Maik Broemme <mbroemme@plusserver.de>
- added ipc_perm for dmix plugin
Jaroslav Kysela <perex@suse.cz>
- added ipc_perm for dsnoop and dshare plugins
- added ipc_perm to doc/asoundrc.txt
2003-12-07 09:30:47 +00:00
Jaroslav Kysela
5016a98e30 Use _exit() in server_job() 2003-10-17 13:53:06 +00:00
Jaroslav Kysela
4e8ad5ff88 Fixed problem with Xwindows (socket descriptors) 2003-10-17 07:38:38 +00:00
Jaroslav Kysela
95418afc67 Direct plugins update:
- moved more common code to pcm_direct.c
  - added missing initialization of some variables in hw_params
2003-09-02 10:32:33 +00:00
Jaroslav Kysela
c18c32b26c Kill the zombie process creation, use 'start' process to detach the server_job() from parent 2003-07-24 18:49:54 +00:00
Jaroslav Kysela
e03aaa1888 Added unlink of the communication socket name.
Added retry when the semaphore is lost (server is going down and removes
the global semaphore). Now the application creates a new direct server
automagically rather than the error return.
2003-07-15 19:15:10 +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
7470a5b9af dshare and dsnoop plugins are working now 2003-03-19 16:35:35 +00:00
Jaroslav Kysela
bc28eccdcd Extracted common code from dmix plugin.
Initial framework for dsnoop and dshare plugins.
2003-03-18 20:37:42 +00:00