android_kernel_xiaomi_sm8350/drivers/media/video/bt8xx
Trent Piepho 333408f215 V4L/DVB (5808): Bttv: fix v4l1 breaking the driver
If one uses a V4L *one* application, such as vlc or mplayer's v4l driver, as
the first user after the driver is loaded, the driver wedges itself and will
never capture properly.  Even if one uses a V4L2 application later, it still
won't work.

If one uses a V4L *two* application first, such as tvtime or mplayer's v4l2
driver, then the driver will be ok.  One can then run a V4L1 application, and
it will work.

It turns out the problem is with norm changing and the crop support that was
added in 2.6.21.  The driver defaults to PAL, and keeps the last norm it was
set too across opens.  If one changes the norm via V4L1, the cropping
parameters are not reset like they should be, and they'll remain broken across
device opens.

This patch removes the direct setting of btv->tvnorm in the V4L1 ioctl
VIDIOCSCHAN handler.  The norm is set via the existing call to set_input(),
which calls set_tvnorm(), which will reset the cropping values now that it is
able to detect the norm change.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-03 15:11:14 -03:00
..
bt832.c V4L/DVB (3577): Cleanup audio input handling 2006-03-24 16:26:56 -03:00
bt832.h
bt848.h
bttv-cards.c V4L/DVB (5497): Additional card support for bttv driver 2007-04-27 15:45:25 -03:00
bttv-driver.c V4L/DVB (5808): Bttv: fix v4l1 breaking the driver 2007-07-03 15:11:14 -03:00
bttv-gpio.c V4L/DVB (5278): Bt8xx/: possible cleanups 2007-04-27 15:43:20 -03:00
bttv-i2c.c V4L/DVB (5479): Use ARRAY_SIZE instead of a magic number 2007-04-27 15:45:12 -03:00
bttv-if.c V4L/DVB (5278): Bt8xx/: possible cleanups 2007-04-27 15:43:20 -03:00
bttv-input.c V4L/DVB (5025): Cleanup: switch to using msecs_to_jiffies() on bttv 2007-02-21 13:34:18 -02:00
bttv-risc.c V4L/DVB (5077): Bttv cropping support 2007-02-21 13:34:36 -02:00
bttv-vbi.c V4L/DVB (5156): Fix: dma free is being called with wrong arguments 2007-02-21 13:35:08 -02:00
bttv.h V4L/DVB (5497): Additional card support for bttv driver 2007-04-27 15:45:25 -03:00
bttvp.h V4L/DVB (5482): Bttv: automatically load dvb-bt8xx for bttv cards with dvb 2007-04-27 15:45:14 -03:00
Kconfig V4L/DVB (4518): Allow manually selecting the proper helper drivers 2006-09-26 12:30:33 -03:00
Makefile V4L/DVB (3731): Kbuild: drivers/media/video/bt8xx: remove $(src) from include path 2006-05-12 19:54:40 -03:00