Skip to content

[system] audio: let the session user reach Maono mic controls - #37

Open
neur0map wants to merge 1 commit into
mainfrom
fix/maono-hid-uaccess
Open

[system] audio: let the session user reach Maono mic controls#37
neur0map wants to merge 1 commit into
mainfrom
fix/maono-hid-uaccess

Conversation

@neur0map

Copy link
Copy Markdown
Owner

Maono USB mics (PD400X, DM30, and siblings — all vendor 352f) expose their
control features on a vendor-defined HID page rather than the audio interface.
From the PD400X's report descriptor:

05 0c        Usage Page (Consumer)          volume knob / mute button
06 01 ff     Usage Page (Vendor 0xFF01)     the control channel
  85 4b        Report ID 0x4B, 63-byte in / 63-byte out
  85 54        Report ID 0x54, 10-byte in / 10-byte out

Gain, EQ, compressor, limiter and the monitor mix all live behind that page. The
kernel leaves the nodes root-owned, so nothing running as the user can open them:

/dev/hidraw2          crw-------  root root
/dev/bus/usb/003/003  crw-rw-r--  root root   (no write)

Only four controls reach ALSA over standard USB audio — mic gain and mute,
headphone level and mute — and those already work. Everything else is
unreachable, so the mic keeps whatever settings were last written to it from
Windows or the Android app, with no way to change them on Linux.

This ships 70-ryoku-maono.rules, granting the active-session user access via
uaccess with no group setup, matching the pattern 60-ryoku-i2c.rules already
uses for DDC/CI. Scoped to the vendor ID so it covers the range rather than one
model.

Verified on a PD400X with the exact rule this installs:

$ getfacl -p /dev/hidraw2
user::rw-
user:nero:rw-
$ ls -la /dev/bus/usb/003/003
crw-rw-r--+ 1 root root 189, 258

udevadm verify passes.

This does not make any control software work by itself — there is no
open-source Maono control app, and Maono Link is Windows/macOS/Android only.
It removes the permission barrier that blocks every approach (Wine, a VM
passing the device through, or a native tool if one ever appears).

Maono USB mics (PD400X, DM30, ...) put gain, EQ, compressor, limiter and the
monitor mix on a vendor-defined HID page (usage page 0xFF01) rather than the
audio interface. The kernel leaves both /dev/hidraw* and the raw USB node
root-owned, so a control app running as the user cannot open either one and
the mic stays on whatever settings were last written to it elsewhere.

Ship 70-ryoku-maono.rules, granting the active-session user access via uaccess
with no group setup, the same pattern as 60-ryoku-i2c.rules. The four standard
USB-audio controls (mic gain and mute, headphone level and mute) are unaffected;
they already worked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant