]> code.delx.au - pulseaudio/log
pulseaudio
11 years agotests: enable to test standalone pulseaudio daemon
Deng Zhengrong [Mon, 23 Jul 2012 05:12:46 +0000 (13:12 +0800)]
tests: enable to test standalone pulseaudio daemon

With this fix, `check-daemon` doesn't need a system-wide running pulseaudio
anymore.

The method to use is to invoke `make check-daemon` under `src/` and it just
works! :)

11 years agobuild: add a target to ease the creation of coverage files
Deng Zhengrong [Fri, 20 Jul 2012 06:32:35 +0000 (14:32 +0800)]
build: add a target to ease the creation of coverage files

11 years agotests: Make cpu-test less verbose
Arun Raghavan [Tue, 24 Jul 2012 09:16:34 +0000 (14:46 +0530)]
tests: Make cpu-test less verbose

11 years agotests: Factor out Orc test code into cpu-test
Arun Raghavan [Tue, 24 Jul 2012 09:07:54 +0000 (14:37 +0530)]
tests: Factor out Orc test code into cpu-test

Reorganises all the svolume core test code in cpu-test since it's the
same across MMX/SSE/etc.

11 years agotests: modify strlist-test to use new 'check' framework
Deng Zhengrong [Tue, 17 Jul 2012 06:45:55 +0000 (14:45 +0800)]
tests: modify strlist-test to use new 'check' framework

11 years agotests: modify utf8-test to use new 'check' test framework
Deng Zhengrong [Tue, 17 Jul 2012 06:45:54 +0000 (14:45 +0800)]
tests: modify utf8-test to use new 'check' test framework

11 years agotests: modify mainloop-test to use new 'check' framework
Deng Zhengrong [Tue, 17 Jul 2012 06:45:53 +0000 (14:45 +0800)]
tests: modify mainloop-test to use new 'check' framework

11 years agotests: add cpu test
Deng Zhengrong [Tue, 17 Jul 2012 06:45:52 +0000 (14:45 +0800)]
tests: add cpu test

It tests only x86 architecture right now.

11 years agotests: modify mix-test to use new 'check' test framework
Deng Zhengrong [Tue, 17 Jul 2012 06:45:51 +0000 (14:45 +0800)]
tests: modify mix-test to use new 'check' test framework

11 years agobuild-sys: add `check` test framework
Deng Zhengrong [Tue, 17 Jul 2012 06:45:50 +0000 (14:45 +0800)]
build-sys: add `check` test framework

11 years agomodules: Add null/dummy echo canceller
Peter Meerwald [Tue, 24 Jul 2012 08:16:56 +0000 (10:16 +0200)]
modules: Add null/dummy echo canceller

I find a dummy/passthrough implementation useful for AEC debugging

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
11 years agobluetooth: Remove minor unnecessary check
Mikel Astiz [Thu, 26 Jul 2012 10:36:33 +0000 (12:36 +0200)]
bluetooth: Remove minor unnecessary check

The return value of dbus_message_iter_next() doesn't need to be checked
since the while condition will be false anyway (arg type will be
DBUS_TYPE_INVALID).

11 years agobluetooth: Replace deprecated ListDevices()
Mikel Astiz [Thu, 26 Jul 2012 10:36:32 +0000 (12:36 +0200)]
bluetooth: Replace deprecated ListDevices()

The method ListDevices() in org.bluez.Adapter was deprecated in BlueZ
4.61, and is going to be removed in future releases. Instead, a property
was introduced for this purpose in BlueZ 4.7.

11 years agobluetooth: Replace deprecated ListAdapters()
Mikel Astiz [Thu, 26 Jul 2012 10:36:31 +0000 (12:36 +0200)]
bluetooth: Replace deprecated ListAdapters()

The method ListAdapters() in org.bluez.Manager was deprecated in BlueZ
4.61, and is going to be removed in future releases. Instead, a property
was introduced for this purpose in BlueZ 4.22.

11 years agobluetooth: Avoid duplicating profile argument twice
Mikel Astiz [Fri, 27 Jul 2012 14:41:22 +0000 (16:41 +0200)]
bluetooth: Avoid duplicating profile argument twice

The module module-bluetooth-device should never be given parameter
'profile' twice, even if both HFGW and A2DP are playing. This patch
proposed to consider HFGW first.

11 years agobluetooth: Consider different input and output MTU
Mikel Astiz [Fri, 27 Jul 2012 14:41:21 +0000 (16:41 +0200)]
bluetooth: Consider different input and output MTU

Previous implementation assumes these values are equal, but this doesn't
necessarily have to be so.

11 years agobluetooth: Minor style fixes
Mikel Astiz [Fri, 27 Jul 2012 14:41:20 +0000 (16:41 +0200)]
bluetooth: Minor style fixes

Fix some minor style fixes to be consistent with the project coding
style.

11 years agobluetooth: Remove library for IPC to BlueZ
Mikel Astiz [Fri, 6 Jul 2012 09:19:53 +0000 (11:19 +0200)]
bluetooth: Remove library for IPC to BlueZ

This library is not used anymore after the definitive transition to
Media API.

11 years agobluetooth: Refactor property parsing code
Mikel Astiz [Wed, 25 Jul 2012 14:29:52 +0000 (16:29 +0200)]
bluetooth: Refactor property parsing code

Use a separate method to perform the common checks when a property needs
to be parsed.

11 years agobluetooth: Don't use the old socket IPC mechanism with BlueZ
Mikel Astiz [Fri, 6 Jul 2012 09:19:52 +0000 (11:19 +0200)]
bluetooth: Don't use the old socket IPC mechanism with BlueZ

This simplifies the code a lot, in favour of the D-Bus Media interface
in BlueZ. The old socket-based IPC mechanism has been deprecated and is
about to be removed soon.

11 years agobuild: Fix distcheck failure on libwebrtc-util
Arun Raghavan [Thu, 19 Jul 2012 11:25:03 +0000 (16:55 +0530)]
build: Fix distcheck failure on libwebrtc-util

Without -avoid-version, libtool creates a libwebrtc-util.so.0 and
libwebrtc-util.so.0.0.0 which are not cleaned up by make uninstall,
which in turn causes make distcheck to fail.

11 years agoi18n: module-coreaudio-device now has some translatable strings
Arun Raghavan [Thu, 19 Jul 2012 11:10:49 +0000 (16:40 +0530)]
i18n: module-coreaudio-device now has some translatable strings

11 years agoalsa: Catch role matched streams to enable/disable modifier
Feng Wei [Tue, 17 Jul 2012 10:17:21 +0000 (18:17 +0800)]
alsa: Catch role matched streams to enable/disable modifier

In UCM basic functions, we only assign intended roles from modifier
to sink/source, but we don't have a chance to set the ucm modifiers.
Here we amend the functions so that when roled stream starts or
stops, we have the following results:
1. stream will be routed to sink/source specified in modifier by
   module-intended-roles
2. After that, modifier will be enabled or disabled.
3. when multiple streams with matched roles of modifier start, only
   the first one will enable the modifier, and when they end, the
   last one will disable the modifier.

Signed-off-by: Feng Wei <wei.feng@freescale.com>
Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
11 years agobuild: Avoid libstdc++ dep for module-echo-cancel if possible
Arun Raghavan [Tue, 17 Jul 2012 07:38:20 +0000 (13:08 +0530)]
build: Avoid libstdc++ dep for module-echo-cancel if possible

This moves out the webrtc bits into a small helper library to shield the
rest of module-echo-cancel from being linked with a C++ linker. This is
required because automake will _always_ link module-echo-cancel in C++
mode if any of its deps (even conditional ones) are in C++.

11 years agoalsa-mixer: Actually install analog-input-headphone-mic.conf
Jan Alexander Steffens (heftig) [Tue, 17 Jul 2012 13:44:37 +0000 (15:44 +0200)]
alsa-mixer: Actually install analog-input-headphone-mic.conf

Without this file, pulseaudio aborts with:

  E: [pulseaudio] alsa-mixer.c: Assertion 'eb = p2->elements' failed at
  modules/alsa/alsa-mixer.c:3179, function path_set_condense(). Aborting.

11 years agoecho-cancel: Print what AEC engine is being used
Arun Raghavan [Tue, 17 Jul 2012 07:35:28 +0000 (13:05 +0530)]
echo-cancel: Print what AEC engine is being used

Useful for debugging

11 years agoi18n: Remove module-hal-detect reference in POTFILES
Arun Raghavan [Tue, 17 Jul 2012 06:27:35 +0000 (11:57 +0530)]
i18n: Remove module-hal-detect reference in POTFILES

11 years agocore: Set volumes const in pa_do_volume_func_t
Peter Meerwald [Mon, 9 Jul 2012 16:01:32 +0000 (18:01 +0200)]
core: Set volumes const in pa_do_volume_func_t

volumes do not change, the samples get scaled

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
11 years agocore: add more verbose error info
Deng Zhengrong [Tue, 10 Jul 2012 00:32:54 +0000 (08:32 +0800)]
core: add more verbose error info

I'm debugging an issue, and find that it's more useful for users to know which
directory hasn't been created instead of just knowing error code.

11 years agoman: document option `set-log-target`
Deng Zhengrong [Wed, 11 Jul 2012 14:29:45 +0000 (22:29 +0800)]
man: document option `set-log-target`

11 years agobluetooth: add a parenthesis around pa_streq()
Deng Zhengrong [Wed, 11 Jul 2012 14:42:04 +0000 (22:42 +0800)]
bluetooth: add a parenthesis around pa_streq()

I know that pa_streq() is defined with an extra parenthesis, but everytime I
look at it, it makes me nervous. :D

So it's better to add the parenthesis here.

11 years agobuild: Fix static linking
Peter Meerwald [Fri, 13 Jul 2012 07:32:04 +0000 (09:32 +0200)]
build: Fix static linking

fixes bug #52038:

gcc -static  x.c `PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config --static
--libs libpulse-simple`

/usr/bin/ld: error: cannot find -lpulsecommon-2.98
pulse/simple.c:373: error: undefined reference to 'pa_log_level_meta'
pulse/simple.c:374: error: undefined reference to 'pa_log_level_meta'

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
11 years agopacmd: Display inputs and outputs PASSTHROUGH flag
Frédéric Dalleau [Fri, 13 Jul 2012 15:38:23 +0000 (17:38 +0200)]
pacmd: Display inputs and outputs PASSTHROUGH flag

11 years agoalsa: Add separate sinks/sources for UCM modifiers if needed
Arun Raghavan [Mon, 16 Jul 2012 10:12:53 +0000 (15:42 +0530)]
alsa: Add separate sinks/sources for UCM modifiers if needed

Modifiers may have their own PlaybackPCM/CapturePCM and for these, we
create separate sinks/sources. These are marked with the
device.intended_roles property to let role-based routing take care if
streams are tagged appropriately.

11 years agoalsa: Add a proplist to mappings
Arun Raghavan [Tue, 3 Jul 2012 06:20:29 +0000 (11:50 +0530)]
alsa: Add a proplist to mappings

The proplist isn't used by the conventional alsa-mixer code path, but
can be used by UCM to transfer properties from UCM data to the
sinks/sources corresponding to a mapping. These properties could be used
later in policy, etc.

The specific use for which I'm writing this now is for UCM modifiers
that have their own PlaybackPCM/CapturePCM field. These will be
translated to a separate sink/source corresponding to the modifier by
adding an additional mapping per sink/source. These mappings' proplist
will be populated with the name of the modifier and corresponding
"device.intended_role" property. The latter will be used in the usual
routing-by-role way, and the former will be used during sink/source
activation and deactivation to know what UCM modifier is to be enabled
or disabled.

11 years agoalsa: Allow channel count probe on open by mapping
Arun Raghavan [Mon, 16 Jul 2012 10:20:10 +0000 (15:50 +0530)]
alsa: Allow channel count probe on open by mapping

This allows opening a PCM given a mapping to work even if we don't have
a channel count for the device up-front.

11 years agoalsa: Add UCM jack detection
Feng Wei [Thu, 5 Jul 2012 05:03:45 +0000 (13:03 +0800)]
alsa: Add UCM jack detection

Jack in UCM is decided by UCM device name, although in fact
not all UCM devices have "jacks". Because port is also mapped
to UCM device, we can always find target port when some jack
event happens.

Signed-off-by: Feng Wei <wei.feng@freescale.com>
11 years agoalsa: Integrate UCM basic functions
Feng Wei [Thu, 5 Jul 2012 04:53:21 +0000 (12:53 +0800)]
alsa: Integrate UCM basic functions

UCM basic functions will provide another way to handle the alsa mixer
and controls. That means alsa card module will make use of alsa ucm
configurations provided by various audio systems instead of mixer and
paths configurations provided by PA. PA profiles come from UCM verb, PA
sinks/sources and ports come from UCM devices.

In case the proper UCM configurations are found, ucm branches are
activated, or we will still fall through to the original way.

Signed-off-by: Feng Wei <wei.feng@freescale.com>
11 years agoalsa-mixer: Add "Headphone Mic" support for 3-pin ASUS netbooks
David Henningsson [Thu, 28 Jun 2012 14:03:17 +0000 (16:03 +0200)]
alsa-mixer: Add "Headphone Mic" support for 3-pin ASUS netbooks

Some ASUS netbooks, such as the 1015 CX, have only one 3.5 mm jack,
but it can be used either as a headphone or as a mic (but not both
simultaneously).

This patch adds support for the "Headphone Mic" path that is used
on these devices, so that we can use the jack as an external mic, and
doing so without muting the speaker.

BugLink: https://bugs.launchpad.net/bugs/1018262
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agoosx: Add a single "On" profile to coreaudio devices. Fixes crash on OS X.
Sjors Gielen [Sun, 8 Jul 2012 21:24:18 +0000 (23:24 +0200)]
osx: Add a single "On" profile to coreaudio devices. Fixes crash on OS X.

Since commit 12af302a last month, cards always have at least one
profile, so there is also always an active_profile (this makes the code
more simple). However, module-coreaudio-device did not create a profile
yet, causing a crash of PulseAudio when used on OS X. This patch fixes
this crash, by adding a single "On" profile. I've also added a TODO for
adding an "Off" profile which removes all sinks and sources -- I can
work on resolving this TODO later on.

11 years agoalsa: Merge pa_alsa_setting_select with pa_alsa_path_select
Jarkko Nikula [Thu, 22 Mar 2012 09:29:12 +0000 (11:29 +0200)]
alsa: Merge pa_alsa_setting_select with pa_alsa_path_select

As these functions are called together and are related, we might merge
them and call setting_select from pa_alsa_path_select by passing
optional pa_alsa_setting argument.

Make also the setting_select static as it is not called outside of
alsa-mixer.c after this change.

[Additional note from Tanu Kaskinen: this change improves the
mute-during-activation feature, because now the mixer changes related
to selecting the setting happen while the hw is muted.]

11 years agoalsa: move pa_alsa_setting_select close to pa_alsa_path_select
Jarkko Nikula [Thu, 22 Mar 2012 09:29:11 +0000 (11:29 +0200)]
alsa: move pa_alsa_setting_select close to pa_alsa_path_select

Move pa_alsa_setting_select call just after the pa_alsa_path_select in
[sink | source]_set_port_cb functions as there is no dependency to volume
calculations that are done between these two calls. Idea here is to make
possible to merge these two functions since they are called together from
other places too.

11 years agoalsa-mixer: Implement a new path option: "mute-during-activation".
Tanu Kaskinen [Thu, 22 Mar 2012 09:29:10 +0000 (11:29 +0200)]
alsa-mixer: Implement a new path option: "mute-during-activation".

11 years agomemblock: Fix typos.
Peter Meerwald [Wed, 22 Feb 2012 12:07:17 +0000 (13:07 +0100)]
memblock: Fix typos.

11 years agocard-restore: Handle reading NULL profile name from the database.
Tanu Kaskinen [Sat, 30 Jun 2012 10:00:25 +0000 (13:00 +0300)]
card-restore: Handle reading NULL profile name from the database.

It's assumed in a couple of places that entry_read()
initializes entry->profile to a non-NULL string. This patch
makes those assumptions hold.

Tested-by: Mikel Astiz <mikel.astiz.oss@gmail.com>
11 years agocard-restore: Add the ability to save and restore the latency offset.
poljar (Damir Jelić) [Wed, 27 Jun 2012 20:55:35 +0000 (22:55 +0200)]
card-restore: Add the ability to save and restore the latency offset.

module-card-restore now saves the latency offsets.

This change includes a entry version bump.

The entry now consists of a port count and a port name and offset for
every port that belongs to the relevant card.

11 years agobluetooth: module-bluetooth-policy initial commit
Frédéric Dalleau [Wed, 4 Jul 2012 14:48:27 +0000 (16:48 +0200)]
bluetooth: module-bluetooth-policy initial commit

This is a basic module for enabling loopback as soon as a new bluetooth A2DP
source is created. The module is given a source and a media role using command
line. This allows module-intended-roles or module-device-manager to choose a
target sink for the stream.

11 years agoloopback: Enable routing on loopback streams
Frédéric Dalleau [Wed, 20 Jun 2012 15:33:35 +0000 (17:33 +0200)]
loopback: Enable routing on loopback streams

At module-loopback load, if no sink is given, the default sink is used. If the
stream has a media.role property, the property cannot be used because a the
source or sink is forced to default. Both module-intended-roles and
module-device-manager are affected. The same apply to sources.

With this patch, if sink or source is missing, routing modules can be used.

11 years agorole-cork: Fix another minor leak
Arun Raghavan [Tue, 3 Jul 2012 12:41:54 +0000 (18:11 +0530)]
role-cork: Fix another minor leak

Credit to David for finding this one.

11 years agoRevert "Revert "role-cork: Fix a minor leak""
Arun Raghavan [Tue, 3 Jul 2012 12:34:48 +0000 (18:04 +0530)]
Revert "Revert "role-cork: Fix a minor leak""

This reverts commit a2c4bf22e0813d529f153c01d7421345a792f3bc.

As Tanu points out, I'm stupid. The pa_xstrdup(n) was unnecessary
because pa_split() allocates a new string for us.

11 years agorole-cork: Fix incorrect check at deinitialisation time
Arun Raghavan [Tue, 3 Jul 2012 12:22:36 +0000 (17:52 +0530)]
role-cork: Fix incorrect check at deinitialisation time

11 years agoRevert "role-cork: Fix a minor leak"
Arun Raghavan [Tue, 3 Jul 2012 12:30:36 +0000 (18:00 +0530)]
Revert "role-cork: Fix a minor leak"

This reverts commit 51c8d5a477d36f0646243a092994036b3781e9c1.

As David points out, this was incorrect.

11 years agoalsa-mixer: Add "Front Headphone Jack" (fixup)
David Henningsson [Tue, 3 Jul 2012 08:31:30 +0000 (10:31 +0200)]
alsa-mixer: Add "Front Headphone Jack" (fixup)

I forgot half of the front headphone patch, i e, to hide the
speaker output when the front headphone is connected. Thanks to
Shih-Yuan Lee for noticing.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agocore-util: Fix permissions handling while creating directories
Arun Raghavan [Tue, 3 Jul 2012 03:19:26 +0000 (08:49 +0530)]
core-util: Fix permissions handling while creating directories

This makes updating of permissions on existing directories optional with
pa_make_secure_dir() and pa_make_secure_parent_dir(). This makes sure
that the recursive directory creation doesn't end up modifying existing
directories, and also fixes a problem where creating an auth cookie
(specifically ~/.esd_auth) would end up modifying permissions on ~.
Thanks to Frédéric Danis for reporting this.

11 years agoadd a new log target that enables to create new log file if it exists
Deng Zhengrong [Thu, 28 Jun 2012 07:27:57 +0000 (15:27 +0800)]
add a new log target that enables to create new log file if it exists

11 years agoalsa-mixer: Document "state.plugged" and "state.unplugged"
David Henningsson [Mon, 2 Jul 2012 10:17:30 +0000 (12:17 +0200)]
alsa-mixer: Document "state.plugged" and "state.unplugged"

Put explanation of state.plugged and state.unplugged in
analog-output.conf.common.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agoalsa-mixer: Add "Front Headphone" jack
David Henningsson [Mon, 2 Jul 2012 10:09:06 +0000 (12:09 +0200)]
alsa-mixer: Add "Front Headphone" jack

Many desktops have headphone on the front and line outs on the back.
Sometimes this means that the headphone is labelled "Front Headphone Jack",
but the volume controls are only "Headphone Playback Volume", i e,
without the "Front" prefix.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agoalsa-mixer: Always turn "Inverted Internal Mic" off
David Henningsson [Thu, 28 Jun 2012 13:40:17 +0000 (15:40 +0200)]
alsa-mixer: Always turn "Inverted Internal Mic" off

Some devices have inverted right channel, so when you add left and right,
the result is silence, or very faint sound. In recent kernels (3.5,
perhaps also 3.4) these are starting to be marked with a special
"Inverted Internal Mic" capture switch.

While we might want to add some reverse summing mechanism in the
future, for now, we just turn the thing off to avoid the problem of
recording silence.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agoalsa-mixer: Add Phantom Jack support
David Henningsson [Thu, 28 Jun 2012 13:35:38 +0000 (15:35 +0200)]
alsa-mixer: Add Phantom Jack support

For kernel 3.6, "phantom jack" kctls have been added. They serve as
a marker that a particular port exist. They were made so we can detect
that there actually are speakers and internal mic on a laptop, even if
there are no other indications (volume controls etc).

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agoalsa-mixer: Add special profiles for some laptops missing speaker and/or internal mic
David Henningsson [Thu, 3 May 2012 13:39:18 +0000 (15:39 +0200)]
alsa-mixer: Add special profiles for some laptops missing speaker and/or internal mic

Several laptops have speaker ports, and/or internal mic ports, but we have
no way of detecting that. So we make the port(s) always show up for these
devices.

BugLink: https://bugs.launchpad.net/bugs/946232
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
11 years agoman: Add latency offset documentation to the cli syntax.
poljar (Damir Jelić) [Thu, 28 Jun 2012 13:02:27 +0000 (15:02 +0200)]
man: Add latency offset documentation to the cli syntax.

The new latency offset command is now documented in the
pulse-cli-syntax man page.

11 years agopactl: Add set-latency-offset command.
poljar (Damir Jelic) [Thu, 28 Jun 2012 13:00:46 +0000 (15:00 +0200)]
pactl: Add set-latency-offset command.

This introduces a new command to allow setting the latency offset.

Also the card list command now shows the latency offset on the ports.

11 years agointrospect: Add functions to handle the latency offset.
poljar (Damir Jelic) [Thu, 28 Jun 2012 13:00:45 +0000 (15:00 +0200)]
introspect: Add functions to handle the latency offset.

This includes updating the native protocol and the client API.
A new command was added to allow setting the latency offset.

Also the card list command now shows the latency offset if there
are ports available.

Update protocol to 27.

11 years agoFix spelling of separated: s, sepera, separa, g
Paul Menzel [Sat, 19 May 2012 08:03:01 +0000 (10:03 +0200)]
Fix spelling of separated: s, sepera, separa, g

The used command for fixing the script is the following.

    $ git grep sepera | cut --delimiter=: --fields=1 | xargs sed -i s,sepera,separa,g

This patch is motivated by a patch in Debian from Martin-Éric Racine [1].

[1] http://anonscm.debian.org/gitweb/?p=pkg-pulseaudio/pulseaudio.git;a=commitdiff;h=70e7261a615141908c0cf366fd49e0fc0f550fbf

11 years agodevice-port: Send a subscription event when the offset changes.
poljar (Damir Jelić) [Thu, 28 Jun 2012 11:17:21 +0000 (13:17 +0200)]
device-port: Send a subscription event when the offset changes.

When the offset changes a subscription event should be sent to the
relevant card.

11 years agoconf-parser: Initialize the state to zero immediately.
poljar (Damir Jelić) [Fri, 29 Jun 2012 21:19:52 +0000 (23:19 +0200)]
conf-parser: Initialize the state to zero immediately.

Set the state variable immediately to zero so if we fail to open the
configuration file we don't check an uninitialized pointer and free an
nonexistent proplist.

11 years agoAssume that the ports hashmap of cards is always non-NULL.
Tanu Kaskinen [Fri, 8 Jun 2012 18:49:12 +0000 (21:49 +0300)]
Assume that the ports hashmap of cards is always non-NULL.

The hashmap is created in pa_card_new_data_init().

11 years agoAssume that the profiles hashmap of ports is always non-NULL.
Tanu Kaskinen [Fri, 8 Jun 2012 18:49:11 +0000 (21:49 +0300)]
Assume that the profiles hashmap of ports is always non-NULL.

It's a valid assumption nowadays, because the hashmap is
created in pa_device_port_new().

11 years agocard: Ensure that there's always at least one profile.
Tanu Kaskinen [Fri, 8 Jun 2012 18:49:10 +0000 (21:49 +0300)]
card: Ensure that there's always at least one profile.

In practice there is always at least one profile, and I
don't think there will ever be cards without profiles.
Therefore, I added assertions to pa_card_new() stating that
the card new data must always contain at least one profile.
Now a lot of code can be simplified, because it's guaranteed
that the profiles hashmap and the active_profile field are
always non-NULL.

11 years agosink, source: Always create a hashmap for ports.
Tanu Kaskinen [Fri, 8 Jun 2012 18:49:09 +0000 (21:49 +0300)]
sink, source: Always create a hashmap for ports.

Having the hashmap sometimes NULL requires a lot of checking
here and there, so ensuring that the hashmap is always
non-NULL simplifies the code.

11 years agocard: Don't crash if someone gives NULL name to pa_card_set_profile().
Tanu Kaskinen [Fri, 8 Jun 2012 16:36:45 +0000 (19:36 +0300)]
card: Don't crash if someone gives NULL name to pa_card_set_profile().

In my opinion, pa_card_set_profile() should assert that name
is not NULL, and it would be the job of the client interface
to filter out NULLs from the client input, but this is done
this way also when setting sink and source ports, so for
consistency I'll do this this way for now.

11 years agopactl: Print card port properties with the "list" command.
Tanu Kaskinen [Fri, 13 Apr 2012 11:48:30 +0000 (14:48 +0300)]
pactl: Print card port properties with the "list" command.

11 years agonative: Send the actual port proplists with card info.
Tanu Kaskinen [Fri, 13 Apr 2012 11:48:29 +0000 (14:48 +0300)]
native: Send the actual port proplists with card info.

11 years agoalsa-mixer: Add support for defining port property lists in the path configuration...
Tanu Kaskinen [Fri, 13 Apr 2012 11:48:28 +0000 (14:48 +0300)]
alsa-mixer: Add support for defining port property lists in the path configuration files.

11 years agoconf-parser: Add support for parsing property lists.
Tanu Kaskinen [Fri, 13 Apr 2012 11:48:27 +0000 (14:48 +0300)]
conf-parser: Add support for parsing property lists.

11 years agoconf-parser: Pass parser state in a struct also for parse callbacks.
Tanu Kaskinen [Fri, 13 Apr 2012 11:48:26 +0000 (14:48 +0300)]
conf-parser: Pass parser state in a struct also for parse callbacks.

As suggested by Maarten Bosmans:
http://article.gmane.org/gmane.comp.audio.pulseaudio.general/12079

11 years agoconf-parser: Pass parser state in a struct instead of function parameters.
Tanu Kaskinen [Fri, 13 Apr 2012 11:48:25 +0000 (14:48 +0300)]
conf-parser: Pass parser state in a struct instead of function parameters.

I don't like long function parameter lists, and I plan to
add some more state data to the parser which would make the
parameter lists even longer without this refactoring.

11 years agotagstruct: Allow NULL proplist with pa_tagstruct_get_proplist().
Tanu Kaskinen [Fri, 13 Apr 2012 11:40:32 +0000 (14:40 +0300)]
tagstruct: Allow NULL proplist with pa_tagstruct_get_proplist().

module-tunnel doesn't care about the proplist contents, so
pa_tagstruct_get_proplist() is only used for removing the
data from the tagstruct buffer. In that case it's more
convenient to just pass NULL as the proplist argument.

11 years agoproplist: Change proplist_name_valid() to be public function pa_proplist_key_valid().
Tanu Kaskinen [Fri, 13 Apr 2012 11:40:31 +0000 (14:40 +0300)]
proplist: Change proplist_name_valid() to be public function pa_proplist_key_valid().

I want to check the validity in pa_tagstruct_get_proplist(),
and I think also client applications might have use for this
function.

11 years agopulse: Use more intuitive indexing with port infos in introspect.c.
Tanu Kaskinen [Fri, 13 Apr 2012 11:32:12 +0000 (14:32 +0300)]
pulse: Use more intuitive indexing with port infos in introspect.c.

11 years agoFix a copy-paste error in PROTOCOL.
Tanu Kaskinen [Fri, 13 Apr 2012 11:31:44 +0000 (14:31 +0300)]
Fix a copy-paste error in PROTOCOL.

11 years agoglib: Stop using g_source_get_current_time()
Arun Raghavan [Thu, 28 Jun 2012 14:01:37 +0000 (19:31 +0530)]
glib: Stop using g_source_get_current_time()

This function is now marked as deprecated. It is functionally identical
to g_get_current_time(), so we use that instead. The GLib API docs
suggest g_source_get_time(), but that does not provide wallclock time
(which is what the pa_time_event API expects), so we don't use it.

11 years agosink, source: Fix setting the latency offset when the sink/source is unlinked.
Tanu Kaskinen [Thu, 28 Jun 2012 13:34:56 +0000 (16:34 +0300)]
sink, source: Fix setting the latency offset when the sink/source is unlinked.

11 years agodevice-port: Change the latency offset type to a signed int.
poljar (Damir Jelić) [Wed, 27 Jun 2012 15:38:42 +0000 (17:38 +0200)]
device-port: Change the latency offset type to a signed int.

The latency offset type should be signed (int64_t) so we can also add
a negative latency offset.

This also includes changing the type of the sink/source
offsets and updating pacmd so it handles negative numbers.

11 years agoladspa: Added a python script for testing.
Ismo Puustinen [Fri, 15 Jun 2012 14:35:59 +0000 (17:35 +0300)]
ladspa: Added a python script for testing.

The python script uses the ladspa D-Bus interface for IPC testing.

11 years agoladspa: D-Bus interface for setting algorithm parameters on-the-fly.
Ismo Puustinen [Fri, 15 Jun 2012 14:35:58 +0000 (17:35 +0300)]
ladspa: D-Bus interface for setting algorithm parameters on-the-fly.

A new external D-Bus interface is registered and LADSPA algorithm
control parameters are exposed as a D-Bus property with setter and
getter support.

11 years agoxen: add the HAVE_CONFIG_H macro guard
Deng Zhengrong [Sat, 23 Jun 2012 11:16:26 +0000 (19:16 +0800)]
xen: add the HAVE_CONFIG_H macro guard

11 years agopacmd: add help info for 'set-log-target'
Deng Zhengrong [Sat, 23 Jun 2012 11:15:14 +0000 (19:15 +0800)]
pacmd: add help info for 'set-log-target'

11 years agobuild: Add gcov coverage support
Deng Zhengrong [Sat, 23 Jun 2012 11:14:12 +0000 (19:14 +0800)]
build: Add gcov coverage support

11 years agopactl: Print sink-input/source-output corked status
Arun Raghavan [Thu, 28 Jun 2012 06:49:27 +0000 (12:19 +0530)]
pactl: Print sink-input/source-output corked status

Sending this out for review before committing since it changes pactl output.

11 years agopacmd: Add functions to handle the latency offset
poljar [Fri, 22 Jun 2012 18:55:55 +0000 (20:55 +0200)]
pacmd: Add functions to handle the latency offset

pacmd was extended so it can handle the new latency offset.

A new function was added so we can set the latency also the list
commands were extended to print the latency offset on the ports.

11 years agosink, source: Add a latency offset which is inherited from the port
poljar [Fri, 22 Jun 2012 18:55:54 +0000 (20:55 +0200)]
sink, source: Add a latency offset which is inherited from the port

A latency offset variable was added to the sink/source struct.

Also a function was introduced to update the latency offset of the
sink/source and a new message type was introduced so we can send the latency
offset to the IO thread.

The latency offset is automatically populated with the latency from the
currently active port.

11 years agodevice-port: Add a latency variable to the port struct
poljar [Fri, 22 Jun 2012 18:55:53 +0000 (20:55 +0200)]
device-port: Add a latency variable to the port struct

A latency offset variable was added to the port struct and a function to
set the latency offset.

The latency offset does nothing for now, but it will be later added to
the sink/source latency.

11 years agocore-util: use the generic PATH_MAX variant of pa_realpath on Mac OS X
Mihai Moldovan [Tue, 29 May 2012 07:21:54 +0000 (09:21 +0200)]
core-util: use the generic PATH_MAX variant of pa_realpath on Mac OS X

realpath() on OS X behaves GNUish and accepts NULL for resolved_name
only on 10.6 and higher. Older versions will crash, if resolved_name is
NULL.

All versions define PATH_MAX, though. Better play it safe and use the
generic PATH_MAX version of pa_realpath on Mac OS X systems.

Signed-off-by: Mihai Moldovan <ionic@ionic.de>
11 years agobluetooth: Fix bluetooth.nrec property not updated
Frédéric Danis [Tue, 12 Jun 2012 13:49:50 +0000 (15:49 +0200)]
bluetooth: Fix bluetooth.nrec property not updated

PropertyChanged signal of org.BlueZ.MediaTransport is processed in
pa_bluetooth_transport_parse_property() which updates t->nrec.
This is called by :
- First by filter_cb() of bluetooth-util.c
- Then by filter_cb() of module-bluetooth-device.c which retrieve value
  of t->nrec before calling parse function, then it checks if t->nrec
  has changed before updating bluetooth.nrec property.
  As t->nrec has alreday been changed during first process, property
  update is never performed.

This patch creates a new hook in pa_bluetooth_transport called
PA_BLUETOOTH_TRANSPORT_HOOK_NREC_CHANGED.
The hook is fired by bluetooth-util.c when the transport's NREC
property changes.
module-bluetooth-device.c won't listen the PropertyChanged signal of
MediaTransport anymore. Instead, it will use the hook in
pa_bluetooth_transport to get a notification when the NREC property
changes, and update the sink or source proplist accordingly.

const qualifier for returned pointer of
pa_bluetooth_discovery_get_transport() is removed.

11 years agoauth: Create cookie directory if it doesn't exist
Arun Raghavan [Mon, 11 Jun 2012 07:45:00 +0000 (13:15 +0530)]
auth: Create cookie directory if it doesn't exist

Makes sure the cookie directory exists before trying to create the
cookie. This might be the case on freshly installed headless systems.

11 years agocore-util: Make pa_make_secure_dir() act like mkdir -p
Arun Raghavan [Mon, 11 Jun 2012 07:42:50 +0000 (13:12 +0530)]
core-util: Make pa_make_secure_dir() act like mkdir -p

This makes pa_make_secure_dir() create any missing parent directories in
the given path as well. This is useful, for example, on a pristine
system with a clean $HOME that needs ~/.config/pulse/ to be created when
~/.config does not exist.

11 years agocore-util: Add a pa_split_in_place() string utility function
Arun Raghavan [Wed, 13 Jun 2012 11:01:59 +0000 (16:31 +0530)]
core-util: Add a pa_split_in_place() string utility function

For specialised uses of pa_split() such as finding substrings for
comparison, this avoids the need to repeatedly allocate and deallocate
memory.

11 years agorole-cork: Fix a minor leak
Arun Raghavan [Wed, 13 Jun 2012 10:59:35 +0000 (16:29 +0530)]
role-cork: Fix a minor leak

11 years agonative: Don't save device, volume or mute of new streams.
Tanu Kaskinen [Thu, 5 Apr 2012 13:24:48 +0000 (16:24 +0300)]
native: Don't save device, volume or mute of new streams.

Specifying the volume when creating a new stream is not an
equivalent act as setting the volume with a volume control
application. When creating a new stream, stream-restore
shouldn't save the volume, but when changing the volume,
then saving it is ok. For example, when I say
"paplay --volume=10000 somefile.wav", I mean that I want the
new stream to have volume 10000. I don't mean that also
future paplay invocations (without the --volume option)
should have that same volume.

This patch effectively reverts
546bcf3f2f9711f0d08c21c3b775994844e7e2a2.