summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorpaulhsia <paulhsia@chromium.org>2020-04-27 17:38:17 +0800
committerCommit Bot <commit-bot@chromium.org>2020-04-29 00:12:31 +0000
commit1c9c78845f713c3544a0500b1fccba6f9367de34 (patch)
tree2900b439e84d8d1eb9029f30983f0eda55b64324 /init
parent420931b950146ab05a1a919a5e1e61c8a3cff795 (diff)
downloadadhd-1c9c78845f713c3544a0500b1fccba6f9367de34.tar.gz
CRAS: Add sockets under /run/cras/vms for VMs
Add two new sockets under /run/cras/vms for VMs: - `.cras_socket` with only playback support (connection_type 3). - `.cras_unified` with both playback and capture support (connection_type 4). Update cras_test_client --connection_type description and use the test client to test the new sockets. BUG=b:155048379 TEST=`cras_test_client --connection_type 3 -P /dev/zeros` TEST=`cras_test_client --connection_type 3 -C /dev/null` fails TEST=`cras_test_client --connection_type 4 -P /dev/zeros` TEST=`cras_test_client --connection_type 4 -C /dev/null` Change-Id: I39b5573c45850cadb5a40606f51e822ba259b596 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/2167812 Tested-by: Chih-Yang Hsia <paulhsia@chromium.org> Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
Diffstat (limited to 'init')
-rw-r--r--init/cras.conf3
1 files changed, 3 insertions, 0 deletions
diff --git a/init/cras.conf b/init/cras.conf
index e7df7991..c61d7894 100644
--- a/init/cras.conf
+++ b/init/cras.conf
@@ -9,6 +9,7 @@ description "Chrome OS audio server"
author "chromium-os-dev@chromium.org"
env CRAS_SOCKET_DIR=/run/cras
+env CRAS_VMS_SOCKET_DIR=/run/cras/vms
start on starting system-services
stop on stopping system-services
@@ -20,6 +21,8 @@ limit rtprio 12 12
pre-start script
mkdir -p -m 1770 "${CRAS_SOCKET_DIR}"
chown -R cras:cras "${CRAS_SOCKET_DIR}"
+ mkdir -p -m 1770 "${CRAS_VMS_SOCKET_DIR}"
+ chown -R cras:cras "${CRAS_VMS_SOCKET_DIR}"
end script
exec /bin/sh /usr/share/cros/init/cras.sh