Lennart Poettering [Thu, 14 Jun 2007 17:06:11 +0000 (17:06 +0000)]
Make debug message more useful
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1477
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Thu, 14 Jun 2007 17:01:01 +0000 (17:01 +0000)]
Move a few things between the threads
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1476
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Thu, 14 Jun 2007 16:53:40 +0000 (16:53 +0000)]
trivial cleanups
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1475
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 13 Jun 2007 22:08:14 +0000 (22:08 +0000)]
A lot of more work to get the lock-free stuff in place
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1474
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Mon, 11 Jun 2007 13:53:31 +0000 (13:53 +0000)]
make untabify
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1472
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Mon, 11 Jun 2007 13:53:16 +0000 (13:53 +0000)]
Add new untabify makefile target
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1471
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Mon, 11 Jun 2007 12:17:40 +0000 (12:17 +0000)]
make eolspace
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1470
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Mon, 11 Jun 2007 12:08:37 +0000 (12:08 +0000)]
Merge HUGE set of changes temporarily into a branch, to allow me to move them from one machine to another (lock-free and stuff)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1469
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Mon, 11 Jun 2007 12:00:02 +0000 (12:00 +0000)]
add a new private branch
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1468
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 11 Jun 2007 11:22:30 +0000 (11:22 +0000)]
Support stat() and friends as some programs (audacity) likes to check if
the device node is there first.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1467
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 4 Jun 2007 09:52:03 +0000 (09:52 +0000)]
Add support for the poorly documented SNDCTL_DSP_GETTRIGGER.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1466
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Tue, 29 May 2007 17:24:48 +0000 (17:24 +0000)]
Kill spaces on EOL
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1465
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Tue, 29 May 2007 17:16:24 +0000 (17:16 +0000)]
add target "eolspace" to makefil to remove trailing newlines from all source files
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1464
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Tue, 29 May 2007 07:47:02 +0000 (07:47 +0000)]
We now use gid unconditionally, so make sure it's defined.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1463
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Mon, 28 May 2007 15:52:13 +0000 (15:52 +0000)]
build fix for systems lacking capability suppoort. (Problem identified and original patch supplied by Diego Petteno
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1462
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sun, 27 May 2007 20:58:29 +0000 (20:58 +0000)]
Bump revision of libs and package
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1460
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sun, 27 May 2007 20:38:14 +0000 (20:38 +0000)]
Replace AO_xxx usage with pa_atomic_xxx and friends wherever it makes sense
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1459
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sun, 27 May 2007 16:59:34 +0000 (16:59 +0000)]
unfortunately we cannot detect if a foreign thread is still running. Thus sucks. But what can we do? U. Drepper thinks our use case is invalid.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1458
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sun, 27 May 2007 16:37:05 +0000 (16:37 +0000)]
Minor optimization: read log level character code from array
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1457
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 26 May 2007 23:39:33 +0000 (23:39 +0000)]
Add a new meta command ".ifexists" to the CLI language, to execute commands only if a specified file exists. Original patch from cjvdb. Closes #36
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1456
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Fri, 25 May 2007 20:35:30 +0000 (20:35 +0000)]
when called with the setid bit change euid to uid sooner to make sure that we can access our own files even when we dropped most capabilities. (Closes #21)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1455
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Fri, 25 May 2007 20:24:55 +0000 (20:24 +0000)]
fix suid Makefile target
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1454
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 23:38:28 +0000 (23:38 +0000)]
only browse for ipv4 pa servers for now. Needs better fixing which however is not trivial and probably breaks the API
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1453
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 17:24:06 +0000 (17:24 +0000)]
Fix another DoS vulnerability that has been identified by Luigi Auriemma. (Finally closes #67)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1452
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 17:12:07 +0000 (17:12 +0000)]
add a missing initialization that causes a crash when parsing invalid volume restoration tables (Problem identified by Luigi Auriemma, re #67)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1451
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 16:59:03 +0000 (16:59 +0000)]
Fix a DoS with allocating overly large silence buffers. (Identified by Luigi Auriemma (re #67)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1450
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 16:57:35 +0000 (16:57 +0000)]
don't allow excessively high sample rates
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1449
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 16:42:26 +0000 (16:42 +0000)]
Fix yet another DoS vulnerability, also identified Luigi Auriemma (re #67)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1448
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 16:30:57 +0000 (16:30 +0000)]
fix minor typo
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1447
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 16:29:18 +0000 (16:29 +0000)]
Fix another DoS vulnerability, also identified Luigi Auriemma (closes #67)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1446
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 16:24:54 +0000 (16:24 +0000)]
fix a DoS vulnerability (re #67), originally identified by Luigi Auriemma
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1445
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 15:30:34 +0000 (15:30 +0000)]
fix a few obvious copynpaste errors when handling volumes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1444
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 12:32:37 +0000 (12:32 +0000)]
Treat empty :0.0 identically to unset :0.0 when trying to find a PA server. (Closes #87)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1443
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 23 May 2007 01:02:06 +0000 (01:02 +0000)]
Fix module-oss for devices that return EAGAIN when we don't expect it. (Closes #66)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1442
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Tue, 22 May 2007 23:39:47 +0000 (23:39 +0000)]
show socket directory when we fail to create it. (Closes #85)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1441
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Tue, 22 May 2007 23:38:22 +0000 (23:38 +0000)]
Fix build and only load OSS xor ALSA modules if both are available
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1440
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Tue, 22 May 2007 23:37:27 +0000 (23:37 +0000)]
drop unused variable
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1439
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Tue, 22 May 2007 23:08:34 +0000 (23:08 +0000)]
fix comment
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1438
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Wed, 7 Mar 2007 09:27:30 +0000 (09:27 +0000)]
Add support for SNDCTL_DSP_SETTRIGGER. (closes #56)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1437
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Tue, 6 Mar 2007 15:47:11 +0000 (15:47 +0000)]
Fix some instances where we printed a string without first checking that
the pointer was valid.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1436
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Tue, 6 Mar 2007 13:42:30 +0000 (13:42 +0000)]
Pulsecore should be linked into all modules.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1435
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Tue, 6 Mar 2007 13:31:29 +0000 (13:31 +0000)]
Don't fail if hal doesn't currently contain any devices. (closes #55)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1434
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Fri, 2 Mar 2007 09:20:54 +0000 (09:20 +0000)]
Handle suspended alsa devices. Based on patch by ranma. (closes #26)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1433
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Thu, 1 Mar 2007 17:15:43 +0000 (17:15 +0000)]
Revert stuff from commit 1431 that wasn't supposed to be there.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1432
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Thu, 1 Mar 2007 17:13:26 +0000 (17:13 +0000)]
Handle when ALSA tweaks our sample spec so much that the frame size changes.
(closes #57).
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1431
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Thu, 1 Mar 2007 17:11:10 +0000 (17:11 +0000)]
Add some debugging output from sample cache subsystem.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1430
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Wed, 14 Feb 2007 12:13:49 +0000 (12:13 +0000)]
Add a wrapper around close() to work around Windows' ass backwards way of
handling sockets.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1429
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Wed, 14 Feb 2007 09:27:19 +0000 (09:27 +0000)]
Allow a formatted string in the validation warning.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1428
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Wed, 14 Feb 2007 09:26:48 +0000 (09:26 +0000)]
Prefix log lines with a character indicating level.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1427
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Tue, 13 Feb 2007 15:35:19 +0000 (15:35 +0000)]
Add copyright notices to all relevant files. (based on svn log)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1426
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 12 Feb 2007 09:39:12 +0000 (09:39 +0000)]
Make sure we get proper host identifiers.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1425
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 12 Feb 2007 09:37:34 +0000 (09:37 +0000)]
Allow specification of device number.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1424
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 5 Feb 2007 10:26:14 +0000 (10:26 +0000)]
Don't abort config loading when the user specific cannot be loaded.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1423
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Fri, 19 Jan 2007 08:00:31 +0000 (08:00 +0000)]
Make sure we report success for SNDCTL_DSP_SETDUPLEX.
(Patch by ZlatkO)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1422
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Thu, 4 Jan 2007 14:20:53 +0000 (14:20 +0000)]
Report IO error on ioctl() when we're in a fatal error state.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1421
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Thu, 4 Jan 2007 14:17:57 +0000 (14:17 +0000)]
Free stream objects when they've been invalidated.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1420
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Thu, 4 Jan 2007 14:06:24 +0000 (14:06 +0000)]
Fix error messages for failure connecting streams.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1419
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Thu, 4 Jan 2007 13:43:45 +0000 (13:43 +0000)]
Huge trailing whitespace cleanup. Let's keep the tree pure from here on,
mmmkay?
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1418
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 4 Dec 2006 08:15:06 +0000 (08:15 +0000)]
Fix silly copy-and-paste error. (closes #45)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1417
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Fri, 24 Nov 2006 09:29:10 +0000 (09:29 +0000)]
Fix incorrect assert.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1416
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Fri, 10 Nov 2006 14:58:22 +0000 (14:58 +0000)]
Add atomic.h as a dependency at relevant places.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1415
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Fri, 10 Nov 2006 12:20:16 +0000 (12:20 +0000)]
Make sure we package version.h.in.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1414
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Thu, 9 Nov 2006 15:23:30 +0000 (15:23 +0000)]
Yet again try to fix the creation of necessary directories when srcdir !=
builddir.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1413
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Wed, 8 Nov 2006 13:03:35 +0000 (13:03 +0000)]
Support reversed endian floats. (closes #28) (closes #35)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1412
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Wed, 8 Nov 2006 12:56:26 +0000 (12:56 +0000)]
Check correct variable for return value. Closes #37.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1411
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 6 Nov 2006 13:16:15 +0000 (13:16 +0000)]
Fix some missing line breaks.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1410
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 6 Nov 2006 13:06:01 +0000 (13:06 +0000)]
Revert r1404 and keep it on a development branch until it is fully tested.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1409
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 6 Nov 2006 10:17:39 +0000 (10:17 +0000)]
The OSS spec is unclear what should happen when a reset is requested. Let's
have a nicer attitude and keep as much settings as possible.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1406
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 6 Nov 2006 10:14:16 +0000 (10:14 +0000)]
Handle when threaded mainloop is freed before it is started.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1405
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Tue, 26 Sep 2006 23:50:56 +0000 (23:50 +0000)]
rework memory block management to be thread-safe and mostly lock-free.
pa_memblock is now an opaque structure. Access to its fields is now done
through various accessor functions in a thread-safe manner.
pa_memblock_acquire() and pa_memblock_release() are now used to access the
attached audio data. Why? To allow safe manipulation of the memory pointer
maintained by the memory block. Internally _acquire() and _release() maintain a
reference counter. Please do not confuse this reference counter whith the one
maintained by pa_memblock_ref()/_unref()!
As a side effect this patch removes all direct usages of AO_t and replaces it
with pa_atomic_xxx based code.
This stuff needs some serious testing love. Especially if threads are actively
used.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1404
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Tue, 26 Sep 2006 23:42:08 +0000 (23:42 +0000)]
upgrade refcnt.h to make use of our new pa_atomic_xxx() API
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1403
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Tue, 26 Sep 2006 23:41:20 +0000 (23:41 +0000)]
add asynchronous inter-thread notification API
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1402
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 20 Sep 2006 19:02:45 +0000 (19:02 +0000)]
enable module-hal-detect in the default configuration file only if HAL support is enabled (closes #30)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1401
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 20 Sep 2006 19:01:59 +0000 (19:01 +0000)]
rename default realtime group from "realtime" to "pulse-rt", since it is pulseaudio specific. you may still pass --with-realtime-group=realtime to configure to get the old behaviour
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1400
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Tue, 19 Sep 2006 07:54:53 +0000 (07:54 +0000)]
Revert r1398 as it broke the srcdir != builddir patch. New fix that doesn't
use the $(mkdir_p) define as it isn't present on many systems.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1399
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Tue, 19 Sep 2006 07:49:39 +0000 (07:49 +0000)]
No need to create these dirs as they're part of the source tree.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1398
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Thu, 14 Sep 2006 16:00:57 +0000 (16:00 +0000)]
Stop using x86-isms and use ISO C (oversized shifts are undefined).
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1397
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Thu, 14 Sep 2006 14:56:31 +0000 (14:56 +0000)]
Fix debug output for SNDCTL_DSP_SETFRAGMENT.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1396
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 11 Sep 2006 07:56:03 +0000 (07:56 +0000)]
Fix up build structure for platform dependent modules. Also add implementation
on Win32 for pa_once().
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1395
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 11 Sep 2006 07:54:41 +0000 (07:54 +0000)]
Use platform independent sleep.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1394
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Pierre Ossman [Mon, 11 Sep 2006 07:14:39 +0000 (07:14 +0000)]
Fix typo.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1393
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 23:59:26 +0000 (23:59 +0000)]
ignore flist-test in the correct dir
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1392
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 23:58:03 +0000 (23:58 +0000)]
ignore flist-test
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1391
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 23:56:58 +0000 (23:56 +0000)]
update Makefile
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1390
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 23:55:58 +0000 (23:55 +0000)]
make pa_mutex_new() and pa_cond_new() succeed in all cases. Similar behaviour to pa_xmalloc().
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1389
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 23:54:56 +0000 (23:54 +0000)]
add pa_once testing code
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1388
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 23:54:19 +0000 (23:54 +0000)]
rework pa_once once again, because the once function needs to have terminated before pa_once returns, regardless whether the local call executes it or another thread does.
With the previous code it might happen that an long-running initializing in a once function is not terminated yet when another thread thinks it already is.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1387
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 22:59:17 +0000 (22:59 +0000)]
update for newer APIs: replace direct usage of libatomic_ops by usage of our own atomic.h; remove pa_once implementation; always use our pa_once implementation instead of the POSIX version
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1386
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 22:55:51 +0000 (22:55 +0000)]
implement trival pa_once API based on atomic operations
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1385
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 22:54:11 +0000 (22:54 +0000)]
add static initializer PA_ATOMIC_INIT()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1384
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 21:09:55 +0000 (21:09 +0000)]
add a test program for the free list
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1383
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Sat, 9 Sep 2006 21:05:31 +0000 (21:05 +0000)]
implement a simple lock-free free list
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1382
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Fri, 8 Sep 2006 15:43:44 +0000 (15:43 +0000)]
add a tiny wrapper around libatomic_ops: pa_atomic_int_t and pa_atomit_ptr_t.
Reasoning:
This wrapper fixes a few API issues I found with atomic_ops:
* AO_t is an int, which can be written to with "=". pa_tomic_int_t however is
a struct which due to type-safety enforces proper access with
pa_atomic_xx(). (Inspired by the way the Linux kernel handles this)
* AO_load()'s parameter is lacking a "const"
* Explicitly choosing the proper memory barrier for each call is very
difficult and especially hard to debug because most CPUs support only two
different barrier types which the eight types defined by atomic_ops are
mapped to. Most other software (i.e. glib, Linux kernel) which provides
atomic variable access usually do a full barrier in all cases and so should
we. Eventually we might choose to add additional memory barrier calls, in
which case we can add special versions of the current function with special
suffixes.
* The function names are unnecesarily long
* Atomic pointer accesses are only supported with manual casts.
The new pa_atomic_xxx interface borrows heavily from the GLib and Linux kernel
atomicity API, though it is different from both of them.
In addition this abstract API makes it easy to port PA to different atomicty
APIs, if libatomic_ops should ever become out-of-fashion or if the system OS
supports atomic primitives anyway.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1381
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Thu, 7 Sep 2006 20:17:25 +0000 (20:17 +0000)]
don't maintain a list of allocated mempool slots, we don't use it anyway
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1380
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Thu, 7 Sep 2006 19:08:19 +0000 (19:08 +0000)]
make pa_stream thread-safe: use new refcounting system, protect access using mutexes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1379
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Thu, 7 Sep 2006 13:31:53 +0000 (13:31 +0000)]
add missing channel names (fixes a segfault when parsing invalid channel maps)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1378
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Thu, 7 Sep 2006 13:29:59 +0000 (13:29 +0000)]
fix alsa-sink example
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1377
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 6 Sep 2006 22:19:54 +0000 (22:19 +0000)]
don't hit an assert in the client if posix shm is not available
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1376
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 6 Sep 2006 22:19:11 +0000 (22:19 +0000)]
fix indentation
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1375
fefdeb5f-60dc-0310-8127-
8f9354f1896f
Lennart Poettering [Wed, 6 Sep 2006 21:37:09 +0000 (21:37 +0000)]
fix a bogus debug line
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1374
fefdeb5f-60dc-0310-8127-
8f9354f1896f