]> code.delx.au - pulseaudio/log
pulseaudio
12 years agobuild-sys: bump soname
Colin Guthrie [Thu, 15 Sep 2011 10:30:47 +0000 (11:30 +0100)]
build-sys: bump soname

12 years agoconf: Make sure module-dbus-protocol is loaded after module-default-device-restore
David Henningsson [Wed, 14 Sep 2011 12:55:07 +0000 (14:55 +0200)]
conf: Make sure module-dbus-protocol is loaded after module-default-device-restore

module-dbus-protocol gets the default sink, which sets the default sink
if not already set. This is turn makes module-default-device-restore do
nothing.
To solve the problem, make sure module-default-device-restore is loaded
before module-dbus-protocol and not the other way around.

BugLink: http://bugs.launchpad.net/bugs/843780
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agosink,source: Avoid crash by not updating volume on shutdown
David Henningsson [Mon, 12 Sep 2011 10:57:20 +0000 (12:57 +0200)]
sink,source: Avoid crash by not updating volume on shutdown

Sometimes the ALSA mixer can be modified during a point at shutdown
which causes a race condition trying to update the volume of an
unlinked sink.

Includes typo fix by our Chief Typo Spotter, Colin, and a clarifying
comment by me.

BugLink: http://bugs.launchpad.net/bugs/841968
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoecho-cancel: Use volume sharing by default
Arun Raghavan [Wed, 14 Sep 2011 07:52:15 +0000 (13:22 +0530)]
echo-cancel: Use volume sharing by default

Uses the shared volume infrastructure by default with an option to
fallback on the old pretend-volume-sharing-that-kind-of-works if someone
wants it that way.

Users who keep left != right (or any sort of unbalanced channel volumes)
will likely want to disable shared volumes since it will cause their
master sink/source volume to be balanced.

This really isn't a very pleasant scenario since users would need to
manually set up echo cancellation in their config for this (until we
have a way to store module configuration). That said, the majority case
benefits from the volume sharing, so let's not wait for the
configuration infrastructure to be ready to use this.

12 years agoequalizer: Use volume sharing by default
Arun Raghavan [Wed, 14 Sep 2011 07:50:59 +0000 (13:20 +0530)]
equalizer: Use volume sharing by default

Uses the shared volume infrastructure by default with an option to
fallback on the old pretend-volume-sharing-that-kind-of-works if someone
wants it that way.

12 years agovirtual: Make volume sharing on by default
Arun Raghavan [Wed, 14 Sep 2011 07:48:48 +0000 (13:18 +0530)]
virtual: Make volume sharing on by default

People who use this code (i.e. mostly filters) would presumably want
volume sharing on by default.

12 years agovolume: Handle varying channel count for shared volumes
Arun Raghavan [Wed, 14 Sep 2011 07:40:52 +0000 (13:10 +0530)]
volume: Handle varying channel count for shared volumes

This handles the case where a virtual sink/source and it's master have
different channel counts. The solution is not ideal because if the
former has fewer channels and the master has channel volumes that are
not all at the same level, it will lose this information and have all
channels at the same level.

This is not just a theoretical problem, since module-echo-cancel
prefers a mono virtual source/sink and will usually be sitting on top of
a stereo ALSA source/sink.

That said, I don't really see a good solution to this problem, so the
idea is to make volume sharing optional (on by default) in
module-echo-cancel, so that the few people who care can then disable it
if they so desire.

12 years agodef: Hide server-side sink/source flags
Arun Raghavan [Wed, 14 Sep 2011 01:54:19 +0000 (07:24 +0530)]
def: Hide server-side sink/source flags

This makes sure that sink/source flags that are used on the server side
only are not leaked to clients.

12 years agostream: Relax assert for extended API
Arun Raghavan [Wed, 14 Sep 2011 03:02:40 +0000 (08:32 +0530)]
stream: Relax assert for extended API

For some reason this assert wasn't triggered earlier -- we shouldn't be
looking at the stream sample_spec if the formats API is used.

12 years agodoc: Add info about running pulseaudio from the build dir
Antonio Ospite [Fri, 9 Sep 2011 10:17:19 +0000 (12:17 +0200)]
doc: Add info about running pulseaudio from the build dir

12 years agodoc: Update README with fresh links.
Colin Guthrie [Wed, 14 Sep 2011 08:19:08 +0000 (09:19 +0100)]
doc: Update README with fresh links.

12 years agoraop: Don't crash if fd is not open when trying to close it
David Henningsson [Mon, 12 Sep 2011 09:23:57 +0000 (11:23 +0200)]
raop: Don't crash if fd is not open when trying to close it

BugLink: http://bugs.launchpad.net/bugs/845286
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agovolume: Rename 'sync volume' to 'deferred volume'.
Colin Guthrie [Tue, 13 Sep 2011 20:15:49 +0000 (21:15 +0100)]
volume: Rename 'sync volume' to 'deferred volume'.

This just covers Lennart's concern over the terminology used.

The majority of this change is simply the following command:
 grep -rli sync[-_]volume . | xargs sed -i 's/sync_volume/deferred_volume/g;s/PA_SINK_SYNC_VOLUME/PA_SINK_DEFERRED_VOLUME/g;s/PA_SOURCE_SYNC_VOLUME/PA_SOURCE_DEFERRED_VOLUME/g;s/sync-volume/deferred-volume/g'

Some minor tweaks were added on top to tidy up formatting and
a couple of phrases were clarified too.

12 years agobuild-sys: Oops forgot to add the Kinect profile to the build system.
Colin Guthrie [Fri, 9 Sep 2011 18:55:09 +0000 (19:55 +0100)]
build-sys: Oops forgot to add the Kinect profile to the build system.

12 years agoraop: Properly deal with the name coming from the device.
Colin Guthrie [Tue, 6 Sep 2011 10:45:24 +0000 (11:45 +0100)]
raop: Properly deal with the name coming from the device.

We need to properly quote our proplist arguments passed to the module.

12 years agomodargs: Ensure modargs can be accessed in their raw form.
Colin Guthrie [Tue, 6 Sep 2011 10:35:33 +0000 (11:35 +0100)]
modargs: Ensure modargs can be accessed in their raw form.

When dealing with proplists passed as modargs, we need the unescaped form
in order to properly deal with quotes (ticks + double quotes). As the previous
code always called pa_unescape() before adding it into the modarg hashmap, this
was impossible.

This modification simply stores two proplists. If the unescaped value
is different from the raw value, we also keep the raw form.

When parsing proplist arguments, we use this raw form and do the unescaping
ourselves when processing it.

This changes the current behaviour which required you to double escape
proplists arguments. This double escape mechanism did allow you to mix
and match what types of quotes you used to delimit the individial
proplist values, but it made the actual data much harder to pass in.

This approach has the drawback that you cannot mix and match the quotes
you use, but this is a very minor issue and IMO pales in comparison to
the general clarity gained.

See the discussion on the mailing list for more background:
 http://lists.freedesktop.org/archives/pulseaudio-discuss/2011-September/011220.html

12 years agoalsa-mixer: Add support for the Microsoft Kinect Sensor device
Antonio Ospite [Fri, 9 Sep 2011 10:05:29 +0000 (12:05 +0200)]
alsa-mixer: Add support for the Microsoft Kinect Sensor device

The Kinect shows up as a UAC device after the firmware has been loaded,
but in order to be detected by pulseaudio a 4-channels input only
mapping is needed. Provide a new profile for that and set it with a udev
rule.

fdo#39664

12 years agomodule-suspend-on-idle: Move vacuum code to core
Maarten Bosmans [Thu, 8 Sep 2011 13:12:00 +0000 (15:12 +0200)]
module-suspend-on-idle: Move vacuum code to core

pa_core_maybe_vacuum now vacuums if there are either no streams or all devices are suspended.
The mempool_vacuum argument to module-suspend-on-idle is gone and defaults to true now.

12 years agoalsa: Tidy up argument descriptions
Colin Guthrie [Wed, 7 Sep 2011 20:11:58 +0000 (21:11 +0100)]
alsa: Tidy up argument descriptions

12 years agobluetooth: Bump DBus version to 1.3.0 and drop conditional code.
Colin Guthrie [Wed, 7 Sep 2011 19:19:44 +0000 (20:19 +0100)]
bluetooth: Bump DBus version to 1.3.0 and drop conditional code.

We used to support older DBus versions but 1.3.0 is two years old
now and by requiring it we cut down of deviated code paths at
runtime and thus have less support issues.

fdo#40635

12 years agoloopback: New modargs: sink_input_properties and source_output_properties.
Tanu Kaskinen [Tue, 6 Sep 2011 17:33:42 +0000 (20:33 +0300)]
loopback: New modargs: sink_input_properties and source_output_properties.

The new modargs replace sink_input_name, sink_input_role,
source_output_name and source_output_role.

12 years agoraop: Use the port supplied by avahi when connecting to RAOP devices.
Colin Guthrie [Mon, 5 Sep 2011 21:19:41 +0000 (22:19 +0100)]
raop: Use the port supplied by avahi when connecting to RAOP devices.

The Apple TV for example uses a non-default port, but we previously ignored
this. We now correctly parse the server string but in so doing, we end up
parsing the address twice. As we need a pure IP/hostname of the device itself
to use in our requests, this is somewhat unavoidable.

Sadly there are still other problems with Apple TVs, but this is still
one step closer.

Fixes part of #950

12 years agodevice-restore: Fix use-after-free error.
Colin Guthrie [Mon, 5 Sep 2011 19:29:36 +0000 (20:29 +0100)]
device-restore: Fix use-after-free error.

12 years agoformats: Export more functions needed for a clean build.
Colin Guthrie [Sun, 4 Sep 2011 19:05:14 +0000 (21:05 +0200)]
formats: Export more functions needed for a clean build.

All of these functions are not actually defined in format.h
(they are defined in internal.h) and thus should really be
included only in libpulsecommon and implemented in a separate
source file.

However if that approach was taken, and these functions were
included in libpulsecommon, then they would have a link time
dependancy on libpulse (as these four functions use other
pa_format_info_* functions). As the opposite is already true
(libpulse depends on libpulsecommon), this is not possible as
it creates a circular dependancy.

Thus the only option is to just to include these four functions
in the map-file, but not actually export any public headers for
them. Of course users could use this implementation by defining
them in their own headers, but the only practical problem
with this approach is naming conflicts which is unlikely to happen.

fdo#40616

12 years agoformats: The format code should be in libpulse, not libpulsecommon
Colin Guthrie [Sun, 4 Sep 2011 18:40:21 +0000 (20:40 +0200)]
formats: The format code should be in libpulse, not libpulsecommon

Without this change any applications calling e.g. pa_format_info_new()
and friends will be explicitly linked against libpulsecommon-$MAJORMINOR.so
which is something we specifically avoid as it may contain ABI/API unstable
functions.

Also ensure we export pa_format_info_from_string() for external use.

fdo#40616

12 years agostream-restore: Add proper data validity checks to the legacy database entry read.
Colin Guthrie [Sun, 4 Sep 2011 10:54:41 +0000 (12:54 +0200)]
stream-restore: Add proper data validity checks to the legacy database entry read.

12 years agostream-restore: Add in some variable sets that were missing from 9ffa93.
Colin Guthrie [Sun, 4 Sep 2011 10:28:07 +0000 (12:28 +0200)]
stream-restore: Add in some variable sets that were missing from 9ffa93.

This broke the conversion of the stream-restore database from
previous versions.

12 years agodevice-restore: Simplify the migration of data to per-port keys.
Colin Guthrie [Fri, 2 Sep 2011 11:51:26 +0000 (12:51 +0100)]
device-restore: Simplify the migration of data to per-port keys.

Rather than write all the keys out for each port, simply write a 'null'
port entry and modify the read code to 'fallback' to this when it cannot
find a key. This is needed as the code used when writing the key may not
actually have the sink ports available at the time it uses them,
and thus can cause a segv. This approach adds some degree of overhead
but it's relatively minimal and it can be mitigated by compiling
without support for legacy database formats if so desired.

Thanks to David Henningsson for pointing out the problem.

12 years agoMake gcc --std=c99 happy
Maarten Bosmans [Fri, 2 Sep 2011 12:11:52 +0000 (14:11 +0200)]
Make gcc --std=c99 happy

We're now more or less C99 compliant

12 years agoSquash the last gcc warnings
Maarten Bosmans [Fri, 2 Sep 2011 12:11:51 +0000 (14:11 +0200)]
Squash the last gcc warnings

12 years agomodule-equalizer-sink: Use correct limit in loop
Maarten Bosmans [Fri, 2 Sep 2011 12:11:50 +0000 (14:11 +0200)]
module-equalizer-sink: Use correct limit in loop

12 years agobluetooth/sbc: Use __asm__ keyword
Maarten Bosmans [Fri, 2 Sep 2011 12:11:49 +0000 (14:11 +0200)]
bluetooth/sbc: Use __asm__ keyword

12 years agomodule-equalizer-sink: Use = in initialising variables
Maarten Bosmans [Fri, 2 Sep 2011 08:33:59 +0000 (10:33 +0200)]
module-equalizer-sink: Use = in initialising variables

This makes the compiler in C99 mode happy

12 years agomodule-equalizer-sink: Use %z for printf of size_t variables
Maarten Bosmans [Fri, 2 Sep 2011 08:33:58 +0000 (10:33 +0200)]
module-equalizer-sink: Use %z for printf of size_t variables

12 years agoalsa-mixer: Set "Front" control to 0 dB on headphone path
David Henningsson [Mon, 4 Jul 2011 08:12:17 +0000 (10:12 +0200)]
alsa-mixer: Set "Front" control to 0 dB on headphone path

I've seen more than one system where the volume control named
"Front" is a part of audio path for headphones. This is somewhat
of a compromise: While we don't merge it into the path, as that
would be regressing machines where "Front" isn't a part of the
audio path, it would still enable sound on these machines.

BugLink: http://bugs.launchpad.net/bugs/804178
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agomodule-switch-on-connect: Don't switch unlinked sink input and source outputs
David Henningsson [Wed, 31 Aug 2011 12:37:05 +0000 (14:37 +0200)]
module-switch-on-connect: Don't switch unlinked sink input and source outputs

Unlinked streams can not be moved, so don't try.

BugLink: http://bugs.launchpad.net/bugs/837386
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agovala: Add has_type_id=false to all enums, structs and classes
Arun Raghavan [Wed, 31 Aug 2011 05:51:57 +0000 (11:21 +0530)]
vala: Add has_type_id=false to all enums, structs and classes

Since none of our types is derived from GType, explicitly signal this.
The default value for this attribute changed at some point, breaking our
bindings.

12 years agobuild-sys: bump soname
Colin Guthrie [Mon, 29 Aug 2011 17:07:02 +0000 (18:07 +0100)]
build-sys: bump soname

12 years agoequalizer: Comment out unused function
Arun Raghavan [Mon, 29 Aug 2011 16:44:04 +0000 (22:14 +0530)]
equalizer: Comment out unused function

Gets rid of a compiler warning

12 years agoecho-cancel: Get rid of annoying compiler warnings
Arun Raghavan [Mon, 29 Aug 2011 16:43:44 +0000 (22:13 +0530)]
echo-cancel: Get rid of annoying compiler warnings

12 years agoecho-cancel: Don't allow streams to attach while unloading
Arun Raghavan [Mon, 29 Aug 2011 12:17:39 +0000 (17:47 +0530)]
echo-cancel: Don't allow streams to attach while unloading

When unloading, some module may end up trin to move a sink-input or
source-output back onto our virtual sink/source, causing an infinite
loop of us moving the stream away and having it moved back.

We prevent this from happening by preventing any stream from being
attached during unload.

12 years agoecho-cancel: Make save_aec modarg a bool instead of an int
Arun Raghavan [Mon, 29 Aug 2011 12:17:27 +0000 (17:47 +0530)]
echo-cancel: Make save_aec modarg a bool instead of an int

12 years agopacat: make pacat respond to cork/uncork events
Lu Guanqun [Tue, 23 Aug 2011 06:18:22 +0000 (14:18 +0800)]
pacat: make pacat respond to cork/uncork events

Pacat remembers the number of cork requests, and then cork/uncork the stream
accordingly.

With this change, it makes below test script work correctly:

pacat -p --property=media.role="music" <long-sound> &
sleep 2
pacat -p --property=media.role="phone" <short-sound>
wait

Initial idea by Lu Guanqun, but modified by Colin Guthrie (so blame
me if it's broken)

12 years agoSet better priorities on input paths
David Henningsson [Fri, 26 Aug 2011 12:04:18 +0000 (14:04 +0200)]
Set better priorities on input paths

The priorities should be set in the approximately likeliness that someone
would like to use them. This is hard to guess of course, but this is
a better guess compared to the existing configuration.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agopassthrough: Fix setting volume to unamplified again
Arun Raghavan [Fri, 26 Aug 2011 04:21:07 +0000 (09:51 +0530)]
passthrough: Fix setting volume to unamplified again

Thanks to Tanu for pointing out the (possibly pathological?) case that
base_volume might be >0dB.

12 years agodevice-restore: Restore volumes on port change.
Colin Guthrie [Wed, 24 Aug 2011 21:50:28 +0000 (22:50 +0100)]
device-restore: Restore volumes on port change.

This will allow for volumes to be saved separately for e.g. Headphones vs. Speakers.

At present it is possible that no volume will be saved for the device prior to the port
switch. In this case the volume will not change from the value set under the other port.
In an ideal world we would save the volume before switching port, but that would require
a new hook.

12 years agodevice-restore: Split device restore database into two parts.
Colin Guthrie [Wed, 24 Aug 2011 21:28:13 +0000 (22:28 +0100)]
device-restore: Split device restore database into two parts.

The device restore saves both the current port for a device, and the volume/mute/formats.
The latter three are really related to the device+port, not the device on it's own.

Thus we store just the port for a device in one key and the volume/mute/formats
under a different key that includes both the device and the port.

12 years agopassthrough: Fix what volume we set sinks/sources to
Arun Raghavan [Thu, 25 Aug 2011 15:47:51 +0000 (21:17 +0530)]
passthrough: Fix what volume we set sinks/sources to

Devices' 0 dB is base_volume not PA_VOLUME_NORM.

12 years agosndfile-util: Check return value of sf_command for errors
Maarten Bosmans [Wed, 24 Aug 2011 18:08:08 +0000 (20:08 +0200)]
sndfile-util: Check return value of sf_command for errors

It's better to show a message what the error is,
instead of just asserting that no errors happen in an external library call.

12 years agoRemove extra ; s where they are not allowed in strict C99
Maarten Bosmans [Wed, 24 Aug 2011 18:08:07 +0000 (20:08 +0200)]
Remove extra ; s where they are not allowed in strict C99

12 years agoecho-cancel: Use stream index in debug message
Maarten Bosmans [Wed, 24 Aug 2011 18:08:06 +0000 (20:08 +0200)]
echo-cancel: Use stream index in debug message

instead of the less useful stream pointer.

12 years agogitignore: Add Orc autogenerated files
Maarten Bosmans [Wed, 24 Aug 2011 18:08:05 +0000 (20:08 +0200)]
gitignore: Add Orc autogenerated files

12 years agoecho-cancel: Move speex preprocessing out of the main module
Arun Raghavan [Thu, 25 Aug 2011 12:17:05 +0000 (17:47 +0530)]
echo-cancel: Move speex preprocessing out of the main module

I initially included put the Speex preprocessing assuming that we'd want
to use the digital gain control and noise suppression from Speex for all
echo cancelling implementations. In practice, we're probably going to
get entire implementations all processing in one package (WebRTC, custom
modules from various vendors, etc.).

This moves out this preprocessing and related knobs into the speex
implementation, which serves to clean out all implementation-specific
details from the module-echo-cancel core.

12 years agoecho-cancel: Use pa_streq instead of strcmp
Arun Raghavan [Wed, 24 Aug 2011 05:05:09 +0000 (10:35 +0530)]
echo-cancel: Use pa_streq instead of strcmp

12 years agoecho-cancel: Add multiple include protection for header
Arun Raghavan [Wed, 24 Aug 2011 05:04:19 +0000 (10:34 +0530)]
echo-cancel: Add multiple include protection for header

12 years agoMore spelling fixes
Maarten Bosmans [Wed, 24 Aug 2011 16:24:46 +0000 (18:24 +0200)]
More spelling fixes

12 years agoSpelling fixes in public headers
Maarten Bosmans [Wed, 24 Aug 2011 16:24:45 +0000 (18:24 +0200)]
Spelling fixes in public headers

12 years agobuild-sys: Fix some LDFLAGS vs. LDADD usage
Arun Raghavan [Wed, 24 Aug 2011 12:26:34 +0000 (17:56 +0530)]
build-sys: Fix some LDFLAGS vs. LDADD usage

Thanks to Stefan Kost for pointing these out.

12 years agoFix spelling sucess -> success
David Henningsson [Wed, 24 Aug 2011 12:01:27 +0000 (14:01 +0200)]
Fix spelling sucess -> success

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoswitch-on-connect: Don't switch to a monitor source
David Henningsson [Wed, 24 Aug 2011 12:01:00 +0000 (14:01 +0200)]
switch-on-connect: Don't switch to a monitor source

Buglink: http://bugs.launchpad.net/bugs/831675
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agodevice-restore: Change the API to include type information (sink vs. source)
Colin Guthrie [Thu, 18 Aug 2011 15:37:54 +0000 (16:37 +0100)]
device-restore: Change the API to include type information (sink vs. source)

This changes the API, but as we have not released yet, this is OK.

12 years agodbus: Use pa_device_type_t rather than an internal equivalent
Colin Guthrie [Thu, 18 Aug 2011 14:40:15 +0000 (15:40 +0100)]
dbus: Use pa_device_type_t rather than an internal equivalent

12 years agodef: Add a new enum to allow differntiation between sinks and sources.
Colin Guthrie [Thu, 18 Aug 2011 14:36:04 +0000 (15:36 +0100)]
def: Add a new enum to allow differntiation between sinks and sources.

This is for bits of code or API where the concepts and constructs are
extensibly the same for sinks and sources. To avoid duplication we can
simply define our structure/API and then use this enum to differentiate
the two.

12 years agosink: Add PA_SINK_SET_FORMATS macro
Arun Raghavan [Thu, 18 Aug 2011 09:25:52 +0000 (14:55 +0530)]
sink: Add PA_SINK_SET_FORMATS macro

Required for testing the existence of the flag

12 years agosample-util: Fix off-by-one in error check
Arun Raghavan [Thu, 18 Aug 2011 08:49:00 +0000 (14:19 +0530)]
sample-util: Fix off-by-one in error check

Patch by jk.illwinter on http://www.pulseaudio.org/ticket/951

12 years agoRevert "device-restore: Make bools not be bit fields"
Arun Raghavan [Thu, 18 Aug 2011 08:04:33 +0000 (13:34 +0530)]
Revert "device-restore: Make bools not be bit fields"

This reverts commit ba163b8b23bcd72c35b028eb0b43c31a6ae1724d.

After discussion with Colin, decided that we don't want to do this
piecemeal -- need some discussion on the mailing-list and then we should
do this across the tree in one fell swoop post 1.0.

Conflicts:

src/modules/module-device-restore.c

12 years agosource-output: Ensure no volumes are applied for passthrough streams
Arun Raghavan [Thu, 18 Aug 2011 07:02:14 +0000 (12:32 +0530)]
source-output: Ensure no volumes are applied for passthrough streams

This forces passthrough source-outputs and their corresponding sources
to 0dB gain so that the data is sent unaltered to the receiver.

12 years agosink-input: Ensure no volumes are applied for passthrough streams
Arun Raghavan [Thu, 18 Aug 2011 06:21:12 +0000 (11:51 +0530)]
sink-input: Ensure no volumes are applied for passthrough streams

This forces passthrough sink-inputs and their corresponding sinks to 0dB
gain so that the data is sent unaltered to the receiver.

12 years agopassthrough: We must not plug in a resampler on stream move
Arun Raghavan [Thu, 18 Aug 2011 07:05:23 +0000 (12:35 +0530)]
passthrough: We must not plug in a resampler on stream move

12 years agodaemon: Fix compiler warning about missing function prototype
Arun Raghavan [Thu, 18 Aug 2011 07:02:48 +0000 (12:32 +0530)]
daemon: Fix compiler warning about missing function prototype

12 years agoalsa: Fix bad function name
Arun Raghavan [Thu, 18 Aug 2011 04:53:55 +0000 (10:23 +0530)]
alsa: Fix bad function name

I've no idea how that slipped by.

12 years agoformats: Fix bad passsthrough check
Arun Raghavan [Thu, 18 Aug 2011 04:40:22 +0000 (10:10 +0530)]
formats: Fix bad passsthrough check

Fixes breakage from commit adbdb6259becab57fff893671e58fff5786420db

12 years agoalsa: Open iec958 device with NONAUDIO bit set in passthrough mode
Arun Raghavan [Wed, 17 Aug 2011 17:08:43 +0000 (22:38 +0530)]
alsa: Open iec958 device with NONAUDIO bit set in passthrough mode

This is required for E-AC3 streams, as well as to let receivers we're
sending non-PCM data (which avoids playing noise if the data is
incorrect for some reason).

12 years agoformats: Use correct API to check for passthrough streams
Arun Raghavan [Wed, 17 Aug 2011 09:28:23 +0000 (14:58 +0530)]
formats: Use correct API to check for passthrough streams

12 years agoalsa: Don't always suspend/unsuspend on sink-input removal
Arun Raghavan [Wed, 17 Aug 2011 08:03:50 +0000 (13:33 +0530)]
alsa: Don't always suspend/unsuspend on sink-input removal

If the sink was already suspended, this avoids and assert when calling
suspend() again, and prevents an unnecessary unsuspend.

12 years agosource: Remove the PA_SOURCE_PASSTHROUGH flag
Arun Raghavan [Wed, 17 Aug 2011 03:30:47 +0000 (09:00 +0530)]
source: Remove the PA_SOURCE_PASSTHROUGH flag

This isn't actually used anywhere, and PA_SINK_PASSTHROUGH was also
removed.

12 years agointrospect: fix typo in default sink/source docs
Jonny Lamb [Tue, 16 Aug 2011 15:02:51 +0000 (15:02 +0000)]
introspect: fix typo in default sink/source docs

Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
12 years agoRemove offensive part of error message
David Henningsson [Mon, 15 Aug 2011 12:05:50 +0000 (14:05 +0200)]
Remove offensive part of error message

I don't know the exact cause for someone to submit a bug report for
this error message: if someone is truly offended by it (if so it is
a reminder that some people are more sensitive than others, and I do
want those people to feel welcome as well), or if it's a system's
check (if this goes through, it shows the system works, and the person
might put more work into his/her next patch), or if it's just a bug
(after all, it's not that weird to run two instances of PulseAudio?).
Either one could be reason enough to apply IMO.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoJACK: Load module-jackdbus-detect in default.pa
David Henningsson [Mon, 15 Aug 2011 12:05:49 +0000 (14:05 +0200)]
JACK: Load module-jackdbus-detect in default.pa

Provides automatic integration with the dbus enabled version of JACK 2.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoalsa-mixer: Add "Line HP Swap" element
David Henningsson [Mon, 15 Aug 2011 12:05:48 +0000 (14:05 +0200)]
alsa-mixer: Add "Line HP Swap" element

The "Line HP Swap" element needs to be set correctly for some Dove
boards to work correctly. Thanks to Daniel T Chen for the patch.

BugLink: http://bugs.launchpad.net/bugs/451635
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agoalsa-mixer: Mute IEC958 optical raw for several Audigy models
David Henningsson [Mon, 15 Aug 2011 12:05:47 +0000 (14:05 +0200)]
alsa-mixer: Mute IEC958 optical raw for several Audigy models

This switch needs to be off for analog output to work on several
Audigy cards.

Thanks to Daniel T Chen for the patch.

BugLink: http://bugs.launchpad.net/bugs/408370
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
12 years agobuild-sys: bump soname
Colin Guthrie [Tue, 16 Aug 2011 10:04:11 +0000 (11:04 +0100)]
build-sys: bump soname

12 years agocore: Unload the modules and cached samples before unref'ing the core.
Colin Guthrie [Tue, 16 Aug 2011 09:54:24 +0000 (10:54 +0100)]
core: Unload the modules and cached samples before unref'ing the core.

As various modules can subscribe to unlink callbacks unloading some modules
may trigger hooks in other modules.

The callbacks associated with these hooks could in turn need to use the core
in some capacity (e.g. perhaps they are module loading modules
(e.g. *-discover, filter-apply or gconf etc. and need to use the core to
unload modules they've loaded).

This change simply ensures that all modules and cached samples are unloaded
before freeing the core.

12 years agopactl: Add set-source-output-mute command
Maarten Bosmans [Mon, 15 Aug 2011 20:05:41 +0000 (22:05 +0200)]
pactl: Add set-source-output-mute command

12 years agodefault.pa: Update rtp null sink line
Maarten Bosmans [Mon, 15 Aug 2011 19:38:45 +0000 (21:38 +0200)]
default.pa: Update rtp null sink line

The description argument has been removed in favour of the more general sink_properties.

12 years agoInitialise write_volume
Maarten Bosmans [Mon, 15 Aug 2011 18:19:40 +0000 (20:19 +0200)]
Initialise write_volume

The callback should also be reset in reset_calbacks().
The extra check in _volume_change_apply() is needed because when the sink is unlinked the callbacks are reset,
but there still may be pending volume changes.

12 years agoformat: Remove stupid copy-paste-o
Arun Raghavan [Tue, 16 Aug 2011 09:51:45 +0000 (15:21 +0530)]
format: Remove stupid copy-paste-o

Thanks to Maarten Bosmans for the catch.

12 years agointrospect: fix source output and sink input docs mix-up
Jonny Lamb [Tue, 2 Aug 2011 13:38:10 +0000 (13:38 +0000)]
introspect: fix source output and sink input docs mix-up

Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
12 years agoalsa: Set SET_FORMATS flag when appropriate
Arun Raghavan [Tue, 16 Aug 2011 05:41:46 +0000 (11:11 +0530)]
alsa: Set SET_FORMATS flag when appropriate

12 years agosink: Add a SET_FORMATS flag
Arun Raghavan [Tue, 16 Aug 2011 05:41:34 +0000 (11:11 +0530)]
sink: Add a SET_FORMATS flag

This adds a PA_SINK_SET_FORMATS flag to the pa_sink_flags enum,
signalling that a sink allows the set of supported formats to be set
externally. The idea is for clients to be able to know what sinks
support this ability and adapt their UI appropriately.

12 years agobuild-sys: Bump JACK dependency to 0.117.0
Arun Raghavan [Mon, 15 Aug 2011 17:01:55 +0000 (22:31 +0530)]
build-sys: Bump JACK dependency to 0.117.0

This version is required since we recently started using jack_free()

https://bugs.freedesktop.org/show_bug.cgi?id=38858

12 years agoconf: Load module-filter-* by default
Arun Raghavan [Mon, 15 Aug 2011 11:07:55 +0000 (16:37 +0530)]
conf: Load module-filter-* by default

This loads module-filter-heuristics and module-filter-apply by default
so that applications can request filters via properties. Not adding this
to system.pa -- the assumption is that people running system mode would
want more fine-grained control over such options.

12 years agofilter-heuristics: Don't force AEC on all phone streams
Arun Raghavan [Mon, 15 Aug 2011 10:38:40 +0000 (16:08 +0530)]
filter-heuristics: Don't force AEC on all phone streams

Removing the bit that automatically loads module-echo-cancel for phone
streams. Clients need to specifically opt in for this now with
filter.want, until we are reasonably certain this won't break other apps
(Skype for one, possibly others).

12 years agoproplist: Make filter properties line up prettily
Arun Raghavan [Mon, 15 Aug 2011 09:50:20 +0000 (15:20 +0530)]
proplist: Make filter properties line up prettily

12 years agoRemind people not to break module-tunnel
Arun Raghavan [Mon, 15 Aug 2011 09:49:10 +0000 (15:19 +0530)]
Remind people not to break module-tunnel

12 years agomemblock: use built-in function
Lu Guanqun [Mon, 15 Aug 2011 05:24:51 +0000 (13:24 +0800)]
memblock: use built-in function

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
12 years agomemblock: fix memory leak when pa_shm_create_rw fails
Lu Guanqun [Mon, 15 Aug 2011 01:51:37 +0000 (09:51 +0800)]
memblock: fix memory leak when pa_shm_create_rw fails

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
12 years agoAvoid read from freed memory
Maarten Bosmans [Sat, 13 Aug 2011 11:43:21 +0000 (13:43 +0200)]
Avoid read from freed memory

The order of freeing the hashmaps is important here, because otherwise a string used as key is freed before the hashmap
is freed.

Valgrind reports this as:
 Invalid read of size 1
    at 0x4107042: pa_idxset_string_hash_func (idxset.c:67)
    by 0x4106026: remove_entry (hashmap.c:93)
    by 0x41061BF: pa_hashmap_free (hashmap.c:110)
    by 0x71DD143: pa_dbusiface_core_free (iface-core.c:2105)
    by 0x71F2169: module_dbus_protocol_LTX_pa__done (module-dbus-protocol.c:595)
    by 0x406DC51: pa_module_free (module.c:162)
    by 0x406E01D: pa_module_unload_all (module.c:210)
    by 0x4068842: core_free (core.c:169)
    by 0x406FD5D: pa_object_unref (object.c:64)
    by 0x805224D: pa_core_unref (core.h:184)
    by 0x805560B: main (main.c:1159)
  Address 0x4d099c0 is 0 bytes inside a block of size 100 free'd
    at 0x4025BF0: free (vg_replace_malloc.c:366)
    by 0x40F128C: pa_xfree (xmalloc.c:131)
    by 0x71E4CEB: pa_dbusiface_device_free (iface-device.c:1293)
    by 0x71DCD7E: free_device_cb (iface-core.c:2062)
    by 0x41061D7: pa_hashmap_free (hashmap.c:113)
    by 0x71DD125: pa_dbusiface_core_free (iface-core.c:2104)
    by 0x71F2169: module_dbus_protocol_LTX_pa__done (module-dbus-protocol.c:595)
    by 0x406DC51: pa_module_free (module.c:162)
    by 0x406E01D: pa_module_unload_all (module.c:210)
    by 0x4068842: core_free (core.c:169)
    by 0x406FD5D: pa_object_unref (object.c:64)
    by 0x805224D: pa_core_unref (core.h:184)

12 years agoInitialise variables
Maarten Bosmans [Sat, 13 Aug 2011 11:43:20 +0000 (13:43 +0200)]
Initialise variables

These were detected using clang static analyzer.

12 years agoPlug some memory leaks
Maarten Bosmans [Sat, 13 Aug 2011 11:43:19 +0000 (13:43 +0200)]
Plug some memory leaks

These were detected with valgrind.