Skip to contentSkip to conversation

v4l2-ctrls: negative integer control values broken

DISCUSSION Frank Schäfer 2 participants 2 messages Jul 25, 2014 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

Hans,

sorry for bothering you with another issue on friday evening. :-/ But it seems that commit 958c7c7e65 ("[media] v4l2-ctrls: fix corner case in round-to-range code") introduced a regression for controls which are using a negative integer value range.
All negative values are mapped to the maximum (positive) value (check em28xx brightness, red and blue balance bridge controls for example). Reverting this commit makes them working again.
At a first glance I can't find a mistake...

Have a nice weekend,
Frank

#1 lore raw
Quoted 10 lines · Frank Schäfer

Hans,

sorry for bothering you with another issue on friday evening. :-/ But it seems that commit 958c7c7e65 ("[media] v4l2-ctrls: fix corner case in round-to-range code") introduced a regression for controls which are using a negative integer value range.
All negative values are mapped to the maximum (positive) value (check em28xx brightness, red and blue balance bridge controls for example). Reverting this commit makes them working again.
At a first glance I can't find a mistake...

I'll take a look at this this weekend. Thanks for reporting this!

Hans