platform/upstream/pulseaudio.git
9 years agorelease: updated changelog 31/31931/1 tizen-dev tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0_ivi accepted/tizen/3.0.2015.q2/common/20150630.080055 accepted/tizen/common/20141215.134000 accepted/tizen/ivi/20141219.050134 accepted/tizen/mobile/20141216.081858 accepted/tizen/tv/20141216.081422 accepted/tizen/wearable/20141216.081414 submit/tizen/20141212.094942 submit/tizen_3.0.2015.q2_common/20150626.122631 tizen_3.0_ivi_release
Jaska Uimonen [Fri, 12 Dec 2014 06:22:21 +0000 (08:22 +0200)]
release: updated changelog

Change-Id: I3a743a2de07722c0ae20f473136cfb24fefabbd2
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agoconfig: do not change digital controls from analog path config. 02/31802/3
Ismo Puustinen [Wed, 10 Dec 2014 11:08:51 +0000 (13:08 +0200)]
config: do not change digital controls from analog path config.

When the default ALSA analog path configuration is loaded, it disables
digital IEC958 mixer controls. This should not be needed, since digital outputs
are handled from a different sink. Therefore remove the configuration that
touches the controls.

Change-Id: Ia7b049d55bcece26eae8e2b9f2c5b3f2df66bbd6

9 years agoremove bashisme 69/31169/2
Ronan Le Martret [Tue, 2 Dec 2014 08:54:59 +0000 (09:54 +0100)]
remove bashisme

 - build Tizen on yocto project

Change-Id: I01c49db28f516cf2cc4a25cf9abd5ee2f3489d68
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
9 years agovolume-api: Fix strict-aliasing warnings 86/30986/2
Tanu Kaskinen [Tue, 30 Sep 2014 09:29:06 +0000 (12:29 +0300)]
volume-api: Fix strict-aliasing warnings

It's apparently not safe to reinterpret the memory stored in double
variables as uint64_t, so let's use memcpy().

Change-Id: If6474f2d047c92d9dd7607ed5692ccd08f78b5f3

9 years agoinidb: Avoid calling fclose() twice 85/30985/2
Tanu Kaskinen [Fri, 28 Nov 2014 08:55:30 +0000 (10:55 +0200)]
inidb: Avoid calling fclose() twice

f needs to be set to NULL after calling fclose(), otherwise fclose
will be called again in the "fail" section if the first call fails,
which results in undefined behaviour (a crash has been observed[1]).

[1] https://lists.tizen.org/pipermail/ivi/2014-November/003693.html

Change-Id: Iaa1539a379b8be31b62834f49240d17fdf45c893

9 years agopackaging: Add the pulseaudio-cascaded-setup package 09/30209/3
Tanu Kaskinen [Wed, 29 Oct 2014 20:20:01 +0000 (22:20 +0200)]
packaging: Add the pulseaudio-cascaded-setup package

Change-Id: I1a1504ac2496af127557c5d45f64fef4c284cdc6

9 years agoAdd systemd service and socket files for the system mode 08/30208/3
Tanu Kaskinen [Wed, 1 Oct 2014 10:27:25 +0000 (13:27 +0300)]
Add systemd service and socket files for the system mode

Change-Id: If3783b3a86108dd968911613f5f63693cb5161c6

9 years agoAdd configuration for the "cascaded setup" 07/30207/3
Tanu Kaskinen [Thu, 23 Oct 2014 10:27:54 +0000 (13:27 +0300)]
Add configuration for the "cascaded setup"

If cascaded.pa is installed, then hardware should be managed by the
system instance, and user instances should use the hardware via the
system instance.

Change-Id: I6879bbcb50e131941c75b8c91a11e098d07428e5

9 years agosystemd: Disable TCP socket activation for user instances 06/30206/3
Tanu Kaskinen [Wed, 12 Nov 2014 13:22:03 +0000 (15:22 +0200)]
systemd: Disable TCP socket activation for user instances

The TCP port can be listened by only one process, so if the system
instance listens it, then user instances can't listen. Or if there
are multiple users, only one can listen.

Since systemd uses an "all or nothing" approach, the unix socket
activation doesn't work either when the TCP socket fails. It's not
terribly important to have TCP socket activation (at least at this
point), so let's just drop it from user instances.

Change-Id: I6258ee9c7a5ae7de4dcee209440de2df7a779e1d

9 years agopackaging: Install the tunnel-manager and logind files 05/30205/3
Tanu Kaskinen [Thu, 30 Oct 2014 10:24:33 +0000 (12:24 +0200)]
packaging: Install the tunnel-manager and logind files

Change-Id: I0502677165496449db85569f985de1a317f781b1

9 years agotunnel-manager: Implement a policy that enables tunnels based on the device seat 46/31446/1
Tanu Kaskinen [Wed, 3 Dec 2014 12:39:52 +0000 (14:39 +0200)]
tunnel-manager: Implement a policy that enables tunnels based on the device seat

Change-Id: Ib4dd17936ff0f18f8cbf9b3e723a183a73f354af

9 years agoudev: Store the seat id in device proplists 45/31445/1
Tanu Kaskinen [Thu, 4 Dec 2014 10:46:05 +0000 (12:46 +0200)]
udev: Store the seat id in device proplists

When using PulseAudio in system mode, it may be interesting to know
which seats the devices are assigned to. This will be used in the
tunnel manager to filter out the devices that belong to other users.

Change-Id: Iad81513430d448bd5974e5b021293ed0976f426d

9 years agologind: Add seat tracking 44/31444/1
Tanu Kaskinen [Wed, 3 Dec 2014 13:20:19 +0000 (15:20 +0200)]
logind: Add seat tracking

This will be used by the tunnel manager to filter out devices in the
system instance that belong to some other user.

Change-Id: Ib1ba098014a485fef320a6ce4bc034973b607e9c

9 years agologind: Move the code that interfaces with logind to liblogind.so 43/31443/1
Tanu Kaskinen [Tue, 2 Dec 2014 19:48:37 +0000 (21:48 +0200)]
logind: Move the code that interfaces with logind to liblogind.so

This doesn't change the behaviour in any important way. The purpose of
this move is to provide access to logind from multiple modules without
needing to use the logind API from more than one place. Currently
there's only one module using liblogind.so, but module-tunnel-manager
will need seat tracking, so that will be another module that needs to
access logind.

Change-Id: I352193fef0d0b0601ea509af501af395786c6cf9

9 years agotunnel-manager: Make the tunnel enabling policy configurable 42/31442/1
Tanu Kaskinen [Wed, 3 Dec 2014 12:05:44 +0000 (14:05 +0200)]
tunnel-manager: Make the tunnel enabling policy configurable

There's no real configurability yet, because only one condition is
supported. Support for more conditions will be added later.

The syntax of the configuration option pretends to conform to some
programming language, but there's no real parser for the language.
A proper parser may be implemented later, but for now the option
values are parsed simply by comparing to a list of predefined string
constants.

Change-Id: I57bbb0cd2b91691415be78f9732aef6b3bebde56

9 years agotunnel-manager: Load tunnel sinks and sources 88/30988/2
Tanu Kaskinen [Thu, 27 Nov 2014 10:30:35 +0000 (12:30 +0200)]
tunnel-manager: Load tunnel sinks and sources

This makes the tunnel manager load tunnel sinks and sources for all
devices in the remote servers, except for monitor sources.

Change-Id: Ie3793dfc8a500b2ae7ec6b2b0a82e49793361f91

9 years agotunnel-new: Read parameters from tunnel manager when available 87/30987/2
Tanu Kaskinen [Thu, 27 Nov 2014 12:57:10 +0000 (14:57 +0200)]
tunnel-new: Read parameters from tunnel manager when available

This prepares for loading tunnel sink and source module instances from
the tunnel manager.

If the tunnel manager is available, and the tunnel manager has
sample spec and channel map information for the device, then let's use
that information when creating the sink or source so that the tunnel
will automatically match the parameters of the remote device. The
remote device's proplist is copied to the tunnel too.

Change-Id: I2755d6fc984d9014bc039924dd1d51ea5689c22c

9 years agotunnel-manager: New module for managing tunnels to remote servers 04/30204/3
Tanu Kaskinen [Fri, 3 Oct 2014 04:20:11 +0000 (07:20 +0300)]
tunnel-manager: New module for managing tunnels to remote servers

The initial use case for this module is to connect user PulseAudio
instances to the system instance via tunnel sinks and sources. This
is the so called "cascaded setup". The point of doing that is to allow
multiple users to access the same hardware simultaneously.

The module connects to zero or more remote servers and builds an
internal representation of all sinks and sources in those servers.
Currently the module doesn't actually load any tunnel sinks or
sources, because the tunnel sink and source code have to be first
modified a bit (the next patch does that).

The remote servers are configured in a separate configuration file
that is named tunnel-manager.conf. Currently only the server address
can be configured, but I expect more configuration options to be
implement in the future, such as options for defining the policy of
which remote devices to use. Here's an example of the configuration
file syntax:

    [RemoteServer foo]
    address = /run/pulse/native

    [RemoteServer bar]
    address = example.com

The bulk of the functionality is not in module-tunnel-manager.so, but
in libtunnel-manager.so, which will be used also by the tunnel sink
and source modules to access the information that the tunnel manager
has previously queried from the remote server.

Change-Id: I3d41936451572b6341cfb9717e07b355d8449490

9 years agodevice-type: Add pa_device_type_to_string() 41/31441/1
Tanu Kaskinen [Thu, 4 Dec 2014 13:51:26 +0000 (15:51 +0200)]
device-type: Add pa_device_type_to_string()

This is needed by the tunnel manager. It feels a bit silly to
introduce new source files for just this function, but I couldn't
think of any other appropriate place. pa_device_type_t is defined
in pulse/def.h, and that's not an appropriate place for any
functions.

Change-Id: I6f969fe3acb934e8bb8fdfa5873a4d6d3fa6721c

9 years agomodule: Add PA_CORE_HOOK_MODULE_UNLOAD 03/30203/1
Tanu Kaskinen [Wed, 12 Nov 2014 09:42:55 +0000 (11:42 +0200)]
module: Add PA_CORE_HOOK_MODULE_UNLOAD

Change-Id: I20a6bdd2f367a332554d86219de0ea22e08d82d9

9 years agotunnel-sink-new: Fix requested latency check 02/30202/1
Tanu Kaskinen [Fri, 3 Oct 2014 04:42:21 +0000 (07:42 +0300)]
tunnel-sink-new: Fix requested latency check

This fixes a bug in latency configuration. The wrong type in the cast
caused UINT64_MAX being not treated as special, so the configured
latency was set to UINT64_MAX usecs, which of course is absurdly huge
latency.

Change-Id: Iec239e7970944ed920837580a09bfe76a2ae2bfd

9 years agotunnel-sink-new: Limit the maximum latency to 200 ms 01/30201/1
Tanu Kaskinen [Fri, 3 Oct 2014 04:38:55 +0000 (07:38 +0300)]
tunnel-sink-new: Limit the maximum latency to 200 ms

The default maximum latency is 10 seconds, which is not good,
especially since the tunnel sink doesn't support rewinding. Due to the
lack of rewinding, e.g. volume changes take a long time with large
latencies.

Change-Id: I13753d30a17598ebc9e6a3eda3db4096ff6fcf4e

9 years agobuild-sys: Fix a variable value check 00/30200/1
Tanu Kaskinen [Wed, 12 Nov 2014 08:53:15 +0000 (10:53 +0200)]
build-sys: Fix a variable value check

Change-Id: Ie39c9c335baf70d5a6c40fa4b6845ff78e2812ec

9 years agorelease: updated changelog 19/29919/3 accepted/tizen/common/20141107.142123 accepted/tizen/ivi/20141111.052341 submit/tizen/20141106.110505 submit/tizen_mobile/20141120.000000
Jaska Uimonen [Fri, 24 Oct 2014 06:39:01 +0000 (09:39 +0300)]
release: updated changelog

Change-Id: Ia12c7675382e3f8852549508bd62d5410d429be1

9 years agoDisable loading of protocol esound module 18/29918/3
Jaska Uimonen [Mon, 27 Oct 2014 12:42:22 +0000 (14:42 +0200)]
Disable loading of protocol esound module

There seems to be nobody in tizen using esound
so we might as well disable the loading of the
corresponding pulseaudio protocol. If this is
later on enabled the socket should be also added
to pulseaudio.socket if the socket activation
is wanted also for esound.

Change-Id: Ieec337d3d36c8fc94aff7678b4657ffc656c1e73

9 years agoadd systemd socket activation files to spec 17/29917/3
Jaska Uimonen [Thu, 23 Oct 2014 06:50:21 +0000 (09:50 +0300)]
add systemd socket activation files to spec

Change-Id: Ia7341844fc0be2f9449e306470b05a3653c3eee9

9 years agoadd tcp ipv4 local port to default.pa 16/29916/2
Jaska Uimonen [Fri, 31 Oct 2014 09:39:50 +0000 (11:39 +0200)]
add tcp ipv4 local port to default.pa

Change-Id: I226cad5552c6331b90269bba751ef01e942a05da

9 years agoadd ipv4 socket to pulseaudio.socket 15/29915/2
Jaska Uimonen [Wed, 5 Nov 2014 11:53:28 +0000 (13:53 +0200)]
add ipv4 socket to pulseaudio.socket

Change-Id: I68867a475ba6892d1ca3c24e985687219e807a92

9 years agosocket-server: add tcp support for systemd socket activation 14/29914/2
Jaska Uimonen [Wed, 5 Nov 2014 11:50:43 +0000 (13:50 +0200)]
socket-server: add tcp support for systemd socket activation

Change-Id: I181d2f34f925349069c802b6f68e1a0bdbe0b7f0

9 years agobuild-sys: Minor cosmetic tidyup of configure summary 13/29913/1
Colin Guthrie [Sat, 18 Oct 2014 17:33:59 +0000 (19:33 +0200)]
build-sys: Minor cosmetic tidyup of configure summary

Change-Id: I8a3e17d35ab7c9b2570b866e8cb09ebbc2c2c86b

9 years agolaunch: Disable autospawn by default when systemd daemon support is enabled. 12/29912/1
Colin Guthrie [Fri, 17 Oct 2014 13:37:33 +0000 (15:37 +0200)]
launch: Disable autospawn by default when systemd daemon support is enabled.

When enabled, this method is prefered over pulseaudio's built in
systems so we should try our best to ensure that it cannot be spawned
outside of the mechanisms desired.

Packagers should call 'systemctl --global enable pulseaudio.socket' to
enable the socket for all users, or alternatively ship an enabling
symlink in /usr/lib/systemd/user/sockets.target.wants/ folder. It may
also make sense for distributions to add in a ConditionNNN= line to the
socket unit if they have a downstream mechanism for enabling or
disabling pulseaudio.

If individual users wish to opt out of this vendor (or administrator)
decision, they can call 'systemctl --user mask pulseaudio.socket'

Change-Id: Ieb1a0080aa5287212808d55000f54a079913808c

9 years agolaunch: Add systemd units for launching pulseaudio user instances 11/29911/1
Colin Guthrie [Fri, 17 Oct 2014 13:10:14 +0000 (15:10 +0200)]
launch: Add systemd units for launching pulseaudio user instances

Change-Id: I7d2b504afe055927b69e454d0f9d32d581ca2e1b

9 years agolaunch: Avoid specifically starting PA and rely on autospawn/socket activation 10/29910/1
Colin Guthrie [Fri, 17 Oct 2014 12:43:18 +0000 (14:43 +0200)]
launch: Avoid specifically starting PA and rely on autospawn/socket activation

This --start is patched out in several downstreams to allow users to easily
disable PA by simply disabling autospawn.

If autospawn is enabled, then the first pactl command will start it and if not
it will fail and the script will exit.

When switching to systemd socket activation, we very much do not want to
start PA manually here. We could replace it with a
  systemctl --user start pulseaudio
but really it just makes sense to rely on the socket activation as this
should apply equally to non-systemd setups which use PA's own autospawn.

Change-Id: Ie730dacd598453f0bd3493cb3df3467a805a7a8b

9 years agosocket-server: Add support for systemd socket activation. 09/29909/1
Colin Guthrie [Thu, 16 Oct 2014 09:05:19 +0000 (10:05 +0100)]
socket-server: Add support for systemd socket activation.

This adds support to module-native-protocol-unix to take over already
listening sockets passed in via socket activation (e.g. from systemd)

Most of the code is isolated to socket-server but some cleanup code also
had to be tweaked to ensure we do not overzealously close open fds.

Change-Id: I07eb04fe3c51626ee801566cd376062406f418b9

9 years agobuild-sys: Add support for newer systemd without compatibility libs 08/29908/1
Colin Guthrie [Fri, 17 Oct 2014 11:51:25 +0000 (13:51 +0200)]
build-sys: Add support for newer systemd without compatibility libs

In newer versions of systemd some libraries were combined for the sake of
general simplicity.

This change checks against the newer name first and avoids separate pkgconfig
checks if it's found. We probably want to keep support for the older library
names for some time. systemd does allow for the shipping of compatibility
pkgconfig files to not break downstream code like ourselves which is why this
likely hasn't been "fixed" until now.

With this change we no longer rely on systemd having been built with those
compatibility pkgconfig files.

Change-Id: Ibdbd0b01968b74237a4e2110759000f9eb705122

9 years agobuild-sys: Clarify some systemd sub-component variable/define names. 07/29907/1
Colin Guthrie [Fri, 17 Oct 2014 11:32:03 +0000 (13:32 +0200)]
build-sys: Clarify some systemd sub-component variable/define names.

We currently use the term SYSTEMD when referring to libsystemd-login
and JOURNAL when referring to libsystemd-journal.

I will be shortly adding support for libsystemd-daemon and in
preparation I figured it would be a good idea to clarify the names
used currently before adding another!

Change-Id: I1e513087eedce4371c2c0a992faa0281ecf0fa6a

9 years agoman: Fix XDG_RUNTIME_DIR variable reference. 06/29906/1
Colin Guthrie [Fri, 17 Oct 2014 11:09:14 +0000 (13:09 +0200)]
man: Fix XDG_RUNTIME_DIR variable reference.

Change-Id: I92785b104a1f42943884dfc7f51998c8cba65290

9 years agosocket-server: Improve readability 05/29905/1
Tanu Kaskinen [Mon, 3 Nov 2014 09:23:25 +0000 (11:23 +0200)]
socket-server: Improve readability

Change-Id: Ia323ade04dc7a793e47d3d2c8f167812bae1aea3

9 years agoRemove msbc support from bluetooth ofono backend. 53/28653/2 accepted/tizen_3.0.2014.q3_common accepted/tizen_3.0.m14.3_ivi tizen_3.0.2014.q3_common tizen_3.0.m14.3_ivi accepted/tizen/common/20141013.235206 accepted/tizen/ivi/20141014.072142 submit/tizen_common/20141013.223309 submit/tizen_ivi/20141014.000000 tizen_3.0.2014.q3_common_release tizen_3.0.m14.3_ivi_release
Jaska Uimonen [Mon, 13 Oct 2014 10:38:01 +0000 (13:38 +0300)]
Remove msbc support from bluetooth ofono backend.

This fixes TC-162.

Change-Id: I1695d82f6841119ad6e80ba17ebec8408825b4a2
Bug-Tizen: TC-162

9 years agorelease: updated changelog 13/28613/1 accepted/tizen/ivi/20141010.215757 submit/tizen/20141010.130213
Jaska Uimonen [Fri, 10 Oct 2014 12:59:55 +0000 (15:59 +0300)]
release: updated changelog

Change-Id: I29476fad2c858e5ab4dc8ff979bba90843a544bb

9 years agoMerge "Fixed TC-1588. Added libcap-tools requirement" into tizen
Jaska Uimonen [Fri, 10 Oct 2014 12:48:10 +0000 (05:48 -0700)]
Merge "Fixed TC-1588. Added libcap-tools requirement" into tizen

9 years agoPackaging: clean spec file 53/28453/2
Kévin THIERRY [Tue, 7 Oct 2014 13:23:12 +0000 (15:23 +0200)]
Packaging: clean spec file

* Use rpm macros where possible.
* Do not use "%configure" since configure is already done by
  bootstrap.sh.
* Remove "description-shorter-than-summary" rpmlint warnings.

Change-Id: Ic2f20c5d231f903d19575f5ef2177e64627a3b7c
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
9 years agoFixed TC-1588. Added libcap-tools requirement 65/28565/1
John L. Whiteman [Thu, 9 Oct 2014 22:28:56 +0000 (15:28 -0700)]
Fixed TC-1588. Added libcap-tools requirement

Change-Id: Ibafe33a40f0509e2cb0b03c2b4c12649336ae603
Signed-off-by: John L. Whiteman <john.l.whiteman@intel.com>
9 years agorelease: updated changelog 57/28157/1 accepted/tizen/common/20140929.111501 accepted/tizen/ivi/20141001.194551 accepted/tizen/mobile/20141022.102705 submit/tizen/20140929.074533
Jaska Uimonen [Mon, 29 Sep 2014 07:38:43 +0000 (10:38 +0300)]
release: updated changelog

Change-Id: Id1602c0f5589d630e8ad4a2fa73be2c0a2795e6a
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agoprotocol-stub: Don't query FQDN when loading module-native-protocol-tcp 84/27084/1
Tanu Kaskinen [Thu, 4 Sep 2014 08:39:30 +0000 (11:39 +0300)]
protocol-stub: Don't query FQDN when loading module-native-protocol-tcp

This works around the issue that in some environments it takes 10
seconds to start PulseAudio, because the network is not responding to
our FQDN queries.

A side effect of this is that we don't register the server address in
the native protocol, so things that use the address registry don't
work. Currently this affects module-zeroconf-publish and
module-bonjour-publish. The assumption is that Tizen doesn't need
either of those.

This patch is not upstreamable. To get rid of this patch, someone
needs to fix https://bugs.freedesktop.org/show_bug.cgi?id=81802

Change-Id: I38a2e2676bd4ea3fe8c54a4c0f712fa7c3c5e115

9 years agorelease: updated changelog 66/26766/1 accepted/tizen/common/20140829.173154 accepted/tizen/ivi/20140905.063907 submit/tizen/20140829.142627
Jaska Uimonen [Thu, 28 Aug 2014 09:49:48 +0000 (12:49 +0300)]
release: updated changelog

Change-Id: I9ce5b4c2d9c7d2c8b46b067af7a60ef4ac658bff
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agoset realtime prio from a package 65/26765/1
Jaska Uimonen [Thu, 14 Aug 2014 08:01:28 +0000 (11:01 +0300)]
set realtime prio from a package

Change-Id: Ifdba5072d251b630cf63751068162b7e3d1b284f
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agoaudio-groups, main-volume-policy, volume-api: Various fixes 49/26449/1
Tanu Kaskinen [Tue, 17 Jun 2014 16:45:45 +0000 (19:45 +0300)]
audio-groups, main-volume-policy, volume-api: Various fixes

Sorry, this is a huge unreviewable commit. Contained improvements
include at least:

 * Flat volumes are now handled properly. Previously, audio groups
   controlled the absolute volume of streams if flat volume was in
   effect, which made no sense.
 * Audio group volumes are now persistent.
 * Audio group volumes are applied to new streams before the streams
   start to play, instead of after, which could cause audible
   glitches.
 * When a stream volume is changed by the user, the volume is
   propagated to the stream's audio group.
 * Fixed the handling of the "NEG" keyword in the match syntax in
   module-audio-groups. Previously the "NEG" keyword was parsed, but
   it had no effect.

Change-Id: I02bad3d23b3e562c71dbc6af6f3e308089893751

9 years agosink-input, source-output: Add the real object pointer to new_data 48/26448/1
Tanu Kaskinen [Tue, 5 Aug 2014 09:01:54 +0000 (12:01 +0300)]
sink-input, source-output: Add the real object pointer to new_data

module-volume-api needs the pointer already in the FIXATE hook, where
it creates the volume control objects. The pointer is needed, because
otherwise there's no way to correlate the created controls with the
sink inputs and source outputs.

Since the object is created early, pa_sink_input_new() and
pa_source_output_new() need to free it in case of failure, so a bunch
of direct returns were replaced with "goto fails".

Since the object may now be unlinked in a completely uninitialized
state, I reviewed the unlinking code, and made sure that unlinking is
performed only once (the "unlinked" flag was needed for this).

Change-Id: I89bee3fb51c54d270ccf856750c5b577babc7905

9 years agosink-input, source-output: Use new_data.volume only for absolute volume 47/26447/1
Tanu Kaskinen [Mon, 4 Aug 2014 18:42:45 +0000 (21:42 +0300)]
sink-input, source-output: Use new_data.volume only for absolute volume

This simplifies life for modules that care about the initial volume of
streams. new_data.volume will always be the absolute volume (assuming
that flat volume is in effect) and new_data.reference_ratio will
always be the relative volume.

This will be especially useful when creating volume controls (absolute
and relative) for new streams in module-volume-api.

Change-Id: Ibca033c8441dde35a0b43d9276c41e383c675306

9 years agosink-input, source-output: Add hooks for reference ratio changes 46/26446/1
Tanu Kaskinen [Mon, 4 Aug 2014 18:26:17 +0000 (21:26 +0300)]
sink-input, source-output: Add hooks for reference ratio changes

Needed for implementing relative volume controls for streams in
module-volume-api. The plan is to create those controls in the core,
though, and these hooks won't be needed at that point any more.

Change-Id: Id30f38f4adfa9ede7bd0b12b484fe329ca1a3991

9 years agosink-input, source-output: Assign to reference_ratio from a single place 45/26445/1
Tanu Kaskinen [Mon, 4 Aug 2014 17:57:55 +0000 (20:57 +0300)]
sink-input, source-output: Assign to reference_ratio from a single place

This makes it easy to log a message every time the reference ratio
changes. I also need to add a hook for reference ratio changes, but
that need will go away if the stream relative volume controls will be
created by the core in the future.

Change-Id: I2344ba7825f76cd72241599bd138b21e16555e01

9 years agocore-util: Add pa_boolean_to_string() 44/26444/1
Tanu Kaskinen [Mon, 4 Aug 2014 17:31:00 +0000 (20:31 +0300)]
core-util: Add pa_boolean_to_string()

I need to save booleans in a plain text database, and the existing
pa_yes_no() is not good, because it will do translation in the next
PulseAudio release.

Change-Id: I85f12da01aa0eb3d5c555350bd14ba337fbcc25b

9 years agorole-ducking: Handle unlinking of uninitialized streams gracefully 43/26443/1
Tanu Kaskinen [Mon, 4 Aug 2014 13:00:01 +0000 (16:00 +0300)]
role-ducking: Handle unlinking of uninitialized streams gracefully

There should be no assumptions about what has been initialized when
the unlink hook is fired.

Change-Id: Id3c069093894bf508fbc0be75db046ff875ce965

9 years agorole-cork: Handle unlinking of uninitialized streams gracefully 42/26442/1
Tanu Kaskinen [Mon, 4 Aug 2014 12:59:06 +0000 (15:59 +0300)]
role-cork: Handle unlinking of uninitialized streams gracefully

There should be no assumptions about what has been initialized when
the unlink hook is fired.

Change-Id: I4ea4372570e7a0a83c31caab6e2e6781a98cd3ad

9 years agoalsa: Handle unlinking of uninitialized streams gracefully 41/26441/1
Tanu Kaskinen [Mon, 4 Aug 2014 12:33:01 +0000 (15:33 +0300)]
alsa: Handle unlinking of uninitialized streams gracefully

There should be no assumptions about what has been initialized when
the unlink hook is fired.

Change-Id: I7502f0e7a3d244413dd806bc8657014999c9b9b3

9 years agocore: Create the config home directory on startup 40/26440/1
Tanu Kaskinen [Tue, 17 Jun 2014 16:35:21 +0000 (19:35 +0300)]
core: Create the config home directory on startup

This avoids the need to check for the existence of the config home
directory every time some file needs to be opened from that directory.

Change-Id: I449c61aa46eaea3f8c7eb0aa040310db58421828

9 years agocore-util: Add pa_append_to_config_home_dir() 39/26439/1
Tanu Kaskinen [Sun, 8 Jun 2014 13:33:00 +0000 (16:33 +0300)]
core-util: Add pa_append_to_config_home_dir()

Change-Id: Ib4e6a096a740a61188220a983f26ecea434f6200

9 years agocore-util: Add pa_get_config_home_dir() 38/26438/1
Tanu Kaskinen [Sun, 8 Jun 2014 13:32:59 +0000 (16:32 +0300)]
core-util: Add pa_get_config_home_dir()

Change-Id: I6aa3df386a7414563b03435683bad2596cf60b8b

9 years agocore-util: Add pa_append_to_home_dir() 37/26437/1
Tanu Kaskinen [Sun, 8 Jun 2014 13:32:57 +0000 (16:32 +0300)]
core-util: Add pa_append_to_home_dir()

Change-Id: I746d2efb5f205820480b0cbd11c23cff11367656

9 years agoaudio-groups: fix issues found by static analysis. 80/21980/1 tizen-reorder tizen_3.0.m14.2_ivi accepted/tizen/ivi/20140604.184622 submit/tizen/20140528.115445 tizen_3.0.m14.2_ivi_release
Ismo Puustinen [Tue, 27 May 2014 07:27:16 +0000 (10:27 +0300)]
audio-groups: fix issues found by static analysis.

Change-Id: Ia2805a5977868b236bd6a33e7bc8fdcb944020ea

9 years agomain-volume-policy: Fix a memory leak 79/21979/1
Tanu Kaskinen [Tue, 27 May 2014 08:06:10 +0000 (11:06 +0300)]
main-volume-policy: Fix a memory leak

There can be multiple calls to pa_binding_target_info_new() in this
function, but only the last allocated info object was freed.

Change-Id: I9df43f0663b27b07ba7b8d01bc8ea9cc0a6c1b51

9 years agodevice-creator, stream-creator: Add a couple of assertions 78/21978/1
Tanu Kaskinen [Tue, 27 May 2014 07:45:04 +0000 (10:45 +0300)]
device-creator, stream-creator: Add a couple of assertions

Klocwork complained that source (in device-creator) and output (in
stream-creator) may be dereferenced if they're NULL. Let's make
Klocwork happy, and the code a bit more obvious to human readers as
well.

Change-Id: I835dd7d9da44e2866a97bc0424001a42c29602a8

9 years agoconfiguration: x-example -> x-tizen-ivi in volume configuration. 77/21977/1
Ismo Puustinen [Mon, 26 May 2014 11:37:48 +0000 (14:37 +0300)]
configuration: x-example -> x-tizen-ivi in volume configuration.

Change-Id: I1c11084d6891e431dd909c632e4bfb62968167df

9 years agopactl: Fix crash in "pactl list" 76/21976/1
Tanu Kaskinen [Mon, 26 May 2014 13:26:14 +0000 (16:26 +0300)]
pactl: Fix crash in "pactl list"

Fixes this assertion error:

Assertion 'actions > 0' failed at utils/pactl.c:172, function complete_action(). Aborting.

Change-Id: Icdcdf0817af431115444cb4fdef0a042fe5d7560

9 years agorelease: updated changelog 75/21975/1
Jaska Uimonen [Fri, 7 Mar 2014 15:22:37 +0000 (17:22 +0200)]
release: updated changelog

Change-Id: I74897ff4279cafe9c466df5253a1dc2fe5de7b6d
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agoconfiguration: pulseaudio tizen configuration in default.pa 74/21974/1
Jaska Uimonen [Thu, 18 Jul 2013 10:43:14 +0000 (18:43 +0800)]
configuration: pulseaudio tizen configuration in default.pa

Change-Id: Id9370a1858d5c1ba0ed3319d717bc7f3e9ed5d31
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agopackaging: added packaging for gerrit. 73/21973/1
Jaska Uimonen [Tue, 11 Jun 2013 14:17:16 +0000 (17:17 +0300)]
packaging: added packaging for gerrit.

Change-Id: I9cf677e15311085610c42788fe3d9ac5b44dbfe9
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink/source: Initialize port before fixate hook (fixes volume/mute not saved) 72/21972/1
David Henningsson [Fri, 21 Mar 2014 09:19:19 +0000 (10:19 +0100)]
sink/source: Initialize port before fixate hook (fixes volume/mute not saved)

In case a port has not yet been saved, which is e g often the case
if a sink/source has only one port, reading volume/mute will be done
without port, whereas writing volume/mute will be done with port.

Work around this by setting a default port before the fixate hook,
so module-device-restore can read volume/mute for the correct port.

Change-Id: Iea6a742f0667771712059cb39b8082785b2a6887
BugLink: https://bugs.launchpad.net/bugs/1289515
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
9 years agoconfiguration: Add default IVI audio group and main volume configuration 71/21971/1
Tanu Kaskinen [Thu, 22 May 2014 11:43:33 +0000 (14:43 +0300)]
configuration: Add default IVI audio group and main volume configuration

Change-Id: Idd348cc9f469e988405d574dbc2459c5822a33c2
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agoAdd module-main-volume-policy 70/21970/1
Tanu Kaskinen [Wed, 21 May 2014 11:13:41 +0000 (14:13 +0300)]
Add module-main-volume-policy

Change-Id: I787141b43cafb652aa752c64ae28b6b7aa052d8e
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agoAdd module-audio-groups 69/21969/1
Tanu Kaskinen [Wed, 21 May 2014 11:08:40 +0000 (14:08 +0300)]
Add module-audio-groups

Change-Id: Iaa0284e0537785ed245caae6e49544477ca246b9
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agopactl: Add support for the new volume API 68/21968/1
Tanu Kaskinen [Wed, 21 May 2014 11:05:47 +0000 (14:05 +0300)]
pactl: Add support for the new volume API

Change-Id: I2bb6625c1cd575366388ec8dc3dd4fd2097c9a4a
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agoAdd module-volume-api and the related client API 67/21967/1
Tanu Kaskinen [Wed, 21 May 2014 10:42:02 +0000 (13:42 +0300)]
Add module-volume-api and the related client API

Change-Id: I79e31d8eaacb5d86a29538e89db1e140d28ac1c0
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agovolume-api: Add libvolume-api.so 66/21966/1
Tanu Kaskinen [Wed, 21 May 2014 08:51:27 +0000 (11:51 +0300)]
volume-api: Add libvolume-api.so

This library implements the "core" of the new volume system, which
will be used by several modules.

Change-Id: Ib25ada1392e83237a3908e6064ee0ad6dff7afaf
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agocontext, extension: Add the pa_extension class 65/21965/1
Tanu Kaskinen [Tue, 4 Mar 2014 13:03:05 +0000 (15:03 +0200)]
context, extension: Add the pa_extension class

pa_extension is an abstraction layer that allows pa_context to manage
the extensions without needing any extension-specific code. This patch
only implements the pa_extension base class, the class isn't used yet
by any actual extensions.

Change-Id: I457b3d0b674b4cfd1d38452d8f8cb51cf6b7b533
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink: Link monitor source before activating port 64/21964/1
Tanu Kaskinen [Fri, 9 May 2014 08:25:28 +0000 (11:25 +0300)]
sink: Link monitor source before activating port

The port activation hook callbacks may want to use the monitor source.

Change-Id: I5d5c51171a78162dacb3286983cb560001e79ba1
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink-input, source-output: Add hooks for mute changes 63/21963/1
Tanu Kaskinen [Tue, 15 Apr 2014 08:27:53 +0000 (11:27 +0300)]
sink-input, source-output: Add hooks for mute changes

Change-Id: I256cfa27ffa6addb35640266b73f1fe07a483203
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink, source: Add hooks for mute changes 62/21962/1
Tanu Kaskinen [Tue, 15 Apr 2014 08:10:24 +0000 (11:10 +0300)]
sink, source: Add hooks for mute changes

Change-Id: I1203c1199fea0e93f1a61391695b12ab8af66180
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink-input, source-output: Add hooks for volume changes 61/21961/1
Tanu Kaskinen [Mon, 7 Apr 2014 11:22:43 +0000 (14:22 +0300)]
sink-input, source-output: Add hooks for volume changes

Change-Id: I89c6f2934762caa2c49c70c0446c14d0de58a10e
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink, source: Add hooks for volume changes 60/21960/1
Tanu Kaskinen [Sun, 9 Mar 2014 11:36:04 +0000 (13:36 +0200)]
sink, source: Add hooks for volume changes

Change-Id: Id4389a38e601dee3f84d7fad0583a7dc87108e87
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosolaris, tunnel: Remove some redundant boolean conversions 59/21959/1
Tanu Kaskinen [Mon, 14 Apr 2014 12:34:57 +0000 (15:34 +0300)]
solaris, tunnel: Remove some redundant boolean conversions

Change-Id: Ibc922f8455a3ccb6c71289e70cd474464930643e
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink-input, source-output: Remove redundant get_mute() functions 58/21958/1
Tanu Kaskinen [Mon, 14 Apr 2014 12:24:31 +0000 (15:24 +0300)]
sink-input, source-output: Remove redundant get_mute() functions

The functions just return the muted value. Callers can as well read
the struct field directly, it's simpler that way.

Change-Id: I368f7e09cdf522039a6573e5002f7544b4e840d3
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink, source: Assign to s->muted from only one place 57/21957/1
Tanu Kaskinen [Mon, 14 Apr 2014 11:52:16 +0000 (14:52 +0300)]
sink, source: Assign to s->muted from only one place

Forcing all mute changes to go through set_mute() makes it easier to
check where the muted field is changed, and it also allows us to have
only one place where notifications for changed mute are sent.

Change-Id: Idb1bd6ef923a165e249d42265ebedc30a6c8fca4
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink, source: Call set_mute() from mute_changed() 56/21956/1
Tanu Kaskinen [Tue, 15 Apr 2014 06:39:49 +0000 (09:39 +0300)]
sink, source: Call set_mute() from mute_changed()

This refactoring reduces duplication, as mute_changed() used to do the
same things as set_mute(). Other benefits are improved logging
(set_mute() logs the mute change, mute_changed() used to not do that)
and the soft mute state is kept up to date, because set_mute() sends
the SET_MUTE message to the IO thread.

The set_mute_in_progress flag is an extra precaution for preventing
recursion in case a sink/source implementation's set_mute() callback
causes mute_changed() to be called. Currently there are no such
implementations, but I think that would be a valid thing to do, so
some day there might be such implementation.

Change-Id: I33c81f4034001f777c4533c2c63eada67548c683
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agoecho-cancel: Remove redundant get_mute() callback 55/21955/1
Tanu Kaskinen [Mon, 14 Apr 2014 12:13:08 +0000 (15:13 +0300)]
echo-cancel: Remove redundant get_mute() callback

The callback just called pa_source_output_get_mute(), which doesn't
have any side effects, and the return value wasn't used either, so
the callback was essentially a no-op.

Change-Id: Ic16824b06393f59b55087842da64c7d09035b9e8
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink, source: Allow calling set_mute() during initialization 54/21954/1
Tanu Kaskinen [Mon, 14 Apr 2014 11:43:23 +0000 (14:43 +0300)]
sink, source: Allow calling set_mute() during initialization

Currently the alsa sink and source write directly to s->muted during
initialization, but I think it's better to avoid direct writes, and
use the set_mute() function instead, because that makes it easier to
figure out where s->muted is modified. This patch prevents the
set_mute() call from crashing in the state assertion.

Change-Id: I12220fb2668723931bebbe1484f115016f1edf25
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink-input, source-output: Add logging to set_mute() 53/21953/1
Tanu Kaskinen [Mon, 14 Apr 2014 11:13:56 +0000 (14:13 +0300)]
sink-input, source-output: Add logging to set_mute()

Change-Id: Ie10aa76cae75c7b6a52ea4a9039b8e3e37a748b2
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink, source: Return early from set_mute() 52/21952/1
Tanu Kaskinen [Mon, 14 Apr 2014 11:03:24 +0000 (14:03 +0300)]
sink, source: Return early from set_mute()

This avoids redundant set_mute() callback calls.

Some logging was added too.

Change-Id: I10188c3b43d61fe751abe0f9940015af35c4a137
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink-input, source-output: Assign to volume from only one place 51/21951/1
Tanu Kaskinen [Mon, 7 Apr 2014 09:48:15 +0000 (12:48 +0300)]
sink-input, source-output: Assign to volume from only one place

Forcing all volume changes to go through set_volume_direct() makes
it easier to check where the stream volume is changed, and it also
allows us to have only one place where notifications for changed
volume are sent.

Change-Id: Ie61bcc5747b419bb83c19a3ed78fd9f4d8a73cce
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink, source: Assign to reference_volume from only one place 50/21950/1
Tanu Kaskinen [Mon, 7 Apr 2014 09:20:58 +0000 (12:20 +0300)]
sink, source: Assign to reference_volume from only one place

Forcing all reference volume changes to go through
set_reference_volume_direct() makes it easier to check where the
reference volume is changed, and it also allows us to have only one
place where notifications for changed reference volume are sent.

Change-Id: I2e769b8a2b0d7031a02446dead8ca2e0c3402751
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agodevice-port: Add pa_device_port.active 49/21949/1
Tanu Kaskinen [Wed, 26 Mar 2014 11:41:42 +0000 (13:41 +0200)]
device-port: Add pa_device_port.active

In the Tizen volume API, I create and delete volume control objects
for ports based on their state (only active ports have volume
controls). Having the pa_device_port.active flag directly accessible
is much nicer than figuring out the state by iterating through sinks
and checking what their active port is. It's also safer to get a
notification for a deactivated port before the port switch is
executed, compared to using the SINK_PORT_CHANGED hook that is fired
only after the port switch is complete.

Change-Id: I3f7f8855721c8dc3a643708a72f6e35341ff7117
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agohashmap: Add pa_hashmap_remove_and_free() 48/21948/1
Tanu Kaskinen [Wed, 26 Mar 2014 11:58:40 +0000 (13:58 +0200)]
hashmap: Add pa_hashmap_remove_and_free()

Change-Id: Ia3530c29cecf8964989aec4f0527fc982e80e34a
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agodynarray: Add pa_dynarray_remove_all() 47/21947/1
Tanu Kaskinen [Wed, 21 May 2014 08:36:19 +0000 (11:36 +0300)]
dynarray: Add pa_dynarray_remove_all()

Change-Id: I35079f8fe4b361221a1bdc1fececbe318bf3ee0e
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agodynarray: Add pa_dynarray_remove_last() 46/21946/1
Tanu Kaskinen [Wed, 21 May 2014 08:32:09 +0000 (11:32 +0300)]
dynarray: Add pa_dynarray_remove_last()

Change-Id: I9098df96aac57a3ee2084061aa174f7ee02b1588
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agodynarray: Add PA_DYNARRAY_FOREACH 45/21945/1
Tanu Kaskinen [Thu, 19 Dec 2013 19:29:50 +0000 (21:29 +0200)]
dynarray: Add PA_DYNARRAY_FOREACH

The PA_DYNARRAY_FOREACH macro requires that pa_dynarray_get() returns
NULL if the index is out of bounds.

Change-Id: If9db312516fbb079e8b67d94d35a44783ab3395a
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agodynarray: Add pa_dynarray_get_raw_array() 44/21944/1
Tanu Kaskinen [Wed, 26 Mar 2014 11:33:31 +0000 (13:33 +0200)]
dynarray: Add pa_dynarray_get_raw_array()

Change-Id: I6e40c2a20586d13c99c9d98059e4dbb1d0e9e562
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agocore-util: Add pa_join() 43/21943/1
Tanu Kaskinen [Wed, 26 Mar 2014 11:15:12 +0000 (13:15 +0200)]
core-util: Add pa_join()

Change-Id: I84ac0ee7a3097fce8ed9bad26b210fc97db9e9a7
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agodirection: Add a couple of direction helper functions 42/21942/1
Tanu Kaskinen [Wed, 26 Mar 2014 08:25:17 +0000 (10:25 +0200)]
direction: Add a couple of direction helper functions

Change-Id: I365acd7ce3e7abcbcb8a532c79016fca558238e8
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
9 years agosink-input, source-output: Fix mute saving 41/21941/1
Tanu Kaskinen [Mon, 14 Apr 2014 11:29:48 +0000 (14:29 +0300)]
sink-input, source-output: Fix mute saving

Change-Id: I2298ab51a384c3ddfa33da3e941e03f5027b4d77
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>