| # Copyright (c) 2013 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. |
| |
| SUBSYSTEM!="usb", GOTO="jabra_end" |
| ENV{DEVTYPE}!="usb_device", GOTO="jabra_end" |
| |
| # Jabra Speakerphone 410 |
| ENV{ID_VENDOR_ID}=="0b0e", ENV{ID_MODEL_ID}=="0412", GOTO="jabra_action" |
| # Jabra Speakerphone 510 |
| ENV{ID_VENDOR_ID}=="0b0e", ENV{ID_MODEL_ID}=="0420", GOTO="jabra_action" |
| |
| GOTO="jabra_end" |
| |
| LABEL="jabra_action" |
| |
| # start the jabra_vold daemon |
| ACTION=="add", RUN+="/bin/mkdir -p /run/jabra_vold" |
| ACTION=="add", RUN+="/bin/chown volume:volume /run/jabra_vold" |
| ACTION=="add", RUN+="/sbin/minijail0 -u volume -g volume -G -- /usr/sbin/jabra_vold -a start -n $env{DEVNUM} -b $env{BUSNUM} -p /sys/$env{DEVPATH}" |
| # stop the daemon |
| ACTION=="remove", RUN+="/sbin/minijail0 -u volume -g volume -G -- /usr/sbin/jabra_vold -a stop -n $env{DEVNUM} -b $env{BUSNUM}" |
| |
| LABEL="jabra_end" |