Merge "init.shamu.usb.rc: Add support for USB MIDI function"
diff --git a/init.shamu.usb.rc b/init.shamu.usb.rc
index 7d95d73..dfd0ddb 100644
--- a/init.shamu.usb.rc
+++ b/init.shamu.usb.rc
@@ -230,6 +230,26 @@
     start adbd
     setprop sys.usb.state ${sys.usb.config}
 
+# USB midi configuration
+on property:sys.usb.config=midi
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 18D1
+    write /sys/class/android_usb/android0/idProduct 4EE8
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    start adbd
+    setprop sys.usb.state ${sys.usb.config}
+
+# USB midi configuration, with adb
+on property:sys.usb.config=midi,adb
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 18D1
+    write /sys/class/android_usb/android0/idProduct 4EE9
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    start adbd
+    setprop sys.usb.state ${sys.usb.config}
+
 # QDSS - Qualcomm Debug Subsystem
 on property:sys.usb.config=diag,qdss,adb
     write /sys/class/android_usb/android0/enable 0