Luiz Augusto von Dentz | 22 Aug 16:04 2014
Picon

[PATCH 01/17] bluetooth: Monitor D-Bus signals

From: João Paulo Rechi Vita <jprvita <at> openbossa.org>

---
 src/modules/bluetooth/backend-ofono.c | 49 ++++++++++++++++++++++++++++++++---
 1 file changed, 45 insertions(+), 4 deletions(-)

diff --git a/src/modules/bluetooth/backend-ofono.c b/src/modules/bluetooth/backend-ofono.c
index bf0db47..f5fe472 100644
--- a/src/modules/bluetooth/backend-ofono.c
+++ b/src/modules/bluetooth/backend-ofono.c
 <at>  <at>  -30,6 +30,7  <at>  <at> 

 #define OFONO_SERVICE "org.ofono"
 #define HF_AUDIO_AGENT_INTERFACE OFONO_SERVICE ".HandsfreeAudioAgent"
+#define HF_AUDIO_MANAGER_INTERFACE OFONO_SERVICE ".HandsfreeAudioManager"

 #define HF_AUDIO_AGENT_PATH "/HandsfreeAudioAgent"

 <at>  <at>  -55,8 +56,16  <at>  <at> 
 struct pa_bluetooth_backend {
     pa_core *core;
     pa_dbus_connection *connection;
+    pa_hashmap *cards;
 };

+static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *data) {
+    pa_assert(bus);
+    pa_assert(m);
+
+    return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
(Continue reading)

David Henningsson | 22 Aug 11:51 2014

[PATCH] conf-parser: Add debug print of parsed files

This is useful for debugging.

Signed-off-by: David Henningsson <david.henningsson <at> canonical.com>
---
 src/pulsecore/conf-parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c
index 200252b..1683d46 100644
--- a/src/pulsecore/conf-parser.c
+++ b/src/pulsecore/conf-parser.c
 <at>  <at>  -175,6 +175,7  <at>  <at>  int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_p
         pa_log_warn("Failed to open configuration file '%s': %s", filename, pa_cstrerror(errno));
         goto finish;
     }
+    pa_log_debug("Parsing configuration file '%s'", filename);

     state.filename = filename;
     state.item_table = t;
--

-- 
1.9.1
Luiz Augusto von Dentz | 22 Aug 10:07 2014
Picon

[PATCH v3 1/5] bluetooth: Add basic support for HEADSET profiles

From: João Paulo Rechi Vita <jprvita <at> openbossa.org>

This commit adds basic support for devices implementing HSP Headset
Unit, HSP Audio Gateway, HFP Handsfree Unit, HFP Audio Gateway to the
BlueZ 5 bluetooth audio devices driver module (module-bluez5-device).
---
 src/modules/bluetooth/bluez5-util.c          |   4 +
 src/modules/bluetooth/bluez5-util.h          |   6 +
 src/modules/bluetooth/module-bluez5-device.c | 429 ++++++++++++++++++++-------
 3 files changed, 331 insertions(+), 108 deletions(-)

diff --git a/src/modules/bluetooth/bluez5-util.c b/src/modules/bluetooth/bluez5-util.c
index 5b6b372..adb8351 100644
--- a/src/modules/bluetooth/bluez5-util.c
+++ b/src/modules/bluetooth/bluez5-util.c
 <at>  <at>  -1109,6 +1109,10  <at>  <at>  const char *pa_bluetooth_profile_to_string(pa_bluetooth_profile_t profile) {
             return "a2dp_sink";
         case PA_BLUETOOTH_PROFILE_A2DP_SOURCE:
             return "a2dp_source";
+        case PA_BLUETOOTH_PROFILE_HEADSET_HEAD_UNIT:
+            return "headset_head_unit";
+        case PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY:
+            return "headset_audio_gateway";
         case PA_BLUETOOTH_PROFILE_OFF:
             return "off";
     }
diff --git a/src/modules/bluetooth/bluez5-util.h b/src/modules/bluetooth/bluez5-util.h
index 63bae35..0121733 100644
--- a/src/modules/bluetooth/bluez5-util.h
+++ b/src/modules/bluetooth/bluez5-util.h
(Continue reading)

Dâniel Fraga | 22 Aug 01:03 2014
Picon

Pulseaudio 5.0: delay to finish audio with all apps

	I started using Pulseaudio 5.0 because of Skype demands it, and
now every app that uses Pulseaudio takes a few seconds to finish after 
playing audio.

	Since it happens with any software, it seems to be a bug in
Pulseaudio. What info do you need so I can help to debug it?

	Ps: my .asoundrc:

pcm.card0 {
    type hw
    card 0
}

ctl.card0 {
    type hw
    card 0
}

pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}

pcm.!default {
    type pulse
}
(Continue reading)

Thilo-Alexander Ginkel | 20 Aug 23:26 2014

PulseAudio losing USB headset over suspend / resume

Hello everyone,

I have a Jabra Pro 9465 DECT headset attached to my laptop via USB.
This used to work like a charm with my old laptop (a ThinkPad T420s
running PulseAudio 1.1 and 4.0).

Recently, I switched to a T440p and am having problems with the
headset's microphone disappearing from PulseAudio over a
suspend/resume cycle ever since. The microphone source is still
visible in ALSA after the resume (e.g., through alsamixer).

I found out the following factors, which contribute to the problem occurring:
- SMP: When I limit the CPU to one core and one thread the problem disappears
- USB 3.0: When I force the USB ports to USB 2.0 the problem disappears

The problem occurs with PA 4.0 and 5.0 running on Kubuntu 14.04
(x86_64, kernel 3.17-rc1).

Any ideas how to continue debugging this?

I captured the `pulseaudio -vvvvv` output for both scenarios (using PA 5.0):
- Failure (source lost):
https://secure.tgbyte.de/dropbox/YtuIpmg4k0Ha3P25-failure.log
- Sucess (source survived S3):
https://secure.tgbyte.de/dropbox/YtuIpmg4k0Ha3P25-success.log

Thanks,
Thilo
DIEHCO R&D | 20 Aug 14:51 2014

How to launch pulseaudio on embedded system

Hello, I hope it is good place for my request. I am looking for some tips to configure the pulseaudio server on an embedded system. The program is in the system, but I have difficult to lauch it correctly.

After setting DBUS_SESSION_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket and DBUS_SESSION_BUS_PID=`cat /var/run/dbus/pid`
I met the error Failed to acquire org.PulseAudio1: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.19" is not allowed to own the service "org.PulseAudio1" due to security policies in the configuration file.
Find attached the complete log.

The file /etc/dbus-1/system.d/pulseaudio-system.conf has <allow own="org.pulseaudio.Server"/>. I tried to modify without success.

Thank you for reading. Regards,
-- Vincent Vanbesien
  172 messageb  2620 S    /usr/bin/dbus-daemon --system
  177 root      2424 S    /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22
  182 root      3340 S    /sbin/syslogd -n -O /var/log/messages
  184 root      3340 S    /sbin/klogd -n
  187 root      2216 S    /usr/sbin/crond
  209 root      6828 S    /home/root/bin/wd
  211 root      6856 S    /home/root/bin/plannification
  216 root      3344 S    /sbin/getty 115200 ttymxc0
  217 root      3344 S    /sbin/getty 38400 tty1
  218 root      6880 S    controle
  219 root      2844 S    /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22
  220 root      6852 S    attente XXX
  221 root      6864 S    tacheSon
  222 root      6860 S    menu 221
  223 root      6868 S    escargot FRA 0 221
  224 lennart   2964 S    -sh
  392 root      2844 S    /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22
  393 root      3008 S    -sh
  992 root         0 SW   [kworker/0:2]
 1023 root         0 SW   [kworker/0:1]
 1084 root      2844 S    /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22
 1085 lennart   2964 S    -sh
 1089 root         0 SW   [kworker/0:0]
 1156 root         0 SW   [flush-ubifs_0_0]
 1190 lennart   3520 R    ps
eukrea-cpuimx25:~$ export DBUS_SESSION_BUS_ADDRESS=unix:path=/var/run/dbus/system_bus_socket
eukrea-cpuimx25:~$ export DBUS_SESSION_BUS_PID=`cat /var/run/dbus/pid`
eukrea-cpuimx25:~$ pulseaudio -vvvv &
[1] 1192
eukrea-cpuimx25:~$ I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
D: [pulseaudio] core-rtclock.c: Timer slack is set to 50 us.
I: [pulseaudio] core-util.c: Failed to acquire high-priority scheduling: No such file or directory
I: [pulseaudio] main.c: This is PulseAudio 3.0-dirty
D: [pulseaudio] main.c: Compilation host: arm-oe-linux-gnueabi
D: [pulseaudio] main.c: Compilation CFLAGS: -O2 -pipe -g -feliminate-unused-debug-types -Wall -W
-Wextra -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2
-Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral
-Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes
-Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels
-Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math
-Wp,-D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
D: [pulseaudio] main.c: Running on host: Linux armv5tejl 2.6.37.6 #18 PREEMPT Fri Mar 1 03:08:50 PST 2013
D: [pulseaudio] main.c: Found 1 CPUs.
I: [pulseaudio] main.c: Page size is 4096 bytes
D: [pulseaudio] main.c: Compiled with Valgrind support: no
D: [pulseaudio] main.c: Running in valgrind mode: no
D: [pulseaudio] main.c: Running in VM: no
D: [pulseaudio] main.c: Optimized build: yes
D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.
I: [pulseaudio] main.c: Machine ID is 2f33fe147f1a9d0285a2138053f317ec.
I: [pulseaudio] main.c: Using runtime directory /home/lennart/.config/pulse/2f33fe147f1a9d0285a2138053f317ec-runtime.
I: [pulseaudio] main.c: Using state directory /home/lennart/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-3.0/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!
D: [pulseaudio] memblock.c: Using shared memory pool with 1024 slots of size 64.0 KiB each, total size is
64.0 MiB, maximum usable slot size is 65496
I: [pulseaudio] cpu-arm.c: CPU flags: EDSP 
I: [pulseaudio] module-device-restore.c: Successfully opened database file '/home/lennart/.config/pulse/2f33fe147f1a9d0285a2138053f317ec-device-volumes'.
I: [pulseaudio] module.c: Loaded "module-device-restore" (index: #0; argument: "").
I: [pulseaudio] module-stream-restore.c: Successfully opened database file '/home/lennart/.config/pulse/2f33fe147f1a9d0285a2138053f317ec-stream-volumes'.
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Ext.StreamRestore1 added for object /org/pulseaudio/stream_restore1
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: #1; argument: "").
I: [pulseaudio] module-card-restore.c: Successfully opened database file '/home/lennart/.config/pulse/2f33fe147f1a9d0285a2138053f317ec-card-database'.
I: [pulseaudio] module.c: Loaded "module-card-restore" (index: #2; argument: "").
I: [pulseaudio] module.c: Loaded "module-augment-properties" (index: #3; argument: "").
D: [pulseaudio] cli-command.c: Checking for existence of
'/usr/lib/pulse-3.0/modules/module-udev-detect.so': success
I: [pulseaudio] module-udev-detect.c: Found 0 cards.
I: [pulseaudio] module.c: Loaded "module-udev-detect" (index: #4; argument: "").
D: [pulseaudio] cli-command.c: Checking for existence of
'/usr/lib/pulse-3.0/modules/module-jackdbus-detect.so': failure
D: [pulseaudio] cli-command.c: Checking for existence of
'/usr/lib/pulse-3.0/modules/module-bluetooth-policy.so': failure
D: [pulseaudio] cli-command.c: Checking for existence of
'/usr/lib/pulse-3.0/modules/module-bluetooth-discover.so': failure
D: [pulseaudio] cli-command.c: Checking for existence of
'/usr/lib/pulse-3.0/modules/module-esound-protocol-unix.so': failure
I: [pulseaudio] module.c: Loaded "module-native-protocol-unix" (index: #5; argument: "").
D: [pulseaudio] cli-command.c: Checking for existence of
'/usr/lib/pulse-3.0/modules/module-gconf.so': failure
I: [pulseaudio] module-default-device-restore.c: Saved default sink 'auto_null' not existent, not
restoring default sink setting.
I: [pulseaudio] module-default-device-restore.c: Saved default source 'auto_null.monitor' not
existent, not restoring default source setting.
I: [pulseaudio] module.c: Loaded "module-default-device-restore" (index: #6; argument: "").
I: [pulseaudio] module.c: Loaded "module-rescue-streams" (index: #7; argument: "").
D: [pulseaudio] module-always-sink.c: Autoloading null-sink as no other sinks detected.
I: [pulseaudio] sink.c: Created sink 0 "auto_null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c:     device.description = "Dummy Output"
I: [pulseaudio] sink.c:     device.class = "abstract"
I: [pulseaudio] sink.c:     device.icon_name = "audio-card"
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
I: [pulseaudio] source.c: Created source 0 "auto_null.monitor" with sample spec s16le 2ch 44100Hz and
channel map front-left,front-right
I: [pulseaudio] source.c:     device.description = "Monitor of Dummy Output"
I: [pulseaudio] source.c:     device.class = "monitor"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone"
D: [null-sink] module-null-sink.c: Thread starting up
D: [pulseaudio] module-device-restore.c: Could not set format on sink auto_null
I: [pulseaudio] module.c: Loaded "module-null-sink" (index: #8; argument: "sink_name=auto_null
sink_properties='device.description="Dummy Output"'").
I: [pulseaudio] module.c: Loaded "module-always-sink" (index: #9; argument: "").
I: [pulseaudio] module.c: Loaded "module-intended-roles" (index: #10; argument: "").
D: [pulseaudio] module-suspend-on-idle.c: Sink auto_null becomes idle, timeout in 5 seconds.
I: [pulseaudio] module.c: Loaded "module-suspend-on-idle" (index: #11; argument: "").
D: [pulseaudio] cli-command.c: Checking for existence of
'/usr/lib/pulse-3.0/modules/module-console-kit.so': success
D: [pulseaudio] dbus-util.c: Successfully connected to D-Bus system bus
fa69b03ab803943677e5d13c53f477b8 as :1.17
I: [pulseaudio] module.c: Loaded "module-console-kit" (index: #12; argument: "").
D: [pulseaudio] cli-command.c: Checking for existence of
'/usr/lib/pulse-3.0/modules/module-systemd-login.so': failure
I: [pulseaudio] module.c: Loaded "module-position-event-sounds" (index: #13; argument: "").
D: [pulseaudio] module-role-cork.c: Using role 'phone' as trigger role.
D: [pulseaudio] module-role-cork.c: Using roles 'music' and 'video' as cork roles.
I: [pulseaudio] module.c: Loaded "module-role-cork" (index: #14; argument: "").
I: [pulseaudio] module.c: Loaded "module-filter-heuristics" (index: #15; argument: "").
I: [pulseaudio] module.c: Loaded "module-filter-apply" (index: #16; argument: "").
D: [pulseaudio] cli-command.c: Checking for existence of
'/usr/lib/pulse-3.0/modules/module-dbus-protocol.so': failure
I: [pulseaudio] module.c: Loaded "module-switch-on-port-available" (index: #17; argument: "").
D: [pulseaudio] dbus-util.c: Successfully connected to D-Bus session bus
fa69b03ab803943677e5d13c53f477b8 as :1.19
E: [pulseaudio] main.c: Failed to acquire org.PulseAudio1:
org.freedesktop.DBus.Error.AccessDenied: Connection ":1.19" is not allowed to own the service
"org.PulseAudio1" due to security policies in the configuration file
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Hugo Osvaldo Barrera | 20 Aug 14:37 2014

Setting the volume via API has no effect

Hi,

First of all, sorry for the rather long and verbose email, but I'd like to be
as specific as possible.

I'm trying to write my own volume control application, and first of all,
started fiddling with the pulseaudio api (with a threaded main loop).

I've gotten the sinks, the volume, etc, but when I _set_ a volume, it has no
effect. The API reports success, but pavucontrol reveals that it has not
changes (also, if I set it to 0%, I can still hear stuff like vlc, etc).

The code is a bit long, but pretty clear. Build with:

  clang -Wall pulse.c -o pulse `pkg-config --cflags --libs libpulse-simple`

Here's the code in question:

#include <stdio.h>
#include <pulse/introspect.h>
#include <pulse/context.h>
#include <pulse/thread-mainloop.h>
#include <pulse/error.h>
#include <unistd.h>
#include <stdlib.h>

int sink_count = 0;
// FIXME: list that can handle more than 5
pa_sink_info sinks[5];

void vol_success(pa_context *c, int success, void *userdata) {
    int i = *(int*) userdata;
    printf("Card %d, success: %d.\n", i, success);
    free(userdata);
}

void sinks_callback(pa_context *c, const pa_sink_info *i, int eol, void *userdata) {
  if (!eol) {
      printf("Got sink %d (mute: %d, vol: %.2fdB): %s - %s.\n", i->index, i->mute,
             pa_sw_volume_to_dB(i->volume.values[0]), i->description, i->name);
      sinks[sink_count++] = *i;
  }
  else {
      printf("Got all the sinks! :D\n\n");
      pa_volume_t volume = PA_VOLUME_NORM;

      for (int i = 0; i < sink_count; i++) {
          // Copy this value because we might alter it before the other thread consumes it.
          int *idx = malloc(sizeof(int)); *idx = i;
          pa_cvolume vols = sinks[i].volume;
          pa_cvolume_set(&vols, vols.channels, volume);

          printf("Volume being set to %d (%.2fdB) on card %d (%d channels), (was %.2fdB)\n",
                 volume, pa_sw_volume_to_dB(volume), *idx, vols.channels,
                 pa_sw_volume_to_dB(sinks[i].volume.values[0]));

          pa_operation* o = pa_context_set_sink_input_volume(c, *idx, &vols, vol_success, idx);
          if (!o) {
              printf("\nError setting volume for sink: %s\n", pa_strerror(pa_context_errno(c)));
              exit(-15);
          }
          pa_operation_unref(o);
      }
  }
}

void context_state_callback(pa_context* c, void* userdata) {
    pa_operation* o;
    switch (pa_context_get_state(c)) {
        case PA_CONTEXT_UNCONNECTED:
        case PA_CONTEXT_CONNECTING:
        case PA_CONTEXT_AUTHORIZING:
        case PA_CONTEXT_SETTING_NAME:
            printf(". "); fflush(NULL);
            break;
        case PA_CONTEXT_READY:
            printf("SUCCESS!\n\n");
            o = pa_context_get_sink_info_list(c, sinks_callback, NULL);
            if (!o) {
                printf("Error getting sinks: %s\n", pa_strerror(pa_context_errno(c)));
                exit(-13);
            }
            pa_operation_unref(o);
            break;
        case PA_CONTEXT_FAILED:
            printf("The connection failed or was disconnected.\n");
            exit(-11);
        case PA_CONTEXT_TERMINATED:
            printf("The connection was terminated cleanly.\n");
            exit(-12);
        default:
            printf("Unexpected context state.\n");
    }
}

int main(void) {
    // create loop
    pa_threaded_mainloop* loop = pa_threaded_mainloop_new();
    if (!loop) {
        printf("Failed to create main loop.\n");
        exit(-1);
    }

    // start loop
    if (pa_threaded_mainloop_start(loop)) {
        printf("Failed to start main loop.\n");
        exit(-2);
    }

    // get the api
    pa_mainloop_api* api = pa_threaded_mainloop_get_api(loop);
    if (!api) {
        printf("Failed to get api.\n");
        exit(-3);
    }

    // get a context
    pa_context *c = pa_context_new(api, "volctl3");
    if (!c) {
        printf("Failed to get context.\n");
        exit(-4);
    }

    // set a callback for context state changes
    pa_context_set_state_callback(c, context_state_callback, NULL);

    pa_threaded_mainloop_lock(loop);

    // connect
    printf("About to connect: ");
    if (pa_context_connect(c, NULL, PA_CONTEXT_NOFLAGS, NULL)) {
        printf("FAILED!\n");
        exit(-5);
    }

    pa_threaded_mainloop_unlock(loop);

    // Sleep to keep the thread alive. Note that an actuall app would do stuff
    // here.
    sleep(15);

    return 0;
}

// END OF CODE

Am I going something wrong, or have I hit a bug?

Thanks,

--

-- 
Hugo Osvaldo Barrera
A: Because we read from top to bottom, left to right.
Q: Why should I start my reply below the quoted text?
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss <at> lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Buddy Butterfly | 20 Aug 13:23 2014
Picon

set-card-profile not working for usb sound card


Hi,

I am trying to set a card profile in /etc/pulse/default.pa
(ubuntu trusty) with the followin line:

set-card-profile 0 output:analog-mono+input:analog-mono

Error message in syslog is:

Failed to set card profile to 'output:analog-mono+input:analog-mono'.
Failed to initialize daemon.
Daemon startup failed.

Though, pulse is running and the profile has been set with pavucontrol.
So it comes up with the correct profile.

If using the name instead of the index, the error message is that the
name can not be found.

Listing the cards gives indeed that this card is card 0.

What is wrong?
Tanu Kaskinen | 20 Aug 12:26 2014
Picon

Re: --check option seems not to work from su(1) as daemon user

(added pulseaudio-discuss back to CC)

On Tue, 2014-08-19 at 16:26 -0600, Glenn Golden wrote:
> Tanu Kaskinen <tanu.kaskinen <at> linux.intel.com> [2014-08-19 23:21:58 +0300]:
> > On Tue, 2014-08-19 at 13:44 -0600, Glenn Golden wrote:
> > >     $ pulseaudio -v --check
> > >     I: [pulseaudio] main.c: Daemon not running
> > > 
> > > 
> > > Why?
> > 
> > Probably because $XDG_RUNTIME_DIR points to the other user's directory.
> > The --check option uses $XDG_RUNTIME_DIR to figure out where to look for
> > the pid file.
> > 
> 
> Thanks Tanu, and also for your quick response, much appreciated.  Figured it
> was something like that.
> 
> Permit me to grouse momentarily though about the man page text, which says:
> 
>     --check
> 	Return 0 as return code when the PulseAudio daemon is already
> 	running for the calling user, or non-zero otherwise
> 
> This is completely misleading: The test that is performed by the --check
> option evidently has _nothing whatsoever_ to do with the "calling user",
> it is determined entirely by the XDG_RUNTIME_DIR envar, regardless of the
> user who executed the "pulaseaudio --check" command.  The blurb should simply
> state that the check is performed based on the user whose runtime pid dir
> is pointed to by XDG_RUNTIME_DIR, and then it will be entirely accurate and
> complete.

I'd rather say that the check is performed with the assumption that
XDG_RUNTIME_DIR is set correctly for the calling user. The check is
non-functional if XDG_RUNTIME_DIR points to the wrong directory, because
the answer will always be "not running", because most likely pulseaudio
won't have access to the directory that XDG_RUNTIME_DIR points to.

Also, if you're going to mention XDG_RUNTIME_DIR in the documentation,
you should probably also mention that if XDG_RUNTIME_DIR isn't set at
all, then the check assumes that HOME[1] is set correctly.

[1] or whatever is used on the platform, on Windows it was some other
environment variable

> As phrased, it's just asking for confusion.  I doubt I'd be able to find any
> experienced Unix/Linux user who would read the phrase "the calling user" in
> the given context and not interpret it to mean the UID or EUID of the user
> who executed the "pulseaudio --check" command.

I agree.

--

-- 
Tanu
Dmitry Pavlov | 19 Aug 19:12 2014
Picon

is it possible to ignore a module load failure?

Hello,

I have the following line in my default.pa:

load-module module-alsa-sink device=bt sink_name=alsa_bt

Sometimes (when the corresponding physical device is turned off)
pulseaudio refuses to start, saying

E: [pulseaudio] module.c: Failed to load module "module-alsa-sink"
(argument: "device=bt sink_name=alsa_bt"): initialization failed.
E: [pulseaudio] main.c: Module load failed.
E: [pulseaudio] main.c: Failed to initialize daemon.

While the error is not surprising, I would like Pulseaudio
to go on starting and working, just with this particular sink disabled,
and other sink(s) enabled. Is it possible?

Best regards,

Dmitry
Glenn Golden | 19 Aug 21:44 2014

--check option seems not to work from su(1) as daemon user

Not sure if this is a bug or braindamage on my part. In view of the doc
for the "--check" option, I was surprised at the following:

As ordinary user 'gdg' (under which PA daemon is running):

    $ id
    uid=501(gdg) gid=501(gdg) groups=501(gdg),19(log),92(audio), \
	190(systemd-journal)

    $ pulseaudio -v --check
    I: [pulseaudio] main.c: Daemon running as PID 23204

But as root, do "su - gdg", then 

    $ id
    uid=501(gdg) gid=501(gdg) groups=501(gdg),19(log),92(audio), \
	190(systemd-journal)

    $ pulseaudio -v --check
    I: [pulseaudio] main.c: Daemon not running

Why?

Gmane