On Wed, Dec 17, 2025 at 04:31:37PM +0200, Péter Ujfalusi wrote:
On 17/12/2025 15:42, Charles Keepax wrote:
On Wed, Dec 17, 2025 at 03:13:45PM +0200, Péter Ujfalusi wrote:
On 17/12/2025 14:47, Charles Keepax wrote:
On Wed, Dec 17, 2025 at 02:06:23PM +0200, Peter Ujfalusi wrote:
you drop the sign bit giving you:
0x6 -> -2dB 0x7 -> -1dB 0x0 -> 0dB 0x1 -> 1dB 0x2 -> 2dB
I must say, wow. Being a SW guy I would probably done this differently: 0x0 -> -2dB 0x1 -> -1dB 0x2 -> 0dB 0x3 -> 1dB 0x4 -> 2dB
Yes that is exactly what I would have done too :-) but then that is probably why we arn't hardware guys, would make life too easy for the software guys.
This then results in an SX control with a minimum of 0x6 and a mask of 0x7.
then the comment at info() is hard to match still.
Yeah I think the wording "min is the minimum register value" is perhaps slightly misleading. It is the register value that equates to the lowest volume, but that isn't necessarily the minimum value that can be written into the register.
If I can find a spare minute I will ping up a patch to tweak that.
static const DECLARE_TLV_DB_RANGE(sx_thing, 6, 7, TLV_DB_SCALE_ITEM(-2000, -1000, 0), 0, 2, TLV_DB_SCALE_ITEM(0, 1000, 0) };
is sort of the same, no?
Similar but some issues, I think it would let you write values that arn't valid. The control would be fairly confusing to a manual user, as the values are not strictly increasing. And I would imagine it blows up most user-space stuff, which likely also assumes all values are valid and strictly increasing.
Thanks for the explanation, fascinating!
No problem, I would be a rich man if I had a pound for each minute I have spent chasing SX control gremlins.
Thanks, Charles