summarylogtreecommitdiffstats
path: root/usbgadget-func-uac1.service
diff options
context:
space:
mode:
authorBigfootACA2022-05-19 11:28:06 +0800
committerBigfootACA2022-05-19 11:28:06 +0800
commit2b65dfcccbe6c91e9f5711da09b7f246a06e5c42 (patch)
tree0c11399d7ff7f34a17e0204320e7f43d31469453 /usbgadget-func-uac1.service
downloadaur-systemd-gadget.tar.gz
initial commit
Diffstat (limited to 'usbgadget-func-uac1.service')
-rw-r--r--usbgadget-func-uac1.service18
1 files changed, 18 insertions, 0 deletions
diff --git a/usbgadget-func-uac1.service b/usbgadget-func-uac1.service
new file mode 100644
index 000000000000..debcd441ebe2
--- /dev/null
+++ b/usbgadget-func-uac1.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=USB Gadget Audio 1.0
+Before=gadget-start.service
+After=modprobe@usbfunc:uac1.service gadget-init.service
+Wants=modprobe@usbfunc:uac1.service
+Requires=gadget-init.service
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+SyslogIdentifier=gadget-func-uac1
+EnvironmentFile=/etc/default/gadget
+WorkingDirectory=/sys/kernel/config/usb_gadget
+ExecStart=/usr/bin/mkdir ${GADGET}/functions/uac1.0
+ExecStart=/usr/bin/ln -s ${GADGET}/functions/uac1.0 ${GADGET}/configs/a.1/
+ExecStop=/usr/bin/rm ${GADGET}/configs/a.1/uac1.0
+ExecStop=/usr/bin/rmdir ${GADGET}/functions/uac1.0
+[Install]
+WantedBy=usb-gadget.target