20 Jan
2024
20 Jan
'24
5:57 a.m.
Volumes should be standard volume controls with TLV information rather than enumerations. I see that you can't just use a standard volume control here since there's an invalid value that needs to be skipped over, and it doesn't help that there's no ordering to the values either. I think the best thing would probably be to open code a custom volume control - this feels weird enough that it's probably not worrying about trying for reuse. Just have put and get functions that map 0..6 into the register values for the volumes in ascending order, then you can have a control that looks normal to userspace.
I'll try your mentioned method in a new version of the same patch.