Commit graph

6059 commits

Author SHA1 Message Date
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
Arun Raghavan
248394c8bf device-restore: Set sink format when possible
This implements the actual setting of sink formats when a new sink is
added or when the set of available formats changes.
2011-08-15 11:51:35 +05:30
Arun Raghavan
ba163b8b23 device-restore: Make bools not be bit fields
This makes the pa_bool_t members of userdata not be a single bit field
since pa_bool_t can be an int, potentially causing signedness issues in
comparisons.
2011-08-15 11:51:35 +05:30
Arun Raghavan
51fcee8902 alsa: Implement get/set_formats()
This implements the sink get_formats() and set_formats() API in
alsa-sink. Modules can use this to allow users to specify what formats
their receivers support.
2011-08-15 11:51:34 +05:30
Arun Raghavan
485d4dd542 sink: Add a set_formats() API
This adds API to let external sources specify what formats a sink
supports. Sinks must opt-in to allow this, and can perform some
validation if required.
2011-08-15 11:51:34 +05:30
Maarten Bosmans
b430407f47 Plug some memory leaks and an invalid read
Note in protocol-dbus.c specifically, method_signatures needs to be freed
before method_handlers, because otherwise h->method_name is freed while it is
still in use as a key in the method_signatures hashmap.
2011-08-12 20:31:52 +02:00
Colin Guthrie
a8f20e8d95 sink-input: Drop redundant assert (PA_SINK_INPUT_IS_LINKED() checked already) 2011-08-12 20:31:52 +02:00
Arun Raghavan
c1cb0a6925 log: Add missing pulsecore/thread.h include 2011-08-12 20:04:15 +05:30
Lu Guanqun
6c2a1cceed i18n: po file fixes
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2011-08-12 16:14:18 +05:30
Wang Xingchao
be3879e04e alsa: resets POLLOUT event
revents marked as POLLOUT|POLLERR|POLLWRNORM in "underrun" case that will
trigger unexpected log "ALSA woke us up to write new data to the device, but
there was acturally nothing to write...".

This patch avoids this log message.
2011-08-11 15:31:48 +02:00
Wang Xingchao
e564129b8f alsa: Update process_usec before going to sleep
During check_left_to_play/record(), the watermark may increase/decrease. So before
sleeping, update the actural sleep time based on latest watermark.
2011-08-11 15:30:27 +02:00
Maarten Bosmans
b4e938e194 Move i18n.[ch] to src/pulsecore
The header is used in files troughout the tree and is not included in the public api,
so it belongs in pulsecore, not in pulse.
2011-08-11 13:23:42 +02:00
Maarten Bosmans
464ddcdfea Add some missing format.h includes 2011-08-11 13:23:21 +02:00
Maarten Bosmans
f10da7683d Include config.h consistently in source files and not in headers 2011-08-11 13:21:31 +02:00
Lu Guanqun
625380d809 sample-util: use built-in function
use built-in function pa_frame_aligned().

Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
2011-08-11 10:36:21 +02:00
Colin Guthrie
1824fc6d73 ext-device-restore: Include format.h 2011-08-11 10:36:21 +02:00