platform/upstream/pulseaudio.git
10 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>
10 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>
10 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

10 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>
10 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>
10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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

10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 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>
10 years agovolume: Increase PA_SW_VOLUME_SNPRINT_DB_MAX 40/21940/1
Tanu Kaskinen [Sun, 9 Mar 2014 08:50:23 +0000 (10:50 +0200)]
volume: Increase PA_SW_VOLUME_SNPRINT_DB_MAX

10 bytes isn't enough for "-123.45 dB", including the terminating null
byte.

Change-Id: I865060befd01d3dde69556c1f90b7de55350501a
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agopactl: Fix crash with older servers 39/21939/1
Tanu Kaskinen [Sun, 16 Feb 2014 12:30:38 +0000 (14:30 +0200)]
pactl: Fix crash with older servers

Servers older than 0.9.15 don't know anything about cards, and card
operations will return a NULL pa_operation object when connected to
that old server. We must check the pa_operation pointer before passing
it to pa_operation_unref(), otherwise a NULL operation will result in
a crash.

Change-Id: Idc258479c077aafaff6254b76acb18034a158107
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years ago.gitignore: Add pulsecore-config.h 38/21938/1
Tanu Kaskinen [Mon, 24 Feb 2014 10:38:31 +0000 (12:38 +0200)]
.gitignore: Add pulsecore-config.h

Change-Id: I8409f1964e65e79669eaeb4930c6d536417a0b05
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoadded pulseaudio.service file 37/21937/1
Jaska Uimonen [Tue, 11 Jun 2013 14:03:27 +0000 (17:03 +0300)]
added pulseaudio.service file

Change-Id: I8efef41060189f116be49b3455c588d67f045f82
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoAdd bt_profile_set patch which fixed bt a2dp&hsp profile setting issues in mobile 36/21936/1
vivian,zhang [Wed, 17 Jul 2013 03:17:40 +0000 (11:17 +0800)]
Add bt_profile_set patch which fixed bt a2dp&hsp profile setting issues in mobile

Change-Id: I9bc3649b02ab7ac56584211789a3ea18ff17fbb7
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoadjust default bluetooth profile to off 35/21935/1
Jaska Uimonen [Wed, 14 Aug 2013 12:00:52 +0000 (15:00 +0300)]
adjust default bluetooth profile to off

Change-Id: I95ca525b0d20c1a864a0c66060767bb4c2160400
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agovolume ramp: add client api support for volume ramping 34/21934/1
Jaska Uimonen [Wed, 8 Aug 2012 08:14:40 +0000 (11:14 +0300)]
volume ramp: add client api support for volume ramping

Change-Id: I6afc7540af68400db54eec258bdf4a80c311bb69
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agofix warning in gconf helper 33/21933/1
Jaska Uimonen [Tue, 11 Mar 2014 10:47:52 +0000 (12:47 +0200)]
fix warning in gconf helper

Change-Id: Id75cd24cfd1c0d62d4c227b6715dc0d9d5ea6b1f
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agofixes and improvements to makefile and configure in - samsung 32/21932/1
Jaska Uimonen [Fri, 7 Mar 2014 15:49:42 +0000 (17:49 +0200)]
fixes and improvements to makefile and configure in - samsung

Change-Id: Ic2338a8382fe45f9d509537950592c9c4aa83606
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agouse udev only for usb devices - samsung 31/21931/1
Jaska Uimonen [Thu, 8 Aug 2013 08:28:39 +0000 (11:28 +0300)]
use udev only for usb devices - samsung

Change-Id: Ia8cd2f5eb5ebe5248af11906c67d572ede133b33
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agocope with possible infinite waiting in startup - samsung 30/21930/1
Jaska Uimonen [Thu, 8 Aug 2013 08:27:44 +0000 (11:27 +0300)]
cope with possible infinite waiting in startup - samsung

Change-Id: Ie7c74131e267f44324f031a953c15f81b0c31a07
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoset alsa suspend timeout to zero - samsung 29/21929/1
Jaska Uimonen [Thu, 8 Aug 2013 08:24:25 +0000 (11:24 +0300)]
set alsa suspend timeout to zero - samsung

Change-Id: Ie7c93c727d878226189f751efbd6e088ece7f36f
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agocreate pa_ready file - samsung 28/21928/1
Jaska Uimonen [Thu, 8 Aug 2013 08:23:38 +0000 (11:23 +0300)]
create pa_ready file - samsung

Change-Id: I2146599f2e814be064864f8ca76879b761642f11
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoadd bluetooth a2dp aptx codec support - samsung 27/21927/1
vivian,zhang [Tue, 18 Jun 2013 08:23:45 +0000 (16:23 +0800)]
add bluetooth a2dp aptx codec support - samsung

Change-Id: I2c90198774c1e7d3e2ecb99f2dd365d56308f157
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoadd policy module - samsung 26/21926/1
vivian,zhang [Tue, 18 Jun 2013 08:21:32 +0000 (16:21 +0800)]
add policy module - samsung

Change-Id: I2111a9c4dc0a371dbea5b347cf77adbe8f930528
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoadd support for dlog - samsung 25/21925/1
vivian,zhang [Tue, 18 Jun 2013 08:20:04 +0000 (16:20 +0800)]
add support for dlog - samsung

Change-Id: Ieddf2f3bdab50926372e9e2b5cedb2756b6cfd5c
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoEnhance for echo cancel - samsung 24/21924/1
vivian,zhang [Tue, 18 Jun 2013 08:18:58 +0000 (16:18 +0800)]
Enhance for echo cancel - samsung

Change-Id: Ibd59e7e033d5a6789ddc7d5ef39e23f26dcf55cc
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoAdd preload fileter for resample - samsung 23/21923/1
vivian,zhang [Tue, 18 Jun 2013 08:12:20 +0000 (16:12 +0800)]
Add preload fileter for resample - samsung

Change-Id: Ia57b4eb1848d53bbfa15c04b25f4821554aff28f
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoadd support for samsung power management - samsung 22/21922/1
vivian,zhang [Tue, 18 Jun 2013 08:11:16 +0000 (16:11 +0800)]
add support for samsung power management - samsung

Change-Id: Id76a3971e36c08773848fdf1ac1cc9a9200d7330
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agochanges to pa simple api - samsung 21/21921/1
vivian,zhang [Tue, 18 Jun 2013 08:10:15 +0000 (16:10 +0800)]
changes to pa simple api - samsung

Change-Id: I997c02217a8dc14524480164aa0baeea901c7b4e
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agofix for profile change prototype in bluez5 patch 20/21920/1
Jaska Uimonen [Tue, 11 Mar 2014 10:23:09 +0000 (12:23 +0200)]
fix for profile change prototype in bluez5 patch

Change-Id: I2361c4eca82e6ac4a8f94e9f9c97f09cb6648049
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoincrease alsa rewind safeguard
Jaska Uimonen [Mon, 28 Apr 2014 08:26:15 +0000 (11:26 +0300)]
increase alsa rewind safeguard

In some devices alsa drivers behaves badly
if pulseaudio rewind safeguard is too small.
This is not fixing the driver issues, but is
a workaround to give time (1.33ms->5ms) for
user space processing so that alsa is not
getting into this weird state. This could be
also helped by running pulseaudio in realtime.
This is of course increasing the volume setting
latency, but should leave it still quite
responsive.

Change-Id: Iecdf879bf8ba58e991808d2dc382def05de36ec9
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agoadd parameter to define key used in stream restore.
Jaska Uimonen [Thu, 5 Sep 2013 09:21:19 +0000 (12:21 +0300)]
add parameter to define key used in stream restore.

It is possible now to use preferred_stream_group
command line parameter when loading module stream
restore. This key will be searched from the stream's
proplist and if found it is used as key when
restoring the volumes and other values. There's also
special value media.role.within.appication.name you
can use to enable restoring stream roles within
application. So different streams with different
roles within application will save their volumes.
If the preferred stream group parameter is left out
module stream restore will fallback to old default
functionality.

Change-Id: I636f47b43476f3d4cd6c14244eafcd050683bb69
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agohfp do safe strcmp in dbus handler
Jaska Uimonen [Mon, 30 Dec 2013 16:03:18 +0000 (18:03 +0200)]
hfp do safe strcmp in dbus handler

Change-Id: I4ba64d22b2b807530263b5f274cd89f208c675ac
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agofix ofono and pulseaudio starting order assert
Jaska Uimonen [Thu, 2 Jan 2014 13:37:02 +0000 (15:37 +0200)]
fix ofono and pulseaudio starting order assert

Change-Id: I743c6e1fb5c65cc0702f073d6c2beb4e6868d7bb
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
10 years agobluetooth: Set 'off' profile as default for newly create cards
Luiz Augusto von Dentz [Mon, 16 Sep 2013 12:10:51 +0000 (15:10 +0300)]
bluetooth: Set 'off' profile as default for newly create cards

This makes sure that pa_card_new doesn't select one profile based on
priority which may conflict with audio policy.

Change-Id: Ifa5ad111d0c9f58701f93bcfd85b70d1f096efac

10 years agobluetooth: Fixes HFP audio transfer when initiator
Luiz Augusto von Dentz [Fri, 23 Aug 2013 16:44:23 +0000 (19:44 +0300)]
bluetooth: Fixes HFP audio transfer when initiator

This makes sure org.ofono.HandsfreeAudioCard.Connect is called regardless
of the optional flag and also makes sure to update the profile state
whenever SCO is disconnected.

Change-Id: I4400753333f14a2381eb75d5b62d2ea51d1c7139

10 years agobluetooth: Implement transport release for hf_audio_agent transports
Luiz Augusto von Dentz [Fri, 23 Aug 2013 16:19:34 +0000 (19:19 +0300)]
bluetooth: Implement transport release for hf_audio_agent transports

Change-Id: I496b3ab1c2f8e347c41262818ec3b9a35ed7262e

10 years agobluetooth: Suspend sink/source on HFP's stream HUP
João Paulo Rechi Vita [Wed, 27 Mar 2013 04:43:42 +0000 (01:43 -0300)]
bluetooth: Suspend sink/source on HFP's stream HUP

When the Audio Connection is disconnected the sink and source should be
suspended.

Change-Id: Ifedd5e7fe70ee74e509b82270ce84aba762f2412

10 years agobluetooth: Fix not handle fd in DEFER_SETUP state
Luiz Augusto von Dentz [Fri, 23 Aug 2013 09:56:40 +0000 (12:56 +0300)]
bluetooth: Fix not handle fd in DEFER_SETUP state

The fd passed over NewConnection is in DEFER_SETUP and need to be read to
be accept otherwise it wont work.

Change-Id: I2f6df033d3c1602064a39bb40a5bbd60e014c8f7

10 years agobluetooth: Implement org.ofono.HandsfreeAudioAgent.NewConnection()
João Paulo Rechi Vita [Thu, 11 Jul 2013 16:23:31 +0000 (13:23 -0300)]
bluetooth: Implement org.ofono.HandsfreeAudioAgent.NewConnection()

Change-Id: Idaff2e3a96ce83e7ee6f961543273429b044be8e

10 years agobluetooth: Handle CardRemoved signal
João Paulo Rechi Vita [Thu, 11 Jul 2013 15:53:10 +0000 (12:53 -0300)]
bluetooth: Handle CardRemoved signal

Change-Id: I41083b3b5d8a318927dcdb373e871032c3f52748

10 years agobluetooth: Handle CardAdded signal
João Paulo Rechi Vita [Thu, 11 Jul 2013 14:47:37 +0000 (11:47 -0300)]
bluetooth: Handle CardAdded signal

Change-Id: I695b97e26ce369d76503980c73fc3849252b4c91

10 years agobluetooth: Track oFono service
João Paulo Rechi Vita [Thu, 11 Jul 2013 14:43:48 +0000 (11:43 -0300)]
bluetooth: Track oFono service

Change-Id: I6752f21b848757dbea20c92c68b581141cefbc67

10 years agobluetooth: Implement transport acquire for hf_audio_agent transports
João Paulo Rechi Vita [Wed, 10 Jul 2013 01:22:28 +0000 (22:22 -0300)]
bluetooth: Implement transport acquire for hf_audio_agent transports

Change-Id: Ia092e75c51f79d1a594ba6dacda55ec03a5dae93

10 years agobluetooth: Parse HandsfreeAudioCard properties
João Paulo Rechi Vita [Wed, 10 Jul 2013 00:37:26 +0000 (21:37 -0300)]
bluetooth: Parse HandsfreeAudioCard properties

Change-Id: I37600ca3ab60d1b82608f4e395fa427fdaf62164

10 years agobluetooth: List HandsfreeAudioCard objects from oFono
João Paulo Rechi Vita [Wed, 10 Jul 2013 00:03:28 +0000 (21:03 -0300)]
bluetooth: List HandsfreeAudioCard objects from oFono

Change-Id: Idb2423d8b5640486976df5347e2f7d05a9e6dd71

10 years agobluetooth: Register/Unregister Handsfree Audio Agent with oFono
João Paulo Rechi Vita [Tue, 9 Jul 2013 23:59:12 +0000 (20:59 -0300)]
bluetooth: Register/Unregister Handsfree Audio Agent with oFono

Register as a HandsfreeAudioAgent with oFono during backend
initialization and unregiter during backend finalization. This commit
also adds a check when receiving method calls or signals to make sure
the sender matches with the D-Bus service we're registered with.

Change-Id: I0a49935702ffb52d6d2ba1baded8eb568262c5b1

10 years agobluetooth: Create pa_bluetooth_dbus_send_and_add_to_pending() for oFono backend
João Paulo Rechi Vita [Wed, 10 Jul 2013 16:00:16 +0000 (13:00 -0300)]
bluetooth: Create pa_bluetooth_dbus_send_and_add_to_pending() for oFono backend

Change-Id: I9b6ea22d6bd1059e5d7b3a12ec13b2768cacce0d

10 years agobluetooth: Monitor D-Bus signals
João Paulo Rechi Vita [Wed, 10 Jul 2013 15:18:07 +0000 (12:18 -0300)]
bluetooth: Monitor D-Bus signals

Change-Id: Ibfd4ab9acaf49df0fdfaff55609c560ab31f4df4

10 years agobluetooth: Create Handsfree Audio Agent oFono backend
João Paulo Rechi Vita [Tue, 9 Jul 2013 23:22:17 +0000 (20:22 -0300)]
bluetooth: Create Handsfree Audio Agent oFono backend

Change-Id: I2d5793e997205a04b37b9389ab75fc8643adcece

10 years agobluetooth: Create Handsfree Audio Agent NULL backend
João Paulo Rechi Vita [Tue, 9 Jul 2013 22:08:15 +0000 (19:08 -0300)]
bluetooth: Create Handsfree Audio Agent NULL backend

Change-Id: I1f562a336f2cd2d0ab91c25fd5128da3cc7fe6df