add audio support, trying to manage MSD device

This commit is contained in:
Artem
2024-11-03 11:44:40 +01:00
parent 68ba48a3a2
commit 1b60f43df1
22 changed files with 1059 additions and 263 deletions

View File

@@ -8,6 +8,7 @@ import (
)
func (h *Hid) OpenNoLock() {
log.Debug("OpenNoLock hid")
var err error
h.CloseNoLock()
@@ -39,6 +40,7 @@ func (h *Hid) Open() {
}
func (h *Hid) CloseNoLock() {
log.Debug("CloseNoLock")
for _, file := range []*os.File{h.g0, h.g1, h.g2} {
if file != nil {
_ = file.Sync()