summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* update NEWSv12.2stable-12.xTanu Kaskinen2018-07-161-0/+11
|
* update NEWSv12.1Tanu Kaskinen2018-07-141-0/+15
|
* i18n: update the Lithuanian translationMr. M2018-07-141-555/+559
|
* pipe-sink, pipe-source: fix file permissionsTanu Kaskinen2018-07-142-1/+13
| | | | | | | | | | | | | | | We recently changed the umask of the daemon from 022 to 077, which broke module-pipe-sink in the system mode, because nobody was allowed to read from the pipe. module-pipe-source in the system mode was probably always broken, because the old umask of 022 should prevent anyone from writing to the pipe. This patch uses chmod() after the file creation to set the permissions to 0666, which is what the fkfifo() call tried to set. Bug link: https://bugs.freedesktop.org/show_bug.cgi?id=107070
* ladspa-sink: fix search pathTanu Kaskinen2018-07-142-8/+12
| | | | | | | | | | | | Having a single level macro for stringizing LADSPA_PATH doesn't work, because the '#' preprocessor operator doesn't expand any macros in its parameter. As a result, we used the string "LADSPA_PATH" as the search path, and obviously no plugins were ever found. This adds a two-level macro in macro.h and uses that to expand and stringize LADSPA_PATH. Bug link: https://bugs.freedesktop.org/show_bug.cgi?id=107078
* switch-on-port-available: ignore bluetooth cardsTanu Kaskinen2018-07-141-0/+8
| | | | | | | | | | | | When the user manually switches the profile of a bluetooth headset from "off" to "a2dp_sink", the port availability changes from "unknown" to "yes", which triggered a recursive profile change in module-switch-on-port-available. Such recursivity isn't (and possibly can't) be handled well (that is, PulseAudio crashed), so let's avoid doing bluetooth profile changes from module-switch-on-port-available (they're useless anyway). Bug link: https://bugs.freedesktop.org/show_bug.cgi?id=107044
* update NEWSv12.0Tanu Kaskinen2018-06-181-0/+79
|
* sink-input, source-output: fix uninitialized variable accessTanu Kaskinen2018-05-312-4/+12
| | | | | | | | The volume_map variable was initialized only for PCM streams, but the variable was passed to pa_cvolume_remap() also for non-PCM streams. The volume remapping is never necessary for passthrough streams (PCM or not), because no volume will be applied anyway, so let's skip the pa_cvolume_remap() call for all passthrough streams.
* alsa-card: fix null dereferenceTanu Kaskinen2018-05-301-1/+2
| | | | | | | | | | | | | | jack->melem can be null if the jack disappears between probing the card and the init_jacks() call. I don't know if jacks actually ever disappear like that (seems unlikely), but this check is in any case needed as long as init_jacks() has proper handling for the jack disappearing case (rather than just an assert). There was a crash report[1] that indicated that card_suspend_changed() called report_jack_state() with a null melem. I don't know if that was because the jack actually disappeared, or is there some other bug too. [1] https://bugs.freedesktop.org/show_bug.cgi?id=104385
* alsa-util: Use time stamp config only for alsa versions >= 1.1.0Georg Chini2018-05-151-1/+7
| | | | | | | | | The commit "alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay()" broke the build on ALSA versions below 1.1.0 because the time stamp configuration function was introduced in 1.1.0. This patch makes the usage of snd_pcm_status_set_audio_htstamp_config() dependent on ALSA version.
* build-sys: remove module-defs.h.m4 from EXTRA_DISTv11.99.1Tanu Kaskinen2018-05-111-1/+0
| | | | The file doesn't exist any more.
* build-sys: fix distribution of GSettings filesTanu Kaskinen2018-05-111-2/+4
| | | | | | | | | dist_gsettingsdataconvert_DATA was set only if GSettings was enabled. If the developer that generates the tarball doesn't have GSettings enabled, pulseaudio.convert wouldn't get included in the tarball. The schema file was not being added to the tarball even if GSettings was enabled.
* build-sys: bump sonamesTanu Kaskinen2018-05-111-1/+1
| | | | | A few small internal changes in libpulse. No changes in libpulse-simple and libpulse-mainloop-glib.
* alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay()Georg Chini2018-05-111-0/+7
| | | | | | | | | | | | | | The current code does not call snd_pcm_status_set_audio_htstamp_config() to configure the way timestamps are updated in ALSA. In kernel 4.14 and above a bug in ALSA has been fixed which changes timmestamp behavior. This leads to inconsistencies in the delay reporting because the time stamp no longer reflects the time when the delay was updated if the ALSA report_delay flag is not set. Therefore latencies are not calculated correctly. This patch uses snd_pcm_status_set_audio_htstamp_config() to set the ALSA report_delay flag to 1 before the call to snd_pcm_status(). With this, time stamps are updated as expected.
* bluez5-device: Fix memory leak in sco_process_render()Georg Chini2018-05-091-9/+19
| | | | | | | | | | | | sco_process_render does not unref the memblock when it encounters an error. This patch fixes the issue. It also changes the return value to 1 in the case of EAGAIN. Because the data was already rendered and cannot be re-sent, we have to discard the block. Because the modified EAGAIN handling prevents the log message about EAGAIN after POLLOUT from being printed, the log message was moved to a2dp/sco_process_render().
* bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sinkGeorg Chini2018-05-091-98/+202
| | | | | | | | | | | | | | | The rewrite of the thread function does not change functionality much, most of it is only cleanup, minor bug fixing and documentation work. This patch also changes the send buffer size for a2dp sink to avoid lags after temporary connection drops, following the proof-of-concept patch posted by Dmitry Kalyanov. Bug-Link: https://bugs.freedesktop.org/show_bug.cgi?id=58746 Additionally the patch changes the fixed latency for HSP playback from 125 to 25 ms. Tests showed that this produces better audio sync, which is expected as HSP should have smaller latency than A2DP.
* vala: Fix lengths for source/sink port arraysDavid Hewitt2018-05-071-0/+2
|
* allow-passthrough: fix hook return valueTanu Kaskinen2018-05-071-1/+1
| | | | -PA_ERR_NOENTITY is not a valid pa_hook_result_t value.
* module-allow-passthrough: Don't crash if we can't find a sinkArun Raghavan2018-05-061-0/+6
| | | | | | | | module-allow-passthrough has a (necessary) hack to replicate the default sink selection and format negotiation from sink-input.c. One thing that got missed in this replication is the possibility that the sink input is not compatible with the default sink. When this happen, we now exit gracefully.
* ladspa-sink: fix incorrect error conditionsSangchul Lee2018-05-041-1/+1
| | | | | | fix codes to prevent null pointer dereference of cdata variable. Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
* i18n: update Polish translationPiotr Drąg2018-05-011-192/+217
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=106284
* alsa-sink/source: always set reconfiguration callbackSangchul Lee2018-05-014-18/+6
| | | | | | | | | Reconfiguration callback should also be set in case of avoiding resampling option. This patch set the callback for every case because the callback has already conditions to leave if it is not needed. Also unnecessary codes of setting alternate sample rate to 0 are removed. Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
* gsettings: run gsettings-data-convert from gsettings-helperTanu Kaskinen2018-04-263-0/+172
| | | | | | This was originally planned to be done by paprefs when it starts, but since the schema is now fully controlled by pulseaudio, it makes sense to run the conversion from pulseaudio instead.
* vala: fix a struct field name and add missing source output volume/mute ↵wellington wallace2018-04-261-1/+4
| | | | functions
* build-sys: enable GSettings by defaultTanu Kaskinen2018-04-191-17/+25
| | | | | | | | | | | | | | | A new paprefs release is expected soon, and it will only support GSettings. In order to have the default configuration work with the new paprefs version, we need to enable GSettings by default. If both module-gconf and module-gsettings are enabled when building PulseAudio, both modules will be part of the default configuration. That can cause trouble, because when the GConf database is migrated to GSettings, the old configuration in GConf is not removed, so both module-gconf and module-gsettings will try to load modules. Generally it's not necessary to have both modules enabled even at build time, so let's default to having only one of them enabled.
* gsettings: free group_names after useTanu Kaskinen2018-04-191-0/+5
|
* gsettings: free the module-group GSettings objects after useTanu Kaskinen2018-04-191-0/+4
| | | | | | | | g_settings_get_child() returns a new GSettings object that needs to be freed when it's not used any more. This patch collects all the childern to a GPtrArray and frees them at the end of main(). They can't be freed earlier, because that would prevent the "changed" signals from being delivered.
* gsettings: remove bad signal connectionTanu Kaskinen2018-04-191-2/+0
| | | | | | | The removed g_signal_connect() call didn't make sense. The callback expects to be called when individual module groups are changed, not when the top level object is changed. Also, module_group_callback() expects user_data to be non-NULL, but here it was set to NULL.
* gsettings: check that children haven't been deleted before using themTanu Kaskinen2018-04-191-2/+8
| | | | | | | According to the documentation of g_settings_list_children(), the listed children may be removed at any time, so g_settings_get_child() may return NULL. This is probably very unlikely to happen in practice, but it's good to check anyway.
* build-sys: remove a redundant enable_gsettings checkTanu Kaskinen2018-04-191-1/+1
| | | | | If HAVE_GSETTINGS is 1, then enable_gsettings must be yes, so checking enable_gsettings isn't necessary.
* gsettings: rename "module" to "module-group"Tanu Kaskinen2018-04-192-29/+34
| | | | | | It is confusing if there's a thing named "module" which defines up to 10 modules to load. Calling the thing a "module group" instead should make it easier to understand.
* gconf, gsettings: fix config.h includesTanu Kaskinen2018-04-194-8/+10
| | | | config.h should be included by all .c files and none of the .h files.
* gsettings: add the modules schema to the schema description fileTanu Kaskinen2018-04-191-0/+10
| | | | | | | | | | Originally the idea was to provide the "modules" schema with paprefs, but since module-gsettings refers to the "modules" schema in its code, that would make module-gsettings depend on paprefs, which is not good. Now all schemas are provided by module-gsettings, so the paprefs dependency is avoided. Unfortunately this means that if paprefs is modified to load some new modules, the schema in pulseaudio needs to be updated as well.
* default.pa: add module-gsettingsTanu Kaskinen2018-04-192-0/+15
| | | | | | This also makes the module-gconf section conditional on HAVE_GCONF, because if only gsettings support is built, the gconf section in the configuration file would be redundant and confusing.
* .gitignore: add module-gsettings related thingsTanu Kaskinen2018-04-191-0/+2
|
* module-gsettings: new module to store configuration using gsettingsSylvain Baubeau2018-04-198-291/+747
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GConf is deprecated, and distributions are removing it. paprefs depends on GConf, so in order to avoid paprefs getting removed as well, paprefs has to be changed to use something else than GConf. GSettings is the easiest alternative to migrate to, although it has the same problems that GConf had: no support for system mode or networking. This patch takes the non-GConf specific code from module-gconf and puts it in stdin-util.[ch], which is then reused by module-gsettings. module-gsettings is designed to be very similar to module-gconf. Migration is expected to happen as follows: Distributions update PulseAudio and paprefs at the same time, or first PulseAudio and then paprefs. paprefs depends on module-gsettings, and module-gsettings conflicts with module-gconf. Therefore module-gconf gets automatically removed during the paprefs update. After the update an old PulseAudio is likely to be running with module-gconf loaded. If the user tries to use paprefs during this period, whatever the user does in paprefs won't have any effect until PulseAudio is restarted (probably by a reboot or relogin). This is not ideal, but will have to do. When module-gsettings is loaded, it runs gsettings-data-convert (implemented in a later patch). That will copy the settings from GConf to GSettings. If gsettings-data-convert is not available (it's part of GConf, so it may have already been uninstalled), then any previous paprefs settings are lost.
* qpaeq: fix Qt5 mainloop useFelipe Sateler2018-04-111-2/+2
| | | | This change was missed in the Qt4 -> Qt5 conversion.
* man: unify pactl and pacmd suspend command documentationTanu Kaskinen2018-04-102-19/+28
| | | | | | | | The suspend-sink and suspend-source documentation for pacmd was quite terse, so I copied the more complete documentation from pactl. I couldn't resist doing some other minor edits along the way too. Bug-link: https://bugs.freedesktop.org/show_bug.cgi?id=105907
* i18n: update the Czech translationDaniel Rusek2018-04-021-100/+83
|
* Fix memory leaksJungsup Lee2018-03-233-4/+18
| | | | | The returned string of the dbus_message_iter_get_signature() must be freed with dbus_free().
* i18n: update the Ukrainian translationYuri Chornoivan2018-03-201-247/+175
|
* fix a call to pa_sink_suspend() from an incorrect threadTanu Kaskinen2018-03-206-150/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The alsa sink calls pa_sink_suspend() from the set_port() callback. pa_sink_suspend() can only be called from the main thread, but the set_port() callback was often called from the IO thread. That caused an assertion to be hit in pa_sink_suspend() when switching ports. Another issue was that pa_sink_suspend() called the set_port() callback, and if the callback calls pa_sink_suspend() again recursively, nothing good can be expected from that, so the thread mismatch was not the only problem. This patch moves the mixer syncing logic out of pa_sink/source_suspend() to be handled internally by the alsa sink/source. This removes the recursive pa_sink_suspend() call. This also removes the need to have the mixer_dirty flag in pa_sink/source, so the flag and the pa_sink/source_set_mixer_dirty() functions can be removed. This patch also changes the threading rules of set_port(). Previously it was called sometimes from the main thread and sometimes from the IO thread. Now it's always called from the main thread. When deferred volumes are used, the alsa sink and source still have to update the mixer from the IO thread when switching ports, but the thread synchronization is now handled internally by the alsa sink and source. The SET_PORT messages are not needed any more and can be removed. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=104761
* pass pa_suspend_cause_t to set_state_in_io_thread() callbacksTanu Kaskinen2018-03-2025-55/+172
| | | | | | | | The suspend cause isn't yet used by any of the callbacks. The alsa sink and source will use it to sync the mixer when the SESSION suspend cause is removed. Currently the syncing is done in pa_sink/source_suspend(), and I want to change that, because pa_sink/source_suspend() shouldn't have any alsa specific code.
* replace sink/source SET_STATE handlers with callbacksTanu Kaskinen2018-03-1625-633/+849
| | | | | | | | | | | | | | | | | | | | | | | There are no behaviour changes, the code from almost all the SET_STATE handlers is moved with minimal changes to the newly introduced set_state_in_io_thread() callback. The only exception is module-tunnel, which has to call pa_sink_render() after pa_sink.thread_info.state has been updated. The set_state_in_io_thread() callback is called before updating that variable, so moving the SET_STATE handler code to the callback isn't possible. The purpose of this change is to make it easier to get state change handling right in modules. Hooking to the SET_STATE messages in modules required care in calling pa_sink/source_process_msg() at the right time (or not calling it at all, as was the case on resume failures), and there were a few bugs (fixed before this patch). Now the core takes care of ordering things correctly. Another motivation for this change is that there was some talk about adding a suspend_cause variable to pa_sink/source.thread_info. The variable would be updated in the core SET_STATE handler, but that would not work with the old design, because in case of resume failures modules didn't call the core message handler.
* oss: don't fail resume if trigger() failsTanu Kaskinen2018-03-161-32/+27
| | | | | | | | | | | | | | | | | | | | | | | | | The previous code made the SET_STATE message fail if trigger() failed. However, trigger() was called after pa_sink/source_process_msg(), which meant that the main thread that sent the SET_STATE thought that resuming failed, but nothing was undone in the IO thread, so in the IO thread things seemed as if the sink/source was successfully resumed. (I don't use OSS myself, so I don't know what kind of practical problems this could cause). Unless some complex undo logic is implemented, I believe it's best to ignore all failures in trigger(). Most error cases were already ignored, and the only one that wasn't ignored doesn't seem too serious. I also moved trigger() to happen before pa_sink/source_process_msg(), which made it necessary to add new state parameters to trigger(). The reason for this move is that I want to move the SET_STATE handler code into a separate callback, and if things are done both before and after pa_sink/source_process_msg(), that makes things more complicated. The previous code checked the return value of pa_sink/source_process_msg() before calling trigger(), but that was unnecessary, since pa_sink/source_process_msg() never fails when processing the SET_STATE messages.
* sink, source: rename set_state() to set_state_in_main_thread()Tanu Kaskinen2018-03-1617-54/+56
| | | | | There will be a new callback named set_state_in_io_thread(). It seems like a good idea to have a similar name for the main thread variant.
* bluetooth: fix resume error handlingTanu Kaskinen2018-03-072-26/+14
| | | | | | | When resuming a sink or source, pa_sink/source_process_msg() should be called only if resuming is successful. pa_sink/source_process_msg() updates thread_info.state and notifies streams about the new state, but if resuming fails, there's no state change.
* i18n: update the Indonesian translationAndika Triwidada2018-03-041-1197/+2110
|
* null-sink, pipe-sink: some state variable cleanupsTanu Kaskinen2018-02-232-5/+5
| | | | | | | | | | pa_sink_get_state() is supposed to be used from the main thread. In this case it doesn't really matter, because the SET_STATE handler is executed while the main thread is waiting, but since the state is available also in thread_info, let's use that. All other modules use thread_info.state too, so at least this change improves consistency. Also, we can use the PA_SINK_IS_OPENED macro to simplify the code a bit.
* alsa: add a couple of FIXME commentsTanu Kaskinen2018-02-232-0/+6
| | | | | | | build_pollfd() isn't likely to fail, but if it does, pa_sink/source_put() will crash on an assertion failure. I haven't seen such crash happening, this is just something that I noticed while studying the state change code.