Reapply 97758de2adf4eb8c861b66826e890e5c3479e071.
Original description:
Create a pulseaudio upstart job that starts pulseaudio on entrance
into runlevel 2. Also, setup some default client configurations.
Specifically:
1) Disable autospawning by clients. upstart should
spawn the only job.
2) Put the runtime dir in /var/run/pulse instead of
${HOME}/.pulse to work around HOME being reset
during window manager login.
3) Put the state directory in /home/chronos/.pulse
explicitly for the same reason.
4) Add a basic script for first-run volume configuration.
Review URL: http://codereview.chromium.org/661389
TBR=albertb
Review URL: http://codereview.chromium.org/672002
diff --git a/pulse/client-cros.conf b/pulse/client-cros.conf
new file mode 100644
index 0000000..b7481e8
--- /dev/null
+++ b/pulse/client-cros.conf
@@ -0,0 +1,9 @@
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Based on the default /etc/pulse/client.conf in the PulseAudio distribution.
+
+autospawn = no
+extra-arguments = --log-target=syslog
+cookie-file = /home/chronos/.pulse-cookie
diff --git a/pulse/firstrun.pa b/pulse/firstrun.pa
new file mode 100644
index 0000000..8d330f0
--- /dev/null
+++ b/pulse/firstrun.pa
@@ -0,0 +1,16 @@
+#!/usr/bin/pulseaudio -nF
+
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# A PulseAudio script that sets the initial volume of the first sink to 70%
+# of PA_NORM (generally 70% of max volume).
+#
+# TODO(ajwong): There should be one file per board that configures all
+# devices, not just the first.
+
+.nofail
+
+set-sink-mute 0 false
+set-sink-volume 0 45876