summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2018-11-26 15:21:39 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2018-11-26 16:05:29 +0200
commite7e5d6c3558e8704f257c964eca1e149fe093eb6 (patch)
tree701da88e770978a776a7ef6e5c6475a15de300be
parentc7c112ea5812669814c7e0d463cfe680978cae48 (diff)
Change-Id: I01e21bed1dcb6917c4df91686604800ac5dc2ab9 Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
-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: