Commit graph

6024 commits

Author SHA1 Message Date
Arun Raghavan
248394c8bf device-restore: Set sink format when possible
This implements the actual setting of sink formats when a new sink is
added or when the set of available formats changes.
2011-08-15 11:51:35 +05:30
Arun Raghavan
ba163b8b23 device-restore: Make bools not be bit fields
This makes the pa_bool_t members of userdata not be a single bit field
since pa_bool_t can be an int, potentially causing signedness issues in
comparisons.
2011-08-15 11:51:35 +05:30
Arun Raghavan
51fcee8902 alsa: Implement get/set_formats()
This implements the sink get_formats() and set_formats() API in
alsa-sink. Modules can use this to allow users to specify what formats
their receivers support.
2011-08-15 11:51:34 +05:30
Arun Raghavan
485d4dd542 sink: Add a set_formats() API
This adds API to let external sources specify what formats a sink
supports. Sinks must opt-in to allow this, and can perform some
validation if required.
2011-08-15 11:51:34 +05:30
Maarten Bosmans
b430407f47 Plug some memory leaks and an invalid read
Note in protocol-dbus.c specifically, method_signatures needs to be freed
before method_handlers, because otherwise h->method_name is freed while it is
still in use as a key in the method_signatures hashmap.
2011-08-12 20:31:52 +02:00
Colin Guthrie
a8f20e8d95 sink-input: Drop redundant assert (PA_SINK_INPUT_IS_LINKED() checked already) 2011-08-12 20:31:52 +02:00
Arun Raghavan
c1cb0a6925 log: Add missing pulsecore/thread.h include 2011-08-12 20:04:15 +05:30
Lu Guanqun
6c2a1cceed i18n: po file fixes
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2011-08-12 16:14:18 +05:30
Wang Xingchao
be3879e04e alsa: resets POLLOUT event
revents marked as POLLOUT|POLLERR|POLLWRNORM in "underrun" case that will
trigger unexpected log "ALSA woke us up to write new data to the device, but
there was acturally nothing to write...".

This patch avoids this log message.
2011-08-11 15:31:48 +02:00
Wang Xingchao
e564129b8f alsa: Update process_usec before going to sleep
During check_left_to_play/record(), the watermark may increase/decrease. So before
sleeping, update the actural sleep time based on latest watermark.
2011-08-11 15:30:27 +02:00
Maarten Bosmans
b4e938e194 Move i18n.[ch] to src/pulsecore
The header is used in files troughout the tree and is not included in the public api,
so it belongs in pulsecore, not in pulse.
2011-08-11 13:23:42 +02:00
Maarten Bosmans
464ddcdfea Add some missing format.h includes 2011-08-11 13:23:21 +02:00
Maarten Bosmans
f10da7683d Include config.h consistently in source files and not in headers 2011-08-11 13:21:31 +02:00
Lu Guanqun
625380d809 sample-util: use built-in function
use built-in function pa_frame_aligned().

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2011-08-11 10:36:21 +02:00
Colin Guthrie
1824fc6d73 ext-device-restore: Include format.h 2011-08-11 10:36:21 +02:00
Colin Guthrie
6b1d9b8d6a alsa: Ensure that volumes are written to the h/w at startup.
If the device support SYNC_VOLUMES then we need to do an additional push
to get the actual change on to the h/w.
2011-08-11 10:36:11 +02:00
Colin Guthrie
0b5a181e1b alsa-mixer: Fix rounding direction on mixer initialisation 2011-08-10 10:28:50 +02:00
Colin Guthrie
8ace9185aa pactl: Make stat backwards compatible with previous versions.
This is not ideal but in order to aid people using it in scripts
etc, we will maintain backwards compatibiliy here.

Also add a 'short' mode and mention in the man page that this
will ultimately become the default at some point in the future.
2011-08-10 10:12:51 +02:00
Maarten Bosmans
49c20b3e3d pactl: Split help string up in shorter pieces for easier translation 2011-08-10 10:12:51 +02:00
Maarten Bosmans
3e14019c44 pactl: Short --help output a bit by consolidating sink/source commands 2011-08-10 10:12:51 +02:00
Maarten Bosmans
d36a899062 pactl: Update manpage 2011-08-10 10:12:50 +02:00
Lu Guanqun
6a03af769a log: add thread name
This patch displays thread name in the log, that would be more descriptive.
It improves Xingchao (xingchao.wang@intel.com)'s patch which shows thread id.

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2011-08-09 15:06:01 +02:00
Colin Guthrie
fc0a6ee239 device-restore: Various fixes for the protocol extension.
* Fix extension API function export list.
 * Ensure we trigger a subscription event when things change.
 * Send the index with our subscription events.
 * Clear out any existing formats when saving.
 * Call the correct extension command for subscriptions.
2011-08-09 11:01:01 +02:00
Maarten Bosmans
738cea3cc3 Fix default.pa on non udev systems 2011-08-08 10:14:59 +02:00
Colin Guthrie
e8df86807e stream-restore: Save/restore source output volume/mute 2011-08-08 09:49:52 +02:00
Colin Guthrie
8c93d7dc80 source-output: Fix resampling.
When recording, we need to reverse the order of sample specs
(origin<->destination) from the sink code this was copied form.
2011-08-07 00:37:28 +02:00
David Henningsson
b60c570d90 Document PA_COMMAND_UNDERFLOW protocol change
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-08-04 17:24:23 +01:00
David Henningsson
5bfcb5d8a0 Fix crash in path subset elimination
As reported in http://kpaste.net/04f1f3f
it is possible to call enumeration_is_subset with null pointers.
Handle that case instead of crashing. (It is also possible that
Tanuk's pending element_is_subset patch solves the issue, but this
nevertheless gives some extra security.)

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-08-04 17:23:37 +01:00
Colin Guthrie
85291b1954 build-sys: bump soname 2011-08-02 16:19:53 +01:00
David Henningsson
1893234063 protocol-native: Allow clients to know at what index underrun occurred
This patch introduces some extra protocol information, so protocol
version is bumped. This functionality is primarily needed to solve
a long standing issue in alsa-plugins, which should ignore underruns
if and only if it is obsolete, i e, if more data has been written to
the pipe in the meantime (which will automatically end the underrun).

BugLink: http://bugs.launchpad.net/bugs/805940
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2011-08-02 13:59:00 +01:00
Daniel Schaal
00493a4ef0 man: add manpage for start-pulseaudio-kde and start-pulseaudio-x11 2011-08-01 10:19:12 +01:00
Maarten Bosmans
f35214e4f1 build-sys: Check for necessary programs in bootstrap.sh
Also use glib-gettextize instead of plain gettextize.
2011-07-28 10:51:09 +01:00
Arun Raghavan
4e8bb96975 doc: Document subscription events better
Add an explanation and some example code to make it easier for people
writing client-side code to figure out how subscription events work.
2011-07-27 21:52:32 +05:30
Jens Georg
441bd54bdc rygel: Fix introspection XML for MediaItem2 2011-07-22 21:57:55 +05:30
Jens Georg
ed061a3e73 rygel: Properly close {sv} iters for GetAll
This fixes browsing the PA Sink and Source container.
2011-07-22 21:35:23 +05:30
Tanu Kaskinen
1824f6de6a virtual: Fix volume callback setting.
We want to set the volume callbacks only if volume sharing
is not used. When volume sharing is used, we don't want to
mess with the stream volumes.

This was broken in 6c6b50
2011-07-21 20:38:57 +01:00
Colin Guthrie
cf0bf5a4c2 reserve: Fix compile warning when compiling without dbus 2011-07-20 22:23:11 +01:00
Colin Guthrie
906e99b792 alsa-mixer: Remove workaround for USB head/handsets
Now that subset mixer paths are removed, this workaround is no longer needed.

This effectively reverts 1c38b5d478 but due
to me forgetting to add files and adding a couple extra workarounds after,
it's easier to just do this manually rather than run git-revert.
2011-07-20 22:23:11 +01:00
Colin Guthrie
c0470fd8c4 alsa: No need to go via sink/source to get the core. 2011-07-20 22:23:11 +01:00
Colin Guthrie
5c832a5b8a alsa-mixer: Detect and then drop pointless paths in the path set.
In order to try and avoid 'spamming' the user with port choices,
attempt to detect and remove any pointless paths in a path set. That is
any paths which are subsets of other paths.

This should solve a problem case with some USB Headsets which result in
two paths both involving the 'Speaker' element. When no 'Master' element
exists (which is quite common on head/handsets), then the first path
(analog-output) will contain the 'Speaker' in a way that completely fits
with in the use of the 'Speaker' element in the other path
(analog-output-speaker).
2011-07-20 22:23:11 +01:00
Colin Guthrie
85834107a0 alsa-mixer: Do not 'unify' mixer paths.
Unification is really just a 'lowest common denominator' system. If any
paths do not support volume, mute or decibels, then mark them all as not
having them.

This was originally done this way because the flags set on sinks that
dictate if it supports h/w volume, mute etc. could not be changed after
the sink was created.

The fact that these flags could not change has now been change in the
previous commits, and thus there is now no need to use this 'lowest
common denominator' approach as we can fully support the various
different combinations, even if they change after initial creation
of the sinks/source.
2011-07-20 22:23:10 +01:00
Colin Guthrie
6c6b50d6a8 alsa: Reinitialise the mixer on port change.
This allows us to flip from software to hardware volume control as the port's
mixer path dictates.
2011-07-20 22:23:10 +01:00
Colin Guthrie
a9cf320bc1 devices: Set certain sink/source flags automatically.
Some sink flags are really just a product of what callbacks
are set on the device. We still enforce a degree of sanity
that the flags match the callbacks set, but we also set the
flags automatically in our callback setter functions to
help ensure that a) people use them and b) flags & callbacks
are kept in sync.
2011-07-20 22:20:37 +01:00
Colin Guthrie
ded07a5898 devices: Use wrapper functions to set the *_volume and *_mute callbacks.
This is not currently useful but future commits will make further
changes concerning automatic setting of flags and event delivery
that makes this structure necessary.
2011-07-19 19:50:43 +01:00
Ralph Giles
8840ebf9c3 Fix two comment typos. 2011-07-14 14:13:52 -07:00
Arun Raghavan
a823fae3e5 protocol-native: Trivial fix for a compiler warning 2011-07-12 14:46:21 -07:00
Arun Raghavan
157bc4ef3b padsp: Handle eol in info callbacks correctly
When receiving an eol, the object will be NULL and we're not handling
this correctly. Thanks to Drew Ogle <dantealiegri@gmail.com> for
reporting this and providing a patch.
2011-07-11 20:59:30 -07:00
Arun Raghavan
f69cbdbdf7 protocol-native: Fix invalid assert
For source and sinks, we allow both the index and name to be invalid
while introspecting (the default source/sink will be used). This
modifies the assert appropriately. Thanks to Drew Ogle
<dantealiegri@gmail.com> for reporting and providing a patch.
2011-07-11 20:52:41 -07:00
Arun Raghavan
018de50cfd protocol-native: Fix backward compatibility break
This makes sure we don't perform a check on record stream volumes for
clients that don't support them.
2011-07-09 19:16:18 -07:00
Arun Raghavan
0f91e43d99 echo-cancel: Set sane defaults for module initialisation
This picks sane defaults for the sample spec used (32 kHz, mono) and
preprocessing (on by default). This should make it unncessary to provide
additional parameters in the default desktop case.

The main exception would be decreasing the sample rate for hardware with
limited processing power (can bring it down to 16 or 8 kHz).
2011-07-09 12:59:11 -07:00