Takashi Iwai
6e1bc68070
Minor clean up
...
Minor clean up.
2005-05-23 09:04:15 +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
dae58c0192
Add area synchronization in poll_rsync of rate plugin
...
Try to sync areas as much as possible in poll_rsync callback of rate plugin.
2005-05-23 09:01:31 +00:00
Takashi Iwai
67420b8882
Fix poll of dsnoop plugin
...
Fixed the poll behavior of dsnoop plugin after commit.
2005-05-23 08:58:04 +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
ddd9c29a0d
Fix dshare plugin codes
...
Modify dshare plugin codes to follow the recent change of dmix:
proper XRUN and poll handling, async data transfer.
2005-05-23 08:51:59 +00:00
Takashi Iwai
1661759351
Minor clean up of dmix codes
...
Minor clean up of dmix codes.
2005-05-23 08:49:58 +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
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
18053076e2
Fix generic channel_info callbacks
...
Fixed generic channel_info callbacks for many plugins.
The allocation of unnecessary internal buffers is avoided.
2005-05-19 16:50:24 +00:00
Takashi Iwai
d81d6940ca
Fix bugs in perm option
...
Fixed silly bugs in perm option.
2005-05-19 15:14:05 +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
13c7364997
Revert the shmget permission
...
Oops, a part of another patch was merged accidentally. Reverted.
2005-05-19 14:20:07 +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
1cd04dba82
Add perm option
...
Added "perm" option to file plugin to specify the file permission.
Changed the default permission to 0600.
2005-05-19 13:59:43 +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
e61d385993
Add protocl version check
...
- Added protocl version check. The caller of snd_pcm_{io|ext}plug_create()
must fill version field with SND_PCM_{IO|EXT}PLUG_VERSION beforehand.
- Added poll_descriptors and poll_descriptors_count callbacks for ioplug.
2005-05-18 10:47:52 +00:00
Takashi Iwai
97010dbfdb
Use snd_pcm_generic_t and its callbacks
...
Use snd_pcm_generic_t and its callbacks.
2005-05-18 10:46:03 +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
cf4f4bc9c4
Fix drain of dmix without data
...
Fixed the drain of dmix plugin without any data.
It should return immediately.
2005-05-17 15:36:18 +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
e76bbd74d7
Set up pcm->info properly
...
Set up pcm->info properly for ioplug according to the avaialbe callbacks.
2005-05-17 09:27:17 +00:00
Takashi Iwai
3092edabf2
Propagate pcm->info
...
Propate pcm->info bit flags from the slave PCM in refine.
This will fix the bug indicating bogus pause/resume capabilities.
2005-05-17 09:26:34 +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
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
3403d9e622
Fix partial commit in drain
...
Fix the partial commit in draining with rate plugin.
2005-05-13 12:37:25 +00:00
Takashi Iwai
3047f8fa5a
Fix possible problems of playback drain with rate plugin
...
Fixed the possible problems of playback drain with rate plugin
when partial data remains and not committed before.
2005-05-12 13:34:59 +00:00
Jaroslav Kysela
f658e3e148
remove broken *_step initialization (caused by previous Fedora 4 patch)
...
Thanks to Abramo for notice.
2005-05-10 07:05:47 +00:00
Jaroslav Kysela
412fb54e0d
Fedora 4 patch - gcc4 fixes
2005-05-06 14:09:17 +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
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
Takashi Iwai
0f0fea7450
Fix ATTRIBUTE_UNUSED
...
Remove invalid ATTRIBUTE_UNUSED and add it to necessary places.
2005-04-20 14:30:45 +00:00
Takashi Iwai
87ec7df91d
Read $LIBASOUND_DEBUG as integer
...
Read $LIBASOUND_DEBUG as integer, 1 = hw_params dump, 2 = assert.
2005-04-20 14:26:49 +00:00
Takashi Iwai
cac370de25
Fix segfault
...
Fix segfault (occuring when buffer/period sizes are aligned).
2005-04-19 16:11:26 +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
c9fbe951a9
Suppress verbose debug messages
...
Suppress verbose debug messages in hw_params_set[min|max|minmax] errors.
2005-04-14 15:27:47 +00:00
Takashi Iwai
b579a024db
Add verbose hw_params debugging
...
Added the verbose hw_params dump for debugging.
The verbose error message is shown with the current hw_params dump
when $LIBASOUND_DEBUG is set.
2005-04-14 14:22:13 +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
c915659538
Fix compile warning
...
Fix compile warning (forgot return 0).
2005-04-06 13:08:28 +00:00
Takashi Iwai
999609f7e0
Compile warning fixes
...
Trivial compile warning fixes.
2005-04-05 15:53:24 +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
e5b91844bf
Fix channel_info callbacks of hooks, file and plug plugins
...
Fixed channel_info callbacks of hooks, file and plug plugins (BTS #1034 ).
snd_pcm_generic_channel_info_slave() is added.
2005-04-05 15:48:01 +00:00
Takashi Iwai
1889920a43
Fix segfault with downsampling
...
Fix segfault in the initialization for downsampling.
2005-03-31 15:24:40 +00:00
Takashi Iwai
a0a440dcf4
Stop timer at XRUN
...
Stop PCM timer at XRUN.
2005-03-31 15:23:20 +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
9207804912
Generic architecture support
...
Support dmix on generic architectures without atomic operations but
using a semaphore to avoid concurrent accesses. This is less effective
than atomic operations but should work on every system.
2005-03-29 14:13:04 +00:00