1. 18 Jun, 2018 1 commit
  2. 31 May, 2018 1 commit
    • Tanu Kaskinen's avatar
      sink-input, source-output: fix uninitialized variable access · ad14bdb2
      Tanu Kaskinen authored
      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.
  3. 30 May, 2018 1 commit
    • Tanu Kaskinen's avatar
      alsa-card: fix null dereference · 9e5be089
      Tanu Kaskinen authored
      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
  4. 15 May, 2018 1 commit
    • Georg Chini's avatar
      alsa-util: Use time stamp config only for alsa versions >= 1.1.0 · 1e68e9aa
      Georg Chini authored
      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.
  5. 11 May, 2018 4 commits
    • Tanu Kaskinen's avatar
      build-sys: remove module-defs.h.m4 from EXTRA_DIST · 26b41dd1
      Tanu Kaskinen authored
      The file doesn't exist any more.
    • Tanu Kaskinen's avatar
      build-sys: fix distribution of GSettings files · d2538745
      Tanu Kaskinen authored
      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
    • Tanu Kaskinen's avatar
      build-sys: bump sonames · 0ee9d654
      Tanu Kaskinen authored
      A few small internal changes in libpulse. No changes in libpulse-simple
      and libpulse-mainloop-glib.
    • Georg Chini's avatar
      alsa-util: Set ALSA report_delay flag in pa_alsa_safe_delay() · b32705a5
      Georg Chini authored
      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
      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.
  6. 09 May, 2018 2 commits
    • Georg Chini's avatar
      bluez5-device: Fix memory leak in sco_process_render() · 3b04539d
      Georg Chini authored
      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
    • Georg Chini's avatar
      bluez5-device: Rewrite of thread function, reduce send buffer size for a2dp sink · 192c3aae
      Georg Chini authored
      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.
  7. 07 May, 2018 2 commits
  8. 06 May, 2018 1 commit
    • Arun Raghavan's avatar
      module-allow-passthrough: Don't crash if we can't find a sink · f9f9877d
      Arun Raghavan authored
      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
  9. 04 May, 2018 1 commit
  10. 01 May, 2018 2 commits
  11. 26 Apr, 2018 2 commits
  12. 19 Apr, 2018 12 commits
    • Tanu Kaskinen's avatar
      build-sys: enable GSettings by default · 5d66b442
      Tanu Kaskinen authored
      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.
    • Tanu Kaskinen's avatar
      gsettings: free group_names after use · f97cd344
      Tanu Kaskinen authored
    • Tanu Kaskinen's avatar
      gsettings: free the module-group GSettings objects after use · 2977afb9
      Tanu Kaskinen authored
      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
    • Tanu Kaskinen's avatar
      gsettings: remove bad signal connection · 705779ed
      Tanu Kaskinen authored
      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.
    • Tanu Kaskinen's avatar
      gsettings: check that children haven't been deleted before using them · 8484b63c
      Tanu Kaskinen authored
      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.
    • Tanu Kaskinen's avatar
      build-sys: remove a redundant enable_gsettings check · f5ff5d8b
      Tanu Kaskinen authored
      If HAVE_GSETTINGS is 1, then enable_gsettings must be yes, so checking
      enable_gsettings isn't necessary.
    • Tanu Kaskinen's avatar
      gsettings: rename "module" to "module-group" · 890bc108
      Tanu Kaskinen authored
      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.
    • Tanu Kaskinen's avatar
      gconf, gsettings: fix config.h includes · 0623b3c9
      Tanu Kaskinen authored
      config.h should be included by all .c files and none of the .h files.
    • Tanu Kaskinen's avatar
      gsettings: add the modules schema to the schema description file · d7a457ea
      Tanu Kaskinen authored
      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.
    • Tanu Kaskinen's avatar
      default.pa: add module-gsettings · b43d47f0
      Tanu Kaskinen authored
      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.
    • Tanu Kaskinen's avatar
    • Sylvain Baubeau's avatar
      module-gsettings: new module to store configuration using gsettings · 785b660d
      Sylvain Baubeau authored
      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.
  13. 11 Apr, 2018 1 commit
  14. 10 Apr, 2018 1 commit
  15. 02 Apr, 2018 1 commit
  16. 23 Mar, 2018 1 commit
    • Jungsup Lee's avatar
      Fix memory leaks · 605b2bbc
      Jungsup Lee authored
      The returned string of the dbus_message_iter_get_signature() must be
      freed with dbus_free().
  17. 20 Mar, 2018 3 commits
    • Yuri Chornoivan's avatar
      i18n: update the Ukrainian translation · 8b9a8b26
      Yuri Chornoivan authored
    • Tanu Kaskinen's avatar
      fix a call to pa_sink_suspend() from an incorrect thread · ad15e6e5
      Tanu Kaskinen authored
      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
      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
    • Tanu Kaskinen's avatar
      pass pa_suspend_cause_t to set_state_in_io_thread() callbacks · ad0616d4
      Tanu Kaskinen authored
      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.
  18. 16 Mar, 2018 3 commits
    • Tanu Kaskinen's avatar
      replace sink/source SET_STATE handlers with callbacks · b2537a8f
      Tanu Kaskinen authored
      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.
    • Tanu Kaskinen's avatar
      oss: don't fail resume if trigger() fails · 73b8a570
      Tanu Kaskinen authored
      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.
    • Tanu Kaskinen's avatar
      sink, source: rename set_state() to set_state_in_main_thread() · 0fad369c
      Tanu Kaskinen authored
      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.