Commit graph

6024 commits

Author SHA1 Message Date
David Henningsson
b746e09448 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>
2011-08-24 17:38:05 +05:30
Colin Guthrie
d6b9e61b90 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.
2011-08-18 17:33:08 +01:00
Colin Guthrie
9600d0c4b1 dbus: Use pa_device_type_t rather than an internal equivalent 2011-08-18 17:10:51 +01:00
Colin Guthrie
cc117be62b 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.
2011-08-18 17:10:13 +01:00
Arun Raghavan
a6ad2d860a sink: Add PA_SINK_SET_FORMATS macro
Required for testing the existence of the flag
2011-08-18 14:56:41 +05:30
Arun Raghavan
9083a8f667 sample-util: Fix off-by-one in error check
Patch by jk.illwinter on http://www.pulseaudio.org/ticket/951
2011-08-18 14:19:00 +05:30
Arun Raghavan
2568542b18 Revert "device-restore: Make bools not be bit fields"
This reverts commit ba163b8b23.

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
2011-08-18 13:34:48 +05:30
Arun Raghavan
f0be9c4004 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.
2011-08-18 12:46:46 +05:30
Arun Raghavan
0dea35a818 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.
2011-08-18 12:46:46 +05:30
Arun Raghavan
b08237b6c6 passthrough: We must not plug in a resampler on stream move 2011-08-18 12:45:58 +05:30
Arun Raghavan
3c854fc00c daemon: Fix compiler warning about missing function prototype 2011-08-18 12:45:55 +05:30
Arun Raghavan
3179ed71c5 alsa: Fix bad function name
I've no idea how that slipped by.
2011-08-18 10:23:55 +05:30
Arun Raghavan
358d92170a formats: Fix bad passsthrough check
Fixes breakage from commit adbdb6259b
2011-08-18 10:10:22 +05:30
Arun Raghavan
814c0371a4 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).
2011-08-17 23:08:45 +05:30
Arun Raghavan
adbdb6259b formats: Use correct API to check for passthrough streams 2011-08-17 23:08:37 +05:30
Arun Raghavan
dde09c7fac 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.
2011-08-17 13:33:50 +05:30
Arun Raghavan
2677911e92 source: Remove the PA_SOURCE_PASSTHROUGH flag
This isn't actually used anywhere, and PA_SINK_PASSTHROUGH was also
removed.
2011-08-17 09:00:47 +05:30
Jonny Lamb
7ed177dc29 introspect: fix typo in default sink/source docs
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-08-16 21:01:37 +05:30
David Henningsson
545521d405 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>
2011-08-16 11:59:34 +01:00
David Henningsson
286232f7a8 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>
2011-08-16 11:59:20 +01:00
David Henningsson
5c86d76554 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>
2011-08-16 11:59:02 +01:00
David Henningsson
838672974e 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>
2011-08-16 11:58:49 +01:00
Colin Guthrie
914e572537 build-sys: bump soname 2011-08-16 11:04:11 +01:00
Colin Guthrie
98ae74e052 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.
2011-08-16 11:01:34 +01:00
Maarten Bosmans
0d349462c7 pactl: Add set-source-output-mute command 2011-08-16 11:01:34 +01:00
Maarten Bosmans
1c7e29ef32 default.pa: Update rtp null sink line
The description argument has been removed in favour of the more general sink_properties.
2011-08-16 11:01:34 +01:00
Maarten Bosmans
9256d9b7be 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.
2011-08-16 11:01:34 +01:00
Arun Raghavan
0ef7e5cb4c format: Remove stupid copy-paste-o
Thanks to Maarten Bosmans for the catch.
2011-08-16 15:21:45 +05:30
Jonny Lamb
cabc198306 introspect: fix source output and sink input docs mix-up
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-08-16 14:05:49 +05:30
Arun Raghavan
e25e31fc80 alsa: Set SET_FORMATS flag when appropriate 2011-08-16 11:11:46 +05:30
Arun Raghavan
fb67016844 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.
2011-08-16 11:11:34 +05:30
Arun Raghavan
16147ae828 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
2011-08-15 22:35:58 +05:30
Arun Raghavan
cc41b1e776 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.
2011-08-15 16:46:26 +05:30
Arun Raghavan
2c852061ee 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).
2011-08-15 16:08:40 +05:30
Arun Raghavan
2e075bb837 proplist: Make filter properties line up prettily 2011-08-15 15:20:20 +05:30
Arun Raghavan
6bb78c80e1 Remind people not to break module-tunnel 2011-08-15 15:19:10 +05:30
Lu Guanqun
5fe545de23 memblock: use built-in function
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2011-08-15 09:41:56 +01:00
Lu Guanqun
ecbb4b4ef4 memblock: fix memory leak when pa_shm_create_rw fails
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2011-08-15 09:41:56 +01:00
Maarten Bosmans
a1ce2426d8 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)
2011-08-15 09:41:56 +01:00
Maarten Bosmans
92219b01b9 Initialise variables
These were detected using clang static analyzer.
2011-08-15 09:41:56 +01:00
Maarten Bosmans
3b76d8065f Plug some memory leaks
These were detected with valgrind.
2011-08-15 09:41:56 +01:00
Maarten Bosmans
1e4298be4d module-tunnel: Fix for new protocol versions
The commit 7ebc5033 resulted in segfaults, because format->plist was not allocated.
The solution is not to allocate pa_format_info on the stack, but to properly use pa_format_info_new().
Also a typo regarding pa_tagstruct_putu8 is corrected.
2011-08-15 09:41:56 +01:00
Tanu Kaskinen
0636f4e685 svolume: Make log messages more precise.
I was looking at a log, and noticed the following lines:

I  [pulseaudio] svolume_mmx.c: Initialising MMX optimized functions.
I  [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I  [pulseaudio] svolume_sse.c: Initialising SSE2 optimized functions.
I  [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I  [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.

It seemed odd that some messages were somewhat precise in
what functionality was initialized, while the svolume
messages told me that they had initialized just "functions".
So I made the svolume log messages more precise to match the
sconv and remap messages.
2011-08-15 09:41:56 +01:00
Tanu Kaskinen
dccbefa394 daemon-conf: Don't make log files executable. 2011-08-15 09:41:56 +01:00
Wang Xingchao
2f55da5baa sink-input: Avoid fake rewind in corked state
sink_input_request_rewind() does nothing if we are in the corked state.
Thus do not set the new state untill we have issued the rewind request.
2011-08-15 09:41:55 +01:00
Arun Raghavan
50b420aebd device-restore: Log invalid sink index while setting formats
This makes it easier to catch errors when using 'pactl set-sink-formats'
2011-08-15 12:49:35 +05:30
Arun Raghavan
b9d517cd51 sink: Fix lazy commenting 2011-08-15 12:49:35 +05:30
Arun Raghavan
0f3be7b72b pactl: Add a set-sink-formats command
This uses the module-device-restore protocol extension to save formats
on sinks that support it.
2011-08-15 12:49:35 +05:30
Arun Raghavan
8bffbcde1b format: Add string to pa_format_info conversion function
This will help accept string formats from the command like (so we can
set formats using pactl).
2011-08-15 11:51:35 +05:30
Arun Raghavan
348c51bfcd format: Make pa_format_info_snprint() more parseable
Removes the comma as the proplist separator since that makes
pa_proplist_from_string() break and prints only the encoding if there
are no properties (instead of "<encoding>, (no properties)").
2011-08-15 11:51:35 +05:30