aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md40
1 files changed, 38 insertions, 2 deletions
diff --git a/README.md b/README.md
index 7efbbbb..629b95b 100644
--- a/README.md
+++ b/README.md
@@ -23,6 +23,10 @@ module development headers on the system. On other distributions the source
files of this repository should be copied into the pulseaudio source tree
and pulseaudio's build system should be adjusted accordingly.
+On AGL, pulseaudio is enabled by the 'agl-pulseaudio' feature, which is also
+included by default in the 'agl-demo' feature. If you wish to disable it
+explicitly on the demo, you can use the 'agl-demo-nopulseaudio' feature instead.
+
## Operation
* module-4a-client initially calls ahl-4a/get_roles to retrieve the available
@@ -79,6 +83,25 @@ clients that do not specify 'media.role'. Defaults to 'multimedia'
## Testing
+### With PulseAudio started by systemd
+
+On AGL, if PulseAudio is enabled on the image (enabled by default), it will be
+started automatically by systemd. PulseAudio uses the socket activation feature
+of systemd, so it will only be loaded on demand if a client tries to connect to
+it.
+
+If you want to trigger manual activation, you can do so using systemctl:
+```
+# systemctl --user start pulseaudio
+```
+
+Note: on the demo environment, some pulseaudio tools like 'pacmd' may
+not trigger socket activation because they are running as root, which is
+prohibited by pulseaudio. In order to use them, start pulseaudio manually first,
+or start a client.
+
+### Starting PulseAudio manually
+
Save this example configuration in a file called config.pa:
```
#!/usr/bin/pulseaudio -nF
@@ -103,14 +126,27 @@ Start pulseaudio with the above example config:
...
```
-In another terminal:
+### Running a PulseAudio client
+
+Here is a simple gstreamer-based client you can run for testing on a terminal:
```
-# gst-launch-1.0 audiotestsrc ! pulsesink stream-properties="p,media.role=(string)emergency"
+# gst-launch-1.0 audiotestsrc ! pulsesink stream-properties="props,media.role=(string)emergency"
```
You can substitute "emergency" with any other available role, or just omit the
whole stream-properties=... part to get assigned the default role ("multimedia")
+In your own application, in C, you can assign the role by setting this
+property on the pulsesink GStreamer element like this:
+
+```
+GstElement *pulsesink = ...;
+GstStructure *s = gst_structure_new ("props",
+ "media.role", G_TYPE_STRING, "emergency", NULL);
+g_object_set (pulsesink, "stream-properties", s, NULL);
+gst_structure_unref (s);
+```
+
## Missing functionality
The following functionality still needs to be implemented: