]> code.delx.au - pulseaudio/log
pulseaudio
11 years agodaemon: Fix redundant redeclaration warning
Peter Meerwald [Tue, 10 Jul 2012 12:44:03 +0000 (14:44 +0200)]
daemon: Fix redundant redeclaration warning

  CC     pulseaudio-dumpmodules.o
daemon/dumpmodules.c:93:27: warning: redundant redeclaration of ‘lt__PROGRAM__LTX_preloaded_symbols’ [-Wredundant-decls]
/usr/include/ltdl.h:106:36: note: previous declaration of ‘lt__PROGRAM__LTX_preloaded_symbols’ was here

the declaration is provided by ltld.h of libtool since version 2.4, require the 2.4 instead of 2.2

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
11 years agomodargs: New function: pa_modargs_get_value_double().
Flavio Ceolin [Tue, 9 Oct 2012 18:16:29 +0000 (15:16 -0300)]
modargs: New function: pa_modargs_get_value_double().

11 years agobluetooth: Hold transport pointer while profile set
Mikel Astiz [Fri, 19 Oct 2012 08:11:28 +0000 (10:11 +0200)]
bluetooth: Hold transport pointer while profile set

Instead of repeatedly asking the discovery API to find a transport given
our transport path, let's hold a pointer to the transport and make sure
we remove the reference when the hook is fired reporting that the
transport has been removed. This makes the code easier to follow and
slightly more efficient.

11 years agobluetooth: Set to off instead of failing module load
Mikel Astiz [Fri, 19 Oct 2012 08:11:27 +0000 (10:11 +0200)]
bluetooth: Set to off instead of failing module load

If the profile setup fails during module load, the fallback should be
setting the profile to off, exactly as it is done in card_set_profile().

11 years agobluetooth: Set to off if transport removed
Mikel Astiz [Fri, 19 Oct 2012 08:11:26 +0000 (10:11 +0200)]
bluetooth: Set to off if transport removed

The recently added hook can be used to detect that the transport being
used has been removed. In this case, the profile needs to be set to off.

Additionally, the change fixes a significant problem: without this
transition, the transport could be destroyed while the hook slots (i.e.
nrec_changed_slot) were still set. This led to a double free of these
objects in stop_thread().

11 years agobluetooth: Add hook to tell transport was removed
Mikel Astiz [Fri, 19 Oct 2012 08:11:25 +0000 (10:11 +0200)]
bluetooth: Add hook to tell transport was removed

Add a hook to report that the transport was removed from D-Bus, and thus
references to it should be released.

11 years agobluetooth: Remove const qualifier for transports
Mikel Astiz [Fri, 19 Oct 2012 08:11:24 +0000 (10:11 +0200)]
bluetooth: Remove const qualifier for transports

The internal API in bluetooth-util should not use the const qualifier
for operations modifying the transport object. This is specially useful
in order to use the available hooks.

11 years agobluetooth: Check return value of start_thread()
Mikel Astiz [Fri, 19 Oct 2012 08:11:23 +0000 (10:11 +0200)]
bluetooth: Check return value of start_thread()

The function can return an error, so in that case the profile change
should fail.

11 years agobluetooth: Check return value of init_profile()
Mikel Astiz [Fri, 19 Oct 2012 08:11:22 +0000 (10:11 +0200)]
bluetooth: Check return value of init_profile()

If profile could not be successfully initialized, the card should be
set to PROFILE_OFF automatically. If sinks or sources exist, they need
to be destroyed, therefore stop_thread() is called.

11 years agobluetooth: Use assertions when setting off profile
Mikel Astiz [Fri, 19 Oct 2012 08:11:21 +0000 (10:11 +0200)]
bluetooth: Use assertions when setting off profile

Setting the card profile to off cannot fail, therefore assertions can be
used when calling pa_card_set_profile().

11 years agocore: Fix a litte-endian bug in ARM svolume code
Arun Raghavan [Thu, 18 Oct 2012 05:13:17 +0000 (10:43 +0530)]
core: Fix a litte-endian bug in ARM svolume code

The old code seems to be written for big-endian code.

11 years agocore: Document ARM-optimised svolume code a bit
Arun Raghavan [Thu, 18 Oct 2012 05:12:48 +0000 (10:42 +0530)]
core: Document ARM-optimised svolume code a bit

11 years agotests: Minor cpu-test reorganisation
Arun Raghavan [Fri, 19 Oct 2012 13:13:17 +0000 (18:43 +0530)]
tests: Minor cpu-test reorganisation

Make volume and conversion tests separate test cases.

11 years agotests: Factor out ARM svolume test into cpu-test
Arun Raghavan [Tue, 16 Oct 2012 06:53:19 +0000 (12:23 +0530)]
tests: Factor out ARM svolume test into cpu-test

This allows us to run the testing code separately from the PulseAudio
daemon, which makes developing / regression testing this code a lot
easier.

11 years agocore: Separate ARM CPU detection from initialisation
Arun Raghavan [Tue, 16 Oct 2012 06:30:19 +0000 (12:00 +0530)]
core: Separate ARM CPU detection from initialisation

This separate the ARM CPU feature detection code from the initialisation
so that we can reuse it in tests, like we did for x86 a while back.

11 years agobluetooth: Remove stream moving code
Mikel Astiz [Thu, 18 Oct 2012 08:27:15 +0000 (10:27 +0200)]
bluetooth: Remove stream moving code

Remove stream moving policies from module-bluetooth-device. It is not
clear if such policies are needed at all and in case yes, they should be
implemented in module-bluetooth-policy.

11 years agocli: Output asterisk when default sink/source is found
David Henningsson [Tue, 16 Oct 2012 14:05:52 +0000 (16:05 +0200)]
cli: Output asterisk when default sink/source is found

These days we don't set core->default_sink/source as soon as somebody
asks for it. To retain consistent behaviour (i e the asterisk),
we need to call pa_namereg_get_default_sink/source.

Reported-by: Daniel Manrique <daniel.manrique@canonical.com>
Reported-by: Brendan Donegan <brendan.donegan@canonical.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agobluetooth: Unlink sink-sources in stop_thread()
Mikel Astiz [Fri, 28 Sep 2012 15:45:31 +0000 (17:45 +0200)]
bluetooth: Unlink sink-sources in stop_thread()

Avoid duplicated code by moving the unlinking of sinks and sources to
stop_thread(). After all, they need to be unlinked when the thread is
stopped.

11 years agobluetooth: Release transport in stop_thread()
Mikel Astiz [Fri, 28 Sep 2012 15:45:30 +0000 (17:45 +0200)]
bluetooth: Release transport in stop_thread()

Avoid duplicated code by releasing the transport inside stop_thread(),
along with the rest of the thread-related cleanup.

11 years agobluetooth: Don't find device if set profile is off
Mikel Astiz [Fri, 28 Sep 2012 15:45:29 +0000 (17:45 +0200)]
bluetooth: Don't find device if set profile is off

If the card is being set to off profile, it is not necessary to check
if the device exists. This could potentially happen during shutdown,
immediately before the module is unloaded.

11 years agobluetooth: Fix potential assertion failure
Mikel Astiz [Fri, 28 Sep 2012 15:45:28 +0000 (17:45 +0200)]
bluetooth: Fix potential assertion failure

It might happen that a PropertyChanged signal is received but the
corresponding card profile has not been created, leading to an assertion
failure in filter_cb() due to inexistent ports. This can happen if BlueZ
misbehaves, or also if the UUIDs are reported later on (i.e. during
pairing discovery). In any case, the signal should just be ignored.

11 years agobluetooth: Trivial function rename
Mikel Astiz [Fri, 28 Sep 2012 15:45:27 +0000 (17:45 +0200)]
bluetooth: Trivial function rename

Former setup_bt() was just setting up the transport, so it's easier to
follow if the function name makes this more explicit.

11 years agobluetooth: Ignore Device.DisconnectRequested
Mikel Astiz [Fri, 28 Sep 2012 15:45:26 +0000 (17:45 +0200)]
bluetooth: Ignore Device.DisconnectRequested

Handling the signal DisconnectRequested should be unnecessary since the
profile-specific interfaces will be later disconnected, leading to
module unload.

Additionally, the signal is problematic: if an interface (i.e.
A2DP AudioSource) is playing at the time DisconnectRequested is
signaled, the following sequence can occur:

1. AudioSource is playing
2. DisconnectRequested is received
3. Module is unloaded due to DisconnectRequested
4. AudioSource state changes from playing to connected
5. module-bluetooth-discover loads the module
6. AudioSource state changes from connected to disconnected

Therefore the module is unnecessarily loaded, to be unloaded immediately
afterwards. This can easily be reproduced if a device is unpaired while
the audio is streaming.

The simplest solution to this consists of removing step 3, by just
ignoring the DisconnectRequested signal. This reverts commit
8169a6a6c921215c1353e8a34fccbdc4e2e20440.

11 years agobluetooth: Remove ipc.[ch] files in the bluetooth module
Chan-yeol Park [Wed, 1 Aug 2012 05:18:20 +0000 (14:18 +0900)]
bluetooth: Remove ipc.[ch] files in the bluetooth module

These files are remove in the bluez project.
In case of definitions in the ipc files
we could use defintions in the a2dp-codecs.h

11 years agotests: make 'check' optional
Deng Zhengrong [Mon, 13 Aug 2012 07:34:05 +0000 (15:34 +0800)]
tests: make 'check' optional

11 years agoalsa-mixer: Remove analog-output-lfe-on-mono
David Henningsson [Thu, 4 Oct 2012 11:32:35 +0000 (13:32 +0200)]
alsa-mixer: Remove analog-output-lfe-on-mono

Upstreamed from Debian: "Although in principle Ac '97 hardware has a
separate mono LFE pin nothing seems to use it. To make matters worse
it does confuse PulseAudio's port selection slightly which causes
audio in virtualbox not to work out of the box."

Credit: Sjoerd Simons <sjoerd@debian.org>
Credit: Martin-Éric Racine <martin-eric.racine@iki.fi>
BugLink: https://bugs.launchpad.net/bugs/1016969
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=673847
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agoalsa-mixer: Cache failure to open inputs/output mappings
David Henningsson [Mon, 1 Oct 2012 13:37:21 +0000 (15:37 +0200)]
alsa-mixer: Cache failure to open inputs/output mappings

I was hoping this would improve bootup speed, but it doesn't seem
to do so here, at least not much. But at least it reduces the logs
a little.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agogit-version-gen: Honor GIT_DESCRIBE_FOR_BUILD environment variable
Colin Walters [Tue, 25 Sep 2012 23:26:18 +0000 (19:26 -0400)]
git-version-gen: Honor GIT_DESCRIBE_FOR_BUILD environment variable

The GNOME-OSTree build system currently creates chroots and bind
mounts to the source tree outside the root; this means that we can't
necessarily run git inside the root, because in the case of git
submodules, the .git repository will point to outside root.

Also, error out fatally if we fail to determine the version; it
makes no sense to put UNKNOWN in e.g. the pkg-config files
since this will just cause errors later on.

11 years agobluetooth: Add port availability transition policies
Mikel Astiz [Fri, 31 Aug 2012 10:51:13 +0000 (12:51 +0200)]
bluetooth: Add port availability transition policies

Handle availability changes in Bluetooth ports inside
module-bluetooth-policy. The implemented behavior is similar to how
module-switch-on-port-available behaves, but the conditions are more
relaxed and thus more profile changes are triggered.

11 years agobluetooth: Let suspend-on-idle request audio in headset
Mikel Astiz [Fri, 31 Aug 2012 10:51:12 +0000 (12:51 +0200)]
bluetooth: Let suspend-on-idle request audio in headset

When PA is doing gateway role, let module-suspend-on-idle resume the
audio stream automatically. This will work until the user (or the remote
side, which we also consider user-initiated) suspend the stream
manually.

11 years agobluetooth: Do not switch to HFGW automatically
Mikel Astiz [Fri, 31 Aug 2012 10:51:08 +0000 (12:51 +0200)]
bluetooth: Do not switch to HFGW automatically

Card profile hfgw should be no different from the rest, and thus no
internal policy inside module-bluetooth-device should decide to switch
to its profile automatically.

This should be handled by policy modules.

11 years agobluetooth: Release transport when not available
Mikel Astiz [Fri, 31 Aug 2012 10:51:07 +0000 (12:51 +0200)]
bluetooth: Release transport when not available

Handle the Playing->Connected transition gracefully by releasing the
transport and setting the sink and sources as suspended. This is
necessary since the IO thread might not encounter a HUP always.

11 years agobluetooth: Acquire transport when becomes available
Mikel Astiz [Fri, 31 Aug 2012 10:51:06 +0000 (12:51 +0200)]
bluetooth: Acquire transport when becomes available

Try to acquire the transport as soon as the audio stream is started,
along with the availability flag update.

11 years agobluetooth: Do not acquire transport during profile change
Mikel Astiz [Fri, 31 Aug 2012 10:51:05 +0000 (12:51 +0200)]
bluetooth: Do not acquire transport during profile change

Until today, setting the card to some profile resulted in a transport
acquisition, leading to audio stream setup. This is generally not very
interesting and even undesireable for HFGW use-cases, where the
Gateway role (the remote end) would typically request the SCO link.

Nevertheless, there is no safe way to implement such check without race
conditions, since the BlueZ's state can change between the state report
and the call to Acquire(). The chances for this to reproduce are quite
low though, since interface state changes are relatively slow.

This race condition requires that BlueZ's API is extended in order to
perform the operation atomically, which has already been discussed and
ack-ed in the BlueZ mailing list.

Note that this patch does not introduce a new race condition, since it
already existed before (the PropertyChanged->Acquire race condition,
affecting HFGW use-cases). It is just more explicit now.

11 years agobluetooth: Set profile even if transport not acquired
Mikel Astiz [Fri, 31 Aug 2012 10:51:04 +0000 (12:51 +0200)]
bluetooth: Set profile even if transport not acquired

If the acquisition of the transport fails, the profile should still be
set. In this case the audio is not actually streaming, so the sink and
source will be created but left suspended.

If the transport needs to be acquired later, for example because the
user wants to route the audio the remote device, the suspend flag should
have to be changed.

11 years agobluetooth: Support port availability flag
Mikel Astiz [Fri, 31 Aug 2012 10:51:02 +0000 (12:51 +0200)]
bluetooth: Support port availability flag

Use the port availability flag to expose whether a certain profile is
connected and whether it's doing actual audio streaming.

The proposed mapping is the following:
- Profile disconnected: port is unavailable
- Profile is connected (but not streaming/playing): availability unknown
- Profile is streaming/playing: port is available

The availability-unknown is specially interesting: it involves that if
the sink/source exists (corresponding card profile set), it is currently
in suspended state.

For example, for SCO cases (HFGW or HSP), this means the SCO is down. A
policy module would typically not change this, unless someone is really
trying to use the sink/source. This situation would be nicely handled by
module-suspend-on-idle, which would automatically connect SCO.

On the other hand, if the user wants to control the status of the SCO,
it will still be possible by resuming the sink or source (suspend=0).
This works out-of-the-box since most UIs would show to the user ports
whose availability is unknown.

11 years agobluetooth: Config MTU transport after acquire
Mikel Astiz [Fri, 31 Aug 2012 10:51:03 +0000 (12:51 +0200)]
bluetooth: Config MTU transport after acquire

The configuration of the transport that depends on the MTU should be
performed every time the transport has been acquired, since the
parameters depend on what the Media API provides. This requires to
update the parameters of the sinks and sources as well.

This patch moves this code into a new function that will be called
when the stream is starting (setup_stream), from the IO thread.

This makes the code more robust, since the existing multiple calls to
bt_transport_acquire() do not rely on setup_bt() being able to acquire
the transport.

11 years agobluetooth: Provide dummy set_port callbacks
Mikel Astiz [Fri, 31 Aug 2012 10:51:01 +0000 (12:51 +0200)]
bluetooth: Provide dummy set_port callbacks

There should be one port per sink/source so a dummy set_port callback
will be enough.

Adding this callback avoid the "operation not implemented" error
message and additionally makes the module work nicely with
module-switch-on-port-available.

11 years agosink, source: Support creating suspended sinks and sources
Mikel Astiz [Fri, 31 Aug 2012 10:51:00 +0000 (12:51 +0200)]
sink, source: Support creating suspended sinks and sources

The initial state of a sink or source might not necessarily be IDLE,
because sometimes it might be suspended from the very beginning.

11 years agobluetooth: Fix check if transport exists before acquire
Mikel Astiz [Fri, 31 Aug 2012 10:50:59 +0000 (12:50 +0200)]
bluetooth: Fix check if transport exists before acquire

The transport might have disapeared exactly before acquiring, so we
should avoid an assertion failure, in this case inside the function
pa_bluetooth_discovery_get_by_path().

11 years agobluetooth: Fix using garbage memory
Mikel Astiz [Fri, 31 Aug 2012 10:50:58 +0000 (12:50 +0200)]
bluetooth: Fix using garbage memory

module-bluetooth-policy should set the allocated memory to zero, in
order to handle failure cases properly.

11 years agobluetooth: Fix wrongly set "phone" role for HFGW
Mikel Astiz [Fri, 31 Aug 2012 10:50:57 +0000 (12:50 +0200)]
bluetooth: Fix wrongly set "phone" role for HFGW

The HFGW source should be consistent with the sink by not setting the
"phone" intended role.

Even though setting this role seems to make sense strictly speaking, the
rest of the codebase doesn't handle this well. Therefore, the audio
coming from a Bluetooth phone can be routed back to the same device.

11 years agobluetooth: Refactor code to helper function
Mikel Astiz [Fri, 31 Aug 2012 10:50:55 +0000 (12:50 +0200)]
bluetooth: Refactor code to helper function

Make code more readable by introducing the helper function
bt_transport_is_acquired(). This also adds assertions to check whether
the internal state is consistent.

11 years agobluetooth: Refactor parsing of signal PropertyChanged
Mikel Astiz [Fri, 31 Aug 2012 10:50:56 +0000 (12:50 +0200)]
bluetooth: Refactor parsing of signal PropertyChanged

Wrap the code parsing the PropertyChanged signal into a helper function
that will return the new state of the interface.

11 years agobluetooth: Remove return value of setup_stream()
Mikel Astiz [Fri, 31 Aug 2012 10:50:54 +0000 (12:50 +0200)]
bluetooth: Remove return value of setup_stream()

The function setup_stream() never fails so the code can be simplified by
just removing the return value.

11 years agobluetooth: Remove return value of bt_transport_config()
Mikel Astiz [Fri, 31 Aug 2012 10:50:53 +0000 (12:50 +0200)]
bluetooth: Remove return value of bt_transport_config()

The function bt_transport_config() never fails so the code can be
simplified by just removing the return value.

11 years agoequalizer: Don't cleanup u->sink in sink_input_kill_cb yet
Matthijs Kooijman [Mon, 24 Sep 2012 12:40:06 +0000 (14:40 +0200)]
equalizer: Don't cleanup u->sink in sink_input_kill_cb yet

Previously, sink_input_kill_cb would cleanup u->sink an then unload the
module. However, during module unload, both save_state and dbus_done
tried to use u->sink, causing a segfault or assertion failure.

The segfault is easy to reproduce: Load module-equalizer-sink and then
press ctrl-C to terminate pulseaudio.

This commit removes the u->sink cleanup in sink_input_kill_cb, since
u->sink will be cleaned up by the module's pa__done as well (after it
has been used).

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
11 years agoi18n: Add Indonesian translation.
Andika Triwidada [Sun, 23 Sep 2012 17:17:03 +0000 (20:17 +0300)]
i18n: Add Indonesian translation.

11 years agoflist: Increase default list size to 256
David Henningsson [Thu, 19 Apr 2012 08:54:08 +0000 (10:54 +0200)]
flist: Increase default list size to 256

Nowadays, we are using more hashmaps and other things, than we did
before. Therefore, I often get the "flist is full (don't worry)"
message. This change should avoid that message. I was unable to find
any significance in increase of memory footprint from this change.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agoalsa-mixer: Add "iec958-stereo-input" to well known path names
David Henningsson [Fri, 21 Sep 2012 10:06:56 +0000 (12:06 +0200)]
alsa-mixer: Add "iec958-stereo-input" to well known path names

Interestingly, the name is properly matched even though there
is no paths/iec958-stereo-input.conf file.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agostream: Allow record streams to start muted
Arun Raghavan [Fri, 21 Sep 2012 02:13:55 +0000 (10:13 +0800)]
stream: Allow record streams to start muted

This check was valid before we introduced per-source-output volumes, so
dropping it now. Thanks to Alban Browaeys <prahal@yahoo.com> for
catching this.

11 years agoloopback: Disable adjust timer when suspended
Mikel Astiz [Thu, 20 Sep 2012 12:28:34 +0000 (14:28 +0200)]
loopback: Disable adjust timer when suspended

Stop the rate adjustment timer when no audio is flowing.

11 years agoloopback: Cork source-output if sink is suspended
Frédéric Dalleau [Thu, 20 Sep 2012 12:28:33 +0000 (14:28 +0200)]
loopback: Cork source-output if sink is suspended

During initialization, the approach avoids having a needless short
period of corked state in case the sink is suspended, by always creating
the source-output corked and uncorking it immediately afterwards when
the sink is not suspended.

11 years agoloopback: Cork sink-input if source is suspended
Frédéric Dalleau [Thu, 20 Sep 2012 12:28:32 +0000 (14:28 +0200)]
loopback: Cork sink-input if source is suspended

During initialization, the approach avoids having a needless short
period of corked state in case the source is suspended, by always
creating the sink-input corked and uncorking it immediately afterwards
when the source is not suspended.

11 years agosink-input: Remove redundant check in pa_sink_input_request_rewind().
Flavio Ceolin [Tue, 4 Sep 2012 14:28:38 +0000 (11:28 -0300)]
sink-input: Remove redundant check in pa_sink_input_request_rewind().

This bug is part of the problems spotted by Tanu.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=53923
11 years agoRevert "build: Merge bluez pkg-config checks into one"
Arun Raghavan [Fri, 7 Sep 2012 18:13:57 +0000 (23:43 +0530)]
Revert "build: Merge bluez pkg-config checks into one"

Keeping the SBC check separate means we can keep the SBC_LIBS/CFLAGS
separate, which is cleaner. Thanks to Jan Steffens for pointing out that
this was broken (SBC_* wasn't actually changed to match the configure
change).

This reverts commit da5078e5c7762557c357da4825f8927bf3162532.

11 years ago.gitignore: Add cpu-test.
Tanu Kaskinen [Fri, 7 Sep 2012 14:20:26 +0000 (17:20 +0300)]
.gitignore: Add cpu-test.

11 years agobuild: Merge bluez pkg-config checks into one
Arun Raghavan [Thu, 6 Sep 2012 16:07:34 +0000 (09:07 -0700)]
build: Merge bluez pkg-config checks into one

11 years agobluetooth: Remove commented out code.
Tanu Kaskinen [Thu, 6 Sep 2012 12:47:17 +0000 (15:47 +0300)]
bluetooth: Remove commented out code.

11 years agobluetooth: Don't force any profile on discovery module
Luiz Augusto von Dentz [Fri, 17 Aug 2012 14:21:52 +0000 (17:21 +0300)]
bluetooth: Don't force any profile on discovery module

Let device module figure out the priority based on the state of the
profiles.

Note that most likely all profiles will be in PA_BT_AUDIO_STATE_CONNECTED
state so 'Off' will be the initial profile then it is up to the policy
module to switch to the most suitable profile.

11 years agobluetooth: Remove built-in/static SBC codec
Luiz Augusto von Dentz [Fri, 17 Aug 2012 14:21:50 +0000 (17:21 +0300)]
bluetooth: Remove built-in/static SBC codec

SBC shared library is now available at:

http://git.kernel.org/?p=bluetooth/sbc.git;a=summary

11 years agosink-input: Fix underrun_for calculation when resampling.
Uoti Urpala [Sat, 28 Jul 2012 15:24:30 +0000 (18:24 +0300)]
sink-input: Fix underrun_for calculation when resampling.

pa_sink_input_seek() calculates output lenth (slength) and
corresponding input length (ilength). During an underrun, the function
generates slength bytes of silence and adds ilength to the
underrun_for value. However, the ilength value may be shortened to
match resampler limits, and there's no corresponding adjustment to
slength. Thus, the length of the generated silence is longer than
resampler output would have been, and underrun_for should be increased
by more than the limited ilength. This error makes the user-visible
since_underrun field in struct pa_timing_info too small. Fix by using
the original value calculated before limiting in this case.

11 years agosink: Remove an incorrect FIXME comment.
Tanu Kaskinen [Fri, 24 Aug 2012 13:16:43 +0000 (16:16 +0300)]
sink: Remove an incorrect FIXME comment.

The problem that the comment mentions doesn't actually
exist, because when the sink latency is changed to a smaller
value, the sink implementor will request the required
rewind.

11 years agosink-input: Add a comment in pa_sink_input_request_rewind().
Tanu Kaskinen [Wed, 29 Aug 2012 05:23:30 +0000 (08:23 +0300)]
sink-input: Add a comment in pa_sink_input_request_rewind().

11 years agosink-input: Fix comment: s/push/peek/
Tanu Kaskinen [Wed, 29 Aug 2012 05:09:36 +0000 (08:09 +0300)]
sink-input: Fix comment: s/push/peek/

11 years agobluetooth: Support HFGW in module-bluetooth-policy
Mikel Astiz [Wed, 22 Aug 2012 07:04:22 +0000 (09:04 +0200)]
bluetooth: Support HFGW in module-bluetooth-policy

Add support for hfgw card profile in module-bluetooth-policy, just like
a2dp_source is handled.

In this case also the sink needs to be connected using module-loopback.

11 years agobluetooth: Generalize module-bluetooth-policy
Mikel Astiz [Wed, 22 Aug 2012 07:04:21 +0000 (09:04 +0200)]
bluetooth: Generalize module-bluetooth-policy

Instead of focusing on a2dp_source only, prepare the module to support
several profiles. It will be possible to enable/disable each of them
using module arguments.

11 years agobluetooth: Trivial style fix
Mikel Astiz [Wed, 22 Aug 2012 07:04:20 +0000 (09:04 +0200)]
bluetooth: Trivial style fix

Use consistent style for pointer types in module-bluetooth-policy.

11 years agobluetooth: Fix bluetooth.protocol property
Mikel Astiz [Wed, 22 Aug 2012 07:04:19 +0000 (09:04 +0200)]
bluetooth: Fix bluetooth.protocol property

Property bluetooth.protocol did make a distinction between A2DP sink and
source roles but on the contrary did not separate HFP roles (headset vs
gateway). For consistency, they should both behave similarly.

This automatically fixes another incosistency: the HFGW (or HSP) sink
was set to bluetooth.protocol="sco", while the source was set to "hsp".
There is no use for this distinction, since the protocol (including the
role) is the same.

11 years agoobject: Get rid of "warning: cast increases required alignment of target type"
Tanu Kaskinen [Tue, 14 Aug 2012 14:08:37 +0000 (17:08 +0300)]
object: Get rid of "warning: cast increases required alignment of target type"

On ARM, pa_object has less strict alignment requirements
than e.g. pa_sink and pa_source, so when pa_object is cast
to pa_sink, the compiler thinks that it's unsafe. In this
case, however, the pointer given to pa_sink_ref() was a
pa_sink pointer to begin with, so casting it first to
pa_object and then back to pa_sink is entirely safe.

This particular source of warnings is extremely annoying,
because this message is printed for any compilation unit
that includes sink.h, source.h or any other header that
defines a class, and the message tends to get printed
multiple times for one compilation unit:

In file included from ./pulsecore/source-output.h:37:0,
                 from ./pulsecore/source.h:49,
                 from ./pulsecore/sink.h:40,
                 from ./pulsecore/core.h:50,
                 from daemon/daemon-conf.h:31,
                 from daemon/cmdline.h:25,
                 from daemon/cmdline.c:38:
./pulsecore/sink-input.h: In function 'pa_sink_input_ref':
./pulsecore/sink-input.h:245:1: warning: cast increases required alignment of target type [-Wcast-align]

11 years agomemblock: Add pa_memblock_acquire_chunk().
Tanu Kaskinen [Fri, 17 Aug 2012 15:09:34 +0000 (18:09 +0300)]
memblock: Add pa_memblock_acquire_chunk().

Besides making the code a bit cleaner, this also gets rid of
a few "cast increases required alignment of target type"
warnings.

11 years agobluetooth: Fix missing state checks for a2dp_source
Mikel Astiz [Thu, 16 Aug 2012 11:08:29 +0000 (13:08 +0200)]
bluetooth: Fix missing state checks for a2dp_source

Profile a2dp_source, just like any other card profile, should have
state guards when the profile is being changed. If the BlueZ interface
is not connected, the profile should be set to "off".

11 years agobluetooth: Minor style fix
Mikel Astiz [Thu, 16 Aug 2012 11:08:28 +0000 (13:08 +0200)]
bluetooth: Minor style fix

Else clause should be in the same line as the closing brace.

11 years agomanpage, finnish translation: fix spelling errors
Martin-Éric Racine [Tue, 21 Aug 2012 14:27:37 +0000 (16:27 +0200)]
manpage, finnish translation: fix spelling errors

11 years agotests: fix the wrong library path in check-daemon
Deng Zhengrong [Fri, 17 Aug 2012 05:51:23 +0000 (13:51 +0800)]
tests: fix the wrong library path in check-daemon

11 years agotests: modify ipacl-test to use 'check' framework
Deng Zhengrong [Sun, 29 Jul 2012 08:34:17 +0000 (16:34 +0800)]
tests: modify ipacl-test to use 'check' framework

11 years agotests: modify once-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 23:00:24 +0000 (07:00 +0800)]
tests: modify once-test to use 'check' framework

11 years agotests: modify lock-autospawn-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 22:58:30 +0000 (06:58 +0800)]
tests: modify lock-autospawn-test to use 'check' framework

11 years agotests: modify rtpoll-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 22:48:07 +0000 (06:48 +0800)]
tests: modify rtpoll-test to use 'check' framework

11 years agotests: modify sig2str-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 22:45:44 +0000 (06:45 +0800)]
tests: modify sig2str-test to use 'check' framework

11 years agotests: modify sigbus-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 22:26:06 +0000 (06:26 +0800)]
tests: modify sigbus-test to use 'check' framework

11 years agotests: modify interpol-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 22:12:53 +0000 (06:12 +0800)]
tests: modify interpol-test to use 'check' framework

11 years agotests: modify smoother-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 21:59:46 +0000 (05:59 +0800)]
tests: modify smoother-test to use 'check' framework

11 years agotests: modify sync-playback to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 17:21:25 +0000 (01:21 +0800)]
tests: modify sync-playback to use 'check' framework

11 years agotests: modify extended-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 17:17:27 +0000 (01:17 +0800)]
tests: modify extended-test to use 'check' framework

11 years agotests: modify hook-list-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 16:59:42 +0000 (00:59 +0800)]
tests: modify hook-list-test to use 'check' framework

11 years agotests: modify memblockq-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 16:24:33 +0000 (00:24 +0800)]
tests: modify memblockq-test to use 'check' framework

11 years agotests: modify proplist-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 14:56:43 +0000 (22:56 +0800)]
tests: modify proplist-test to use 'check' framework

11 years agotests: modify memblock-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 14:51:04 +0000 (22:51 +0800)]
tests: modify memblock-test to use 'check' framework

11 years agotests: modify connect-stress to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 14:21:56 +0000 (22:21 +0800)]
tests: modify connect-stress to use 'check' framework

11 years agotests: modify queue-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 13:53:58 +0000 (21:53 +0800)]
tests: modify queue-test to use 'check' framework

11 years agotests: modify cpulimit-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 13:34:58 +0000 (21:34 +0800)]
tests: modify cpulimit-test to use 'check' framework

11 years agotests: modify channelmap-tets to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 13:25:58 +0000 (21:25 +0800)]
tests: modify channelmap-tets to use 'check' framework

11 years agotests: modify asyncq-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 13:22:05 +0000 (21:22 +0800)]
tests: modify asyncq-test to use 'check' framework

11 years agotests: modify asyncmsgq-test to new 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 13:16:31 +0000 (21:16 +0800)]
tests: modify asyncmsgq-test to new 'check' framework

11 years agotests: modify alsa-time-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 13:08:49 +0000 (21:08 +0800)]
tests: modify alsa-time-test to use 'check' framework

11 years agotests: modify thread-mainloop-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 10:07:28 +0000 (18:07 +0800)]
tests: modify thread-mainloop-test to use 'check' framework

11 years agotests: modify thread-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 10:01:41 +0000 (18:01 +0800)]
tests: modify thread-test to use 'check' framework

11 years agotests: modify get-binary-name-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 09:45:50 +0000 (17:45 +0800)]
tests: modify get-binary-name-test to use 'check' framework

11 years agotests: modify format-test to use 'check' framework
Deng Zhengrong [Sat, 28 Jul 2012 09:25:16 +0000 (17:25 +0800)]
tests: modify format-test to use 'check' framework