[pulseaudio-commits] [Git][pulseaudio/pulseaudio][typos2] 6 commits: build-sys: meson: Make module-console-kit optional

Peter Meerwald-Stadler (@pmeerw) gitlab at gitlab.freedesktop.org
Mon Jun 13 22:33:16 UTC 2022



Peter Meerwald-Stadler pushed to branch typos2 at PulseAudio / pulseaudio


Commits:
823e46fb by Igor V. Kovalenko at 2022-06-13T21:33:29+00:00
build-sys: meson: Make module-console-kit optional

Default build configuration would fail to run on a system without systemd-logind
(or elogind) and without ConsoleKit daemon responding on dbus interface. Here,
module-console-kit would fail to initialize, preventing daemon from starting.

Make module-console-kit an optional build feature to allow opt-out.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/719>

- - - - -
65c46fe4 by Peter Meerwald-Stadler at 2022-06-13T22:33:12+00:00
module-combine-sink: Use fabs() instead of abs() for double

- - - - -
c83d63ce by Peter Meerwald-Stadler at 2022-06-13T22:33:12+00:00
module-combine-sink: Fix indentation

- - - - -
a007fade by Peter Meerwald-Stadler at 2022-06-13T22:33:12+00:00
module-tunnel: Fix typos

- - - - -
1dc4d447 by Peter Meerwald-Stadler at 2022-06-13T22:33:12+00:00
volume: Fix typo

- - - - -
d459473d by Peter Meerwald-Stadler at 2022-06-13T22:33:12+00:00
raop-client: Fix typo

- - - - -


7 changed files:

- meson.build
- meson_options.txt
- src/modules/meson.build
- src/modules/module-combine-sink.c
- src/modules/module-tunnel.c
- src/modules/raop/raop-client.c
- src/pulse/volume.h


Changes:

=====================================
meson.build
=====================================
@@ -732,6 +732,10 @@ if get_option('daemon')
     cdata.set('HAVE_SYSTEMD_LOGIN', 1)
   endif
 
+  if get_option('consolekit').enabled()
+    assert(dbus_dep.found(), 'ConsoleKit requires D-Bus support')
+  endif
+
   tcpwrap_dep = cc.find_library('wrap', required: get_option('tcpwrap'))
   if cc.has_header('tcpd.h') and cc.has_function('hosts_access', dependencies : tcpwrap_dep)
     cdata.set('HAVE_LIBWRAP', 1)
@@ -1001,6 +1005,7 @@ summary += [
   '  Enable HAL->udev compat:     @0@'.format(get_option('hal-compat')),
   'Enable systemd units:          @0@'.format(systemd_dep.found()),
   'Enable elogind:                @0@'.format(libelogind_dep.found()),
+  'Enable ConsoleKit:             @0@'.format(not get_option('consolekit').disabled() and dbus_dep.found()),
   'Enable TCP Wrappers:           @0@'.format(tcpwrap_dep.found()),
   'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
   'Database:                      @0@'.format(get_option('database')),


=====================================
meson_options.txt
=====================================
@@ -99,6 +99,9 @@ option('bluez5-native-headset',
 option('bluez5-ofono-headset',
        type : 'boolean',
        description : 'Optional oFono headset backend support (BlueZ 5)')
+option('consolekit',
+       type : 'feature', value : 'auto',
+       description : 'Optional ConsoleKit support')
 option('dbus',
        type : 'feature', value : 'auto',
        description : 'Optional D-Bus support')


=====================================
src/modules/meson.build
=====================================
@@ -130,7 +130,6 @@ endif
 
 if dbus_dep.found()
   all_modules += [
-    [ 'module-console-kit', 'module-console-kit.c', [], [], [dbus_dep] ],
     [ 'module-dbus-protocol',
       [ 'dbus/iface-card.c', 'dbus/iface-card.h',
 	'dbus/iface-card-profile.c', 'dbus/iface-card-profile.h',
@@ -147,6 +146,12 @@ if dbus_dep.found()
       [], [], [dbus_dep] ],
     [ 'module-rygel-media-server', 'module-rygel-media-server.c', [], [], [dbus_dep], libprotocol_http ],
   ]
+
+  if not get_option('consolekit').disabled()
+    all_modules += [
+      [ 'module-console-kit', 'module-console-kit.c', [], [], [dbus_dep] ],
+    ]
+  endif
 endif
 
 if fftw_dep.found()


=====================================
src/modules/module-combine-sink.c
=====================================
@@ -23,6 +23,7 @@
 
 #include <stdio.h>
 #include <errno.h>
+#include <math.h>
 
 #include <pulse/rtclock.h>
 #include <pulse/timeval.h>
@@ -178,7 +179,7 @@ struct userdata {
 #ifdef USE_SMOOTHER_2
         pa_smoother_2 *smoother;
 #else
-         pa_smoother *smoother;
+        pa_smoother *smoother;
 #endif
         uint64_t counter;
 
@@ -239,7 +240,7 @@ static uint32_t rate_controller(
 
     /* Choose the rate that is nearer to base_rate */
     new_rate = new_rate_2;
-    if (abs(new_rate_1 - base_rate) < abs(new_rate_2 - base_rate))
+    if (fabs(new_rate_1 - base_rate) < fabs(new_rate_2 - base_rate))
         new_rate = new_rate_1;
 
     return (uint32_t)(new_rate + 0.5);


=====================================
src/modules/module-tunnel.c
=====================================
@@ -1000,7 +1000,7 @@ static void stream_get_latency_callback(pa_pdispatch *pd, uint32_t command, uint
     else
         delay -= (int64_t) pa_bytes_to_usec((uint64_t) (read_index-write_index), ss);
 
-    /* Our measurements are already out of date, hence correct by the     *
+    /* Our measurements are already out of date, hence correct by the
      * transport latency */
 #ifdef TUNNEL_SINK
     delay -= (int64_t) u->transport_usec;
@@ -1008,7 +1008,7 @@ static void stream_get_latency_callback(pa_pdispatch *pd, uint32_t command, uint
     delay += (int64_t) u->transport_usec;
 #endif
 
-    /* Now correct by what we have have written since we requested the update. This
+    /* Now correct by what we have written since we requested the update. This
      * is not necessary for the source, because if data is received between request
      * and reply, it was already posted before we requested the source latency. */
 #ifdef TUNNEL_SINK


=====================================
src/modules/raop/raop-client.c
=====================================
@@ -480,7 +480,7 @@ static ssize_t send_udp_audio_packet(pa_raop_client *c, pa_memchunk *block, size
     }
 
     pa_memblock_release(packet->memblock);
-    /* It is meaningless to preseve the partial data */
+    /* It is meaningless to preserve the partial data */
     block->index += block->length;
     block->length = 0;
 


=====================================
src/pulse/volume.h
=====================================
@@ -49,7 +49,7 @@
  * sink input. In fact, it depends on the server configuration. With flat
  * volumes enabled, it means the maximum volume that the sound hardware is
  * capable of, which is usually so high that you absolutely must not set sink
- * input volume to 100% unless the the user explicitly requests that (note that
+ * input volume to 100% unless the user explicitly requests that (note that
  * usually you shouldn't set the volume anyway if the user doesn't explicitly
  * request it, instead, let PulseAudio decide the volume for the sink input).
  * With flat volumes disabled the sink input volume is relative to the sink



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/5cc77cc79db9ff710ab761bef9fae2e14fd546b2...d459473d05046e472db7f7be70430af13b4583e8

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/5cc77cc79db9ff710ab761bef9fae2e14fd546b2...d459473d05046e472db7f7be70430af13b4583e8
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20220613/ceda3e96/attachment-0001.htm>


More information about the pulseaudio-commits mailing list