# Copyright (c) 2012 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. # Installed by ADHD package. # cras upstart job. 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 env CRAS_PLUGIN_DIR=/run/cras/vms/plugin env CRAS_ARGS= start on starting system-services stop on stopping system-services respawn # Allow the audio server real time priority. 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}" for socket_dir in playback unified; do mkdir -p -m 1770 "${CRAS_PLUGIN_DIR}/${socket_dir}" chown -R cras:cras "${CRAS_PLUGIN_DIR}/${socket_dir}" done mkdir -m 0755 -p /var/lib/cras chown -R cras:cras /var/lib/cras end script exec /bin/sh /usr/share/cros/init/cras.sh # sound_card_init uses CRAS stop timestamp as a criterion to skip boot time # calibration for DSM. post-stop script echo "$(date +---%\nsecs:\ %s%\nnanos:\ %N)" > /var/lib/cras/stop end script