Commit graph

315 commits

Author SHA1 Message Date
Lennart Poettering
4137865815 change pa_modargs_get_channel_map() to take an extra argument for specifying the name of the modargs attribute to parse
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1813 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-12 20:12:13 +00:00
Lennart Poettering
7f92542420 consolidate close() calls to pa_close(), and make sure on every occasion that we handle failures of close() sensibly
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1811 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-12 00:04:21 +00:00
Lennart Poettering
d5bedbcd98 remaining s/assert/pa_assert/ and refcnt.h modernizations
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1809 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-11 20:48:33 +00:00
Lennart Poettering
391d09cd6e add 'wait' parameter to pa_rtpoll_run(), if zero pa_rtpoll_runn will only update the struct pollfd but not wait for an event
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1803 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-11 13:15:39 +00:00
Lennart Poettering
98f9bd62a6 make sure that the device volume is properly read before we call pa_sink_put() and thus make the pa_sink available
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1789 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-10 20:55:01 +00:00
Lennart Poettering
06db9219a0 don't call pa_source_process_msg() for PA_SOURCE_MESSAGE_GET_LATENCY, since it makes querying the latency always fail
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1784 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-10 14:23:00 +00:00
Pierre Ossman
028632fd57 TIOCINQ isn't present on all systems.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1781 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-10 11:33:47 +00:00
Lennart Poettering
b41dbfd28d fix an assert when runnig module-oss in record only-mode. optimize allocation of memblocks on playback
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1777 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-06 23:29:16 +00:00
Lennart Poettering
b1fd53b20b explicitly test for the availability of dbus_watch_get_unix_fd() before using it. The previous version-based check didn't work anyway since the constants checked for weren't set.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1772 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-06 20:06:02 +00:00
Lennart Poettering
4c31ff9b45 fix a couple of compiler warnings
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1768 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-04 20:01:19 +00:00
Lennart Poettering
c029038164 actually add source code of module-default-device-restore
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1761 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-03 20:53:44 +00:00
Lennart Poettering
1d3e70c7d3 header file cleanup
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1759 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-03 20:51:17 +00:00
Lennart Poettering
cc8c499875 fix dbus version check for dbus_watch_get_unix_fd()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1752 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-02 21:18:46 +00:00
Lennart Poettering
68981e5e97 fix build for dbus < 1.1.1, re #126, patch from Marc-Andre Lureau
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1750 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-02 20:51:25 +00:00
Lennart Poettering
8cf822a3d9 make use of new PA_PAGE_SIZE macro
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1744 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-09-02 20:36:00 +00:00
Lennart Poettering
f59dd18fe6 - fix suspend handling
- set sink description properly
- honour resample_method setting


git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1735 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-31 00:22:31 +00:00
Lennart Poettering
241ad047c8 port module-combine to new core
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1734 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-30 22:58:12 +00:00
Lennart Poettering
4d623f0d44 Lots of assorted minor cleanups and fixes:
* s/disconnect/unlink/ at many places where it makes sense
* make "start_corked" a normal pa_sink_input/pa_source_output flag instead of a seperate boolean variable
* add generic process() function to pa_sink_input/pa_source_output vtable that can be used by streams to do some arbitrary processing in each rt loop iteration even the sink/source is suspended
* add detach()/attach() functions to pa_sink_input/pa_source_output vtable that are called when ever the rtpoll object of the event thread changes
* add suspend() functions to pa_sink_input/pa_source_output vtable which are called whenever the sink/source they are attached to suspends/resumes
* add PA_SINK_INIT/PA_SOURCE_INIT/PA_SINK_INPUT_INIT/PA_SINK_OUTPUT_INIT states to state machines which is active between _new() and _put()
* seperate _put() from _new() for pa_sink/pa_source
* add PA_SOURCE_OUTPUT_DONT_MOVE/PA_SINK_INPUT_DONT_MOVE flags
* make the pa_rtpoll object a property of pa_sink/pa_source to allow streams attached to them make use of it
* fix skipping over move_silence
* update module-pipe-source to make use of pa_rtpoll
* add pa_sink_skip() as optimization in cases where the actualy data returned by pa_sink_render() doesn't matter


git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1733 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-30 22:57:53 +00:00
Lennart Poettering
f82067f6de lower suspend timeout to 1s
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1719 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-25 22:27:51 +00:00
Lennart Poettering
9d381599be port remaining sinks to pa_rtpoll
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1705 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-22 22:27:53 +00:00
Lennart Poettering
1bfa1802d4 minor cleanups
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1704 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-22 22:27:07 +00:00
Lennart Poettering
53b872c070 port alsa driver to make use of new pa_rtpoll object
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1702 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-22 17:13:07 +00:00
Lennart Poettering
7fca89034f check pa_core::high_priority before becoming rt thread
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1694 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-22 00:27:25 +00:00
Lennart Poettering
2d292befab use realtime scheduling for ALSA and OSS driver threads
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1679 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-16 19:50:11 +00:00
Lennart Poettering
39d1e65338 truncate service names if necessary, include user name in service string
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1674 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-16 13:47:18 +00:00
Lennart Poettering
8a663d4cda a couple of build fixes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1658 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-13 00:15:55 +00:00
Lennart Poettering
45e495499e fix latency reporting for oss and alsa modules
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1645 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-11 23:43:39 +00:00
Lennart Poettering
06f2799d8f minor modernizations
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1644 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-11 20:31:34 +00:00
Lennart Poettering
57734ec414 hook into move operations for resuming/suspending devices appropriately
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1643 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-11 20:31:08 +00:00
Lennart Poettering
44b82a1925 Add 'via DMA' to sink/source description if device is accessed with mmap()
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1642 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-11 20:30:21 +00:00
Lennart Poettering
50e014e7a9 use single array for storing pa_core hook lists, add sink state changed hook, drop NO_HOOKS flags for sink inputs/source outputs, listen for resume events in module-suspend-on-idle.c
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1640 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-11 19:08:06 +00:00
Lennart Poettering
a3cd8002b5 port oss driver to make use of the default fragment sizes as defined in pa_core: store in the sink/source description whether mmap is used; if mmap() fails, fall back to UNIX read/write mode instead of bailing out immediately
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1639 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-11 17:09:07 +00:00
Lennart Poettering
b71dde0e35 make sure that the device access event sound is only generated once
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1638 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-11 16:51:21 +00:00
Lennart Poettering
107b23d202 fix module-hal when no api= argument is specified
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1636 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-11 16:07:38 +00:00
Lennart Poettering
e1100b5b20 modify alsa drivers to make use of new global fragment setting variables
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1633 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-11 15:59:02 +00:00
Lennart Poettering
793f750429 fix default device naming and fix api selection code
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1632 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-11 15:58:15 +00:00
Lennart Poettering
3eae9038eb make use of pa_thread_mq everywhere
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1624 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-10 22:02:39 +00:00
Lennart Poettering
357c0e415f fix closing of fds in gconf module
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1616 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-10 14:49:26 +00:00
Lennart Poettering
ffa1708070 * drop redundant pa_core argument from module initialization functions
* make pa__done() implementations optional
* a couple of modernizations
* wrap lt_dlsym() at a single place
* allow passing of an "api" argument to the HAL module, to choose whether OSS devices or ALSA devices should be picked up
* optimize fd closing a little on linux in the forked gconf helper
* save a little memory in the xsmp module


git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1615 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-10 14:28:39 +00:00
Lennart Poettering
e621071bf1 fix minor memory leakage
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1614 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-10 12:11:40 +00:00
Lennart Poettering
10b135a4bf avoid duplicate loading of modules
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1613 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-10 00:33:47 +00:00
Lennart Poettering
1e5ca51016 handle ACLAdded messages for previously unknown devices identically to a really new device
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1612 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-10 00:29:28 +00:00
Lennart Poettering
3b078b2068 Avoid a race condition when one PA instance gets HAL's ACLAdded message before the previous owner instance has given up access to the device, and thus the device is blocked
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1611 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-10 00:15:20 +00:00
Lennart Poettering
d9e44c52cb Add X11 XSMP module for hooking into the X11 session manager, for being notified about X11 disconnects before they actually happen, so that we are not killed by the bloody xlibs
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1610 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-09 23:47:06 +00:00
Lennart Poettering
583167722e modernize
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1609 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-09 23:46:03 +00:00
Lennart Poettering
3dfdb21759 don't assume that sink/source is already unregistered from namereg when disconnect hook is called
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1608 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-09 21:57:01 +00:00
Lennart Poettering
1c7b84204e play ACL event sound only when gained access, not when losing it
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1607 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-09 21:56:23 +00:00
Lennart Poettering
e76efa990e forgot to actually add the new suspend-on-idle module source code
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1603 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-09 21:08:10 +00:00
Lennart Poettering
9c89f37ace if we get access to a device we don't know yet, add it to our tree instead of ignoring it
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1601 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-09 21:06:08 +00:00
Lennart Poettering
ed01e1adb5 don't hit an assert when we cannot resume a device
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1599 fefdeb5f-60dc-0310-8127-8f9354f1896f
2007-08-09 17:52:13 +00:00