Commit graph

2503 commits

Author SHA1 Message Date
Lennart Poettering
414f1d956f install gccmacro.h properly, drop unused core-def.h file
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2325 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:22:35 +00:00
Lennart Poettering
d7cc1f5a12 change pa_rtpoll_set_timer_absolute() to take a pa_usec_t instead of struct timeval
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2324 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:17:52 +00:00
Lennart Poettering
5816871117 save and restore errno in log functions
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2323 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:16:55 +00:00
Lennart Poettering
b93ea1840c minor reformat
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2322 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:16:25 +00:00
Lennart Poettering
4f99c431d0 check for $PULSE_INTERNAL before enabling padsp
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2321 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:15:49 +00:00
Lennart Poettering
18ad6f845e don't allow overwriting of callback pointers when we're already dead
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2320 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:15:08 +00:00
Lennart Poettering
b70edf77da port pa_sample_clamp() to liboil
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2319 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:13:53 +00:00
Lennart Poettering
9dd8f6ceb7 add new function pa_sample_clamp()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2318 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:09:03 +00:00
Lennart Poettering
264385aae4 strip CRLF line breaks from read CLI commands. This should fix the cli interface for people accessing it via telnet.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2317 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:06:15 +00:00
Lennart Poettering
f49df7a3b0 * Increase history set to 64 to simplify reduction of indexes
* Decrease memory consumption a bit by using bitfields for some bools
* Rework reduction code
* Drop an unnessacary counter
* Before adding a new entry to the history, try to figure out if we already have an existing entry with the same x value and replace that. This fixes a division by zero
* Fix up input x for all functions, according to the time offset


git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2316 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 19:04:42 +00:00
Lennart Poettering
563f4b63cd make check for $DISPLAY=="" more readable, pa_bool_tization
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2315 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 18:59:25 +00:00
Lennart Poettering
06a05bc66c a bit of pa_bool_t'ization
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2314 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 18:57:18 +00:00
Lennart Poettering
b12b8ee160 save errno before calling free()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2313 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-05-01 18:56:14 +00:00
Lennart Poettering
caf742a076 define minimal and maximal wakeup/sleep times; check for underrun condition only once during buffer fillup
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2312 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 23:22:51 +00:00
Lennart Poettering
5353cf45f5 fix size of requested_latency
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2311 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 19:55:04 +00:00
Lennart Poettering
067a68abf9 fix build for auxiliary modules
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2310 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 19:22:56 +00:00
Lennart Poettering
c8fc223fe9 add stripnul to build
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2309 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 18:56:19 +00:00
Lennart Poettering
76031df4a4 Big pile of interdependant changes:
* Fix a deadlock when an asyncq overflows and an RT thread needed to wait until space became available again while the main thread was waiting for a operation to complete and thus didn't free any new items. Now, if the asyncq overflows, queue those items temporarily, and return immediately. Then, when the queue becomes writable again, flush it.
* Modify pa_thread_mq_init() to also set up pa_rtpoll events properly for the MQ
* Some more pa_bool_t'ization
* Unify more common code between alsa-sink and alsa-source
* The upper limit for the tsched watermark is max_use minus one frame
* make module-alsa-source work
* make the alsa modules use pa_alsa_build_pollfd() now
* fix detection of dB scale for alsa-source


git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2308 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 18:26:48 +00:00
Lennart Poettering
a197644ea2 add new tool 'stripnul' which can be used to drop leading zeros from a file which is useful to do byte-by-byte comparison of what goes in and comes out of PA
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2307 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 18:19:45 +00:00
Lennart Poettering
f2dffb717d pa_bool_t'ization
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2306 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 18:17:17 +00:00
Lennart Poettering
0b183fbdc6 respect the resampler's maximum block size to avoid that we get kicked out of the memory pool due to resampling. actually drop data from the delay queue after we used it
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2305 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 18:14:25 +00:00
Lennart Poettering
998ed8ede1 add missing header definitions for last commit
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2304 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 18:13:11 +00:00
Lennart Poettering
3f57d3aab2 add new function pa_alsa_build_pollfd() to alsa-util to unify a bit more common code from the sink and the source
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2303 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 18:12:46 +00:00
Lennart Poettering
ed0af46e69 unify code that fixes up buffering metrics
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2302 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 18:11:57 +00:00
Lennart Poettering
af03dd4e4f drop a misplaced newline
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2301 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 18:11:14 +00:00
Lennart Poettering
3c8e83fb3e do not fix automatic buffer attrs anymore, the new protocol version doesn't need this anymore and it creates more problems than it solves. Also drop the initial timing info query. Correct programs shouldn't depend on it anyway
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2300 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-23 18:10:34 +00:00
Lennart Poettering
5e6aacdbe2 * don't increase tsched_watermark on underrun without limits
* fix the watermark when we change the latency
* fix latency measurement
* move rewinding code into its own function
* make use of new function pa_alsa_recover_from_poll() were applicable


git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2299 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 02:50:55 +00:00
Lennart Poettering
6b4b95beed show configure latency metrics
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2298 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 02:48:24 +00:00
Lennart Poettering
1adbe822b8 some beautification updates, show msec instead of usec everywhere
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2297 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 02:47:47 +00:00
Lennart Poettering
cdb077b6c0 if no timer was armed, we don't need to disarm it
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2296 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 02:47:05 +00:00
Lennart Poettering
4a1971a535 if no latency was configure for a sink/source, fill in the max latency automatically
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2295 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 02:46:19 +00:00
Lennart Poettering
69f6bdf155 add new function pa_alsa_recover_from_poll() to merge common core from module-alsa-sink and module-alsa-source
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2294 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 02:44:25 +00:00
Lennart Poettering
9a486efa5f implement --process-time
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2293 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 02:38:51 +00:00
Lennart Poettering
0d01c4350b make sure the client buffer has space for 2*minreq+tlength. Explain why
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2292 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 01:11:16 +00:00
Lennart Poettering
e16a1987a3 - Change meaning of special values of latency request: 0 -> "minimal latency, please"; (pa_usec_t)-1 -> "don't care"
- Remove "source" word from monitor source description
- Increase default tsched watermark to 20ms again
- For the first iteration after snd_pcm_start() halve the sleep time as workaround for USB devices with quick starts


git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2291 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 01:04:27 +00:00
Lennart Poettering
88227c41c1 properly initialize memblock->is_silence for imported memory blocks; make is_silence and read_only a bit field
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2290 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-22 00:52:31 +00:00
Lennart Poettering
5e7e827be5 improve dB volume calculation
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2289 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 23:57:44 +00:00
Lennart Poettering
ba6c0e17cf fix C++ compat
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2288 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 23:56:55 +00:00
Lennart Poettering
8181db182b initialize properties for ALSA sinks/sources more elaborately, re #277
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2287 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 21:50:57 +00:00
Lennart Poettering
c2c833c068 use the sink description instead of the name to choose the description for the monitor source
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2286 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 21:49:05 +00:00
Lennart Poettering
64e048cb1b drop a redundant pa_init_proplist(), properly set MEDIA_NAME property on stream, not on context
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2285 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 20:53:46 +00:00
Lennart Poettering
5971345e99 rename sink_input->rewind to process_rewind() and set_max_rewind to update_max_rewind()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2284 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 20:35:44 +00:00
Lennart Poettering
62e7bc17c4 Big pile of dependant changes:
* Change pa_memblockq to carry silence memchunk instead of memblock and adapt all users
* Add new call pa_sink_input_get_silence() to get the suitable silence block for a sink input
* Implement monitoring sources properly by adding a delay queue to even out rewinds
* Remove pa_{sink|source}_ping() becaused unnecessary these days and not used
* Fix naming of various rewind related functions. Downstream is now _request_rewind(), upstream is _process_rewind()
* Fix volume adjustments for a single stream in pa_sink_render()
* Properly handle prebuf-style buffer underruns in pa_sink_input
* Don't allow rewinding to more than the last underrun
* Rework default buffering metrics selection for native protocol
* New functions pa_memblockq_prebuf_active(), pa_memblockq_silence()
* add option "mixer_reset=" to module-alsa-sink
* Other cleanups


git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2283 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 20:16:55 +00:00
Lennart Poettering
7556ef5bfc maintain a global silence memblock cache
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2282 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 19:53:07 +00:00
Lennart Poettering
a0671aa8db fix for new location of gccmacro.h
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2281 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 19:52:05 +00:00
Lennart Poettering
d1d7a0749d we have not periodic timers anymore
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2280 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 19:51:08 +00:00
Lennart Poettering
33a35b6f2e update to recent changes of proplist api
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2279 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 19:50:42 +00:00
Lennart Poettering
33cb5897e1 split user supplied data in multiple memory blocks if necessary to fit in one mempool tile. If the caller supplied a free_cb and we use shm it's better to copy the data immediately to the shm region instead of keeping it around as user memblock
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2278 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 19:49:55 +00:00
Lennart Poettering
ed36f3129c increase the default pool size to 16MB because we now need to keep a lot more memory around due to glitch-free.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2277 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 19:46:43 +00:00
Lennart Poettering
03df08872d add lower boundary for artifical latencies
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2276 fefdeb5f-60dc-0310-8127-8f9354f1896f
2008-04-20 19:44:33 +00:00