Commit graph

7443 commits

Author SHA1 Message Date
Pierre Ossman
0138a51a2c core: make sure win32 sockets remain blocking
Commit 7e344b5 hade the side effect of forcing every socket to
be non-blocking on Windows. This is because of a (documented)
side effect of WSAEventSelect(). So we need to make sure to restore
blocking behaviour afterwards for relevant sockets.
2013-11-15 10:53:19 +02:00
Alexander Couzens
abfca5cb58 tunnel-new: add cookie module argument
When connecting to a remote server your local generated authentication
cookie is used. If remote server's cookie is different from your local
one you aren't allowed to connect. You can use the cookie argument
or define a wider acl in remote server configuration for
module-native-protocol.
2013-11-15 10:16:29 +02:00
Tanu Kaskinen
49dd827373 sink-input, source-output: Don't assume that proplist has been initialized in free()
It's bad form to assume in free() that any member of the struct has
been initialized. I ran into problems with this when I reordered
things in pa_sink_input_new() and pa_source_output_new().
2013-11-14 15:17:17 +02:00
Peter Meerwald
d0fd59c34c resampler: Cleanup, index of memchunks is not used
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-11-08 16:14:43 +02:00
Peter Meerwald
b14e9c0a6c resampler: Prepare to have leftover data in different output buffers
leftover_buf points to the output buffer of a stage containing leftover
data; similar for leftover_buf_size and have_leftover

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-11-08 16:01:06 +02:00
Peter Meerwald
0109a50a2d resampler: Add fit_buf() helper funtion for buffer allocation
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-11-08 15:50:05 +02:00
Peter Meerwald
da5c215d9b resampler: Cleanup, rename xxxx_buf_samples to xxxx_buf_size
we measure the capacity of a buffer in bytes, not samples

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-11-08 10:34:56 +02:00
Peter Meerwald
53104b36e6 resampler: Handle leftover samples, use new return value
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-11-08 10:33:16 +02:00
Peter Meerwald
79b237ca02 resampler: Change interface, resampler may return the number of leftover frames
some resampler implementations (e.g. libsamplerate and ffmpeg) do not consume
the entire input buffer; the impl_resample() function now has a return value
returning the number of frames in the input buffer not processed

these frames must be saved in appropriate buffer and presented together with
new input data

also change the parameter names from in_samples, out_samples to in_n_frames,
out_n_frames, respectively (n_frames = samples / channels)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-11-08 10:27:30 +02:00
Peter Meerwald
6d61c7779d resampler: Introduce work_channels
work_channels is the number of channels in the resampler stage

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-11-08 10:17:46 +02:00
Peter Meerwald
c60a36ecdd resampler: Introduce work frame size (w_fz)
w_fz represents the number of bytes per frame in the resampler stage

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-11-08 10:05:25 +02:00
Luiz Augusto von Dentz
f434087e42 card: Only set active_profile with available profile
When a card is being created and no profile has been assigned
pa_card_new will attempt to select one from the list but it does that
without checking the available flag which can lead to select profiles
not available.
2013-11-05 21:33:04 +02:00
Luiz Augusto von Dentz
85e7fbc196 introspect: Fix ABI break introduced by b98a2e1
The size of pa_card_profile_info cannot change even if it just a field
appended to end because each entry is appended to a contiguous memory
and accessed by offset this may lead clients to access invalid data.

To fix a new struct called pa_card_profile_info2 is introduced and shall
be used for now on while pa_card_profile_info shall be considered
deprecated but it is still mantained for backward compatibility.

A new field called profiles2 is introduced to pa_card_info, this new field
is an array of pointers to pa_card_profile_info2 so it should be possible
to append new fields to the end of the pa_card_profile_info2 without
breaking binary compatibility as the entries are not accessed by offset.
2013-11-05 21:26:34 +02:00
David Henningsson
6dddee4214 alsa-mixer: Add internal surround speaker elements
These kcontrol names have started to show up lately, in
combination with surround internal speakers.

BugLink: https://bugs.launchpad.net/bugs/1236965
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-11-01 21:27:29 +01:00
João Paulo Rechi Vita
078dc15944 console-kit: Remove logging of every message on the bus 2013-11-01 16:28:45 +02:00
Peter Meerwald
e8a84270c3 tests: Extract PA_CPU_TEST* macros to separate header
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-11-01 15:02:24 +01:00
Pierre Ossman
4262d6a14f daemon conf: "high-priority" setting isn't respected
The code got removed by accident during the cleanup in commit 9c438bcac6. So
this patch is needed to bring it back and make things work like documented.
2013-11-01 14:50:51 +01:00
poljar (Damir Jelić)
6e4335cc71 zsh-completion: Add --monitor-stream completion to pacat 2013-10-29 20:59:32 +02:00
Tanu Kaskinen
073051f983 simple: Improve pa_simple_read() documentation
There was a question in IRC about whether pa_simple_read() blocks or
not. It's already documented on the simple API overview page, but it's
good to say it also in the function reference. As a bonus, I added
some additional details to the documentation too.
2013-10-29 20:53:48 +02:00
Tanu Kaskinen
38b8c42b35 bluetooth: Fix variable constness
The string points to memory inside a DBusMessage, so we don't own the string.
2013-10-29 20:46:47 +02:00
Tanu Kaskinen
c922dce784 bluetooth: Remove adapter_remove_all()
The function was redundant, because all it did was call adapter_free()
for each adapter in the hashmap, and that can be delegated to
pa_hashmap when freeing or emptying it.
2013-10-29 20:44:14 +02:00
poljar (Damir Jelić)
b49298c51e zsh-completion: Fix pacat device completion
The pacat completion didn't complete the right devices for the --record
and --playback flags.

This patch fixes this and makes the device completion for pacat easily
expandable.
2013-10-29 19:47:06 +02:00
poljar (Damir Jelić)
47729c43b4 bash-completion: Add --monitor-stream completion to pacat 2013-10-29 19:46:18 +02:00
Peter Meerwald
832ad693f5 modargs: Add pa_modargs_get_sample_rate()
return sample rate from the "rate" module argument

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2013-10-29 19:35:29 +02:00
Peter Meerwald
22ee1b9d53 modargs: Add pa_modargs_get_resample_method()
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-10-29 19:26:58 +02:00
Ben Brewer
68156d3f79 mainloop, glib-mainloop: time_restart could cause incorrect event ordering
This fixes a bug where calling time_restart can leave the current event
in the cache, even though the restart scheduled the event in the future.
This would cause the event to get executed more frequently than it should.
2013-10-29 19:14:00 +02:00
Peter Meerwald
81f0eb626e tests: Resampler output memchunk may be reset (zero)
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-10-29 18:31:32 +02:00
Peter Meerwald
f4635818bd memblock: Fix typo in description of pa_memblock_unref_fixed(), cleanup
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2013-10-29 18:26:57 +02:00
Rafael Ferreira
09e88de0af Updated Brazilian Portuguese translation
Signed-off-by: Rafael Ferreira <rafael.f.f1@gmail.com>
2013-10-23 07:30:46 +01:00
João Paulo Rechi Vita
9490a067bb bluetooth: Track discovery modules by index
Previously module-bluez5-discover and module-bluez4-discover were being
tracked using their pa_module pointer. But during daemon shutdown these
modules are unloaded before module-bluetooth-discover, leaving stale
pointers in module-bluetooth-discover's userdata. To avoid this problem
this commit makes module-bluetooth-discover keep track of
module-bluez5-discover and module-bluez4-discovery by their indexes.
2013-10-15 10:42:25 +03:00
Tanu Kaskinen
b402f9e01f build-sys: Print CPPFLAGS in configure
I needed this for verifying that the conditional defining of
_FORTIFY_SOURCE works.
2013-10-12 23:17:15 +03:00
Tanu Kaskinen
9305286ad8 build-sys: Don't define _FORTIFY_SOURCE when building with -O0 2013-10-12 23:17:15 +03:00
Kiran Krishnappa
ab25436486 sndfile-util: fix format for 24bit depth wav files
PA_SAMPLE_24NE generated in pa_sndfile_read_sample_spec is not
handled in pa_sndfile_readf and writef function. paplay/parecord
used to get aborted for 24bit depth wav files
2013-10-12 23:16:36 +03:00
Jan Alexander Steffens (heftig)
f81e3e1d78 alsa: Fix crash when loading bare ALSA sink/source
module-alsa-{sink,source}.c call pa_alsa_{sink,source}_new with
mapping set to NULL. Guard against this, like the rest of the
function does.

module-alsa-card does not use NULL, so this went unnoticed so far.
2013-10-10 00:03:56 +05:30
Anton Lundin
35fea579cb build-sys: Fix building with Android toolchain
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2013-10-05 09:49:20 +05:30
Alexander Couzens
3fd2004603 tunnel-sink-new: Fix a possible crash
When the creation of u->thread fails, then pa_thread_mq_done() in
pa__done() will crash, because pa_thread_mq_init() was never called.
Allocating the thread_mq object separately, instead of embedding it
in the userdata struct, allows pa__done() to call pa_thread_mq_done()
only when necessary.
2013-10-04 14:30:26 +03:00
Alexander Couzens
0c3f3934f5 tunnel-sink-new: remove switch-default from state change callbacks
Using default sections for switch(state) in state change callbacks will prevent
useful compiler warnings for non-handled cases
2013-10-04 13:53:08 +03:00
David Henningsson
798525bf16 alsa-mixer: Drop all unused paths, not only unsupported paths
This is a cleaner solution, because it also removes paths that are
being removed because they are subsets of other paths.

Otherwise, the lingering paths could cause jack detection related
assertion failures.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=69676
Reported-and-tested-by: Kalev Lember <kalevlember@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-10-03 16:19:52 +02:00
Arun Raghavan
5a5e16bc62 i18n: Update bluetooth bits in POTFILES 2013-09-30 19:08:03 +05:30
David Henningsson
dcb52b0844 default/system.pa: Do not load module-dbus-protocol
The author of this module, Tanu Kaskinen, has said that this module
"is not suitable for general use". Also, it is still causing crashes
on card removal (see bug 69871).

Qpaeq, and possibly other tools, use this module - but they can load
the module manually if they still wish to use it.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2013-09-30 14:33:37 +02:00
Arun Raghavan
5a2fd6624d alsa-ucm: Fix bad rate check
Need to check the rate value for being > 0 not the return value of
pa_atou().
2013-09-30 15:16:56 +05:30
Arun Raghavan
24d2fa5415 alsa-ucm: Don't allow Playback/CaptureRate to be 0
This was a review comment on the original patch that I missed fixing.
2013-09-30 08:32:59 +05:30
Tanu Kaskinen
189708a597 bluetooth: Add a comment about messing with the IDLE suspend cause 2013-09-29 19:47:16 +03:00
Arun Raghavan
0a5f3bfaf0 hashmap: Add a key+value iterator 2013-09-29 19:15:39 +03:00
João Paulo Rechi Vita
8753b8c147 bluetooth: Revive module-bluetooth-discover
Create a wrapper module called module-bluetooth-discover to avoid
breaking backward-compatibility of default.pa. This wrapper may
eventually be dropped altoghether with BlueZ 4 support.
2013-09-29 16:54:38 +03:00
João Paulo Rechi Vita
1ea8a2bdae cli-command: Use pa_module_exists() in .ifexists 2013-09-29 16:54:38 +03:00
João Paulo Rechi Vita
48d23d4863 module: Create pa_module_exists()
This new function checks if a certain module name is available in the
system.
2013-09-29 16:54:38 +03:00
João Paulo Rechi Vita
dc4be17e07 bluetooth: Fail to load driver if discovery module is not loaded
For quite some time now the device driver module doesn't work well
without the discovery module, so for the BlueZ 5 support we'll prevent
the device driver module to be loaded if the discovery module is not
loaded.
2013-09-29 16:54:38 +03:00
João Paulo Rechi Vita
774c73309d bluetooth: Implement get_n_used() for module-bluez5-device 2013-09-29 16:54:38 +03:00
João Paulo Rechi Vita
ef24f7f3aa bluetooth: Handle changes to BlueZ 5 transports state 2013-09-29 16:54:38 +03:00