linux/drivers/media/usb/usbtv
Adam Sampson b3168c87c0 media: usbtv: fix brightness and contrast controls
Because the brightness and contrast controls share a register,
usbtv_s_ctrl needs to read the existing values for both controls before
inserting the new value. However, the code accidentally wrote to the
registers (from an uninitialised stack array), rather than reading them.

The user-visible effect of this was that adjusting the brightness would
also set the contrast to a random value, and vice versa -- so it wasn't
possible to correctly adjust the brightness of usbtv's video output.

Tested with an "EasyDAY" UTV007 device.

Fixes: c53a846c48 ("usbtv: add video controls")

Signed-off-by: Adam Sampson <ats@offog.org>
Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-10-31 07:26:10 -04:00
..
Kconfig [media] usbtv: Make it dependent on ALSA 2014-08-21 15:25:38 -05:00
Makefile [media] usbtv: add audio support 2014-08-21 15:25:34 -05:00
usbtv-audio.c media: usb: make snd_pcm_hardware const 2017-08-20 08:05:10 -04:00
usbtv-core.c media: usb: usbtv: remove duplicate & operation 2017-10-31 07:23:03 -04:00
usbtv-video.c media: usbtv: fix brightness and contrast controls 2017-10-31 07:26:10 -04:00
usbtv.h [media] usbtv: add video controls 2016-11-16 13:06:18 -02:00