linux_old1/drivers/media/common/tuners
Mauro Carvalho Chehab ef88f2b563 V4L/DVB (10527): tuner: fix TUV1236D analog/digital setup
As reported by David Engel <david@istwok.net>, ATSC115 doesn't work
fine with mythtv. This software opens both analog and dvb interfaces of
saa7134.

What happens is that some tuner commands are going to the wrong place,
as shown at the logs:

Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: using tuner params #0 (ntsc)
Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: freq = 67.25 (1076), range = 0, config = 0xce, cb = 0x01
Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: Freq= 67.25 MHz, V_IF=45.75 MHz, Offset=0.00 MHz, div=1808
Feb 12 20:37:48 opus kernel: tuner 1-0061: tv freq set to 67.25
Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: using tuner params #0 (ntsc)
Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: freq = 67.25 (1076), range = 0, config = 0xce, cb = 0x01
Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: Freq= 67.25 MHz, V_IF=45.75 MHz, Offset=0.00 MHz, div=1808
Feb 12 20:37:48 opus kernel: tuner-simple 1-000a: tv 0x07 0x10 0xce 0x01
Feb 12 20:37:48 opus kernel: tuner-simple 1-0061: tv 0x07 0x10 0xce 0x01

This happens due to a hack at TUV1236D analog setup, where it replaces
tuner address, at 0x61 for 0x0a, in order to save a few memory bytes.

The code assumes that nobody else would try to access the tuner during
that setup, but the point is that there's no lock to protect such
access. So, this opens the possibility of race conditions to happen.

Instead of hacking tuner address, this patch uses a temporary var with
the proper tuner value to be used during the setup. This should save
the issue, although we should consider to write some analog/digital
lock at saa7134 driver.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-02-17 09:43:08 -03:00
..
Kconfig V4L/DVB (8534): remove select's of FW_LOADER 2008-07-27 12:24:37 -03:00
Makefile V4L/DVB (8528): add support for MaxLinear MxL5007T silicon tuner 2008-07-27 11:07:18 -03:00
mt20xx.c V4L/DVB (8493): mt20xx: test below 0 on unsigned lo1a and lo2a 2008-07-26 13:18:19 -03:00
mt20xx.h Rename common tuner Kconfig names to use the same 2008-04-29 18:41:38 -03:00
mt2060.c V4L/DVB (8970): mt2060: implement I2C-gate control 2008-10-12 09:37:02 -02:00
mt2060.h Rename common tuner Kconfig names to use the same 2008-04-29 18:41:38 -03:00
mt2060_priv.h V4L/DVB (7769): Move other terrestrial tuners to common/tuners 2008-04-29 18:41:38 -03:00
mt2131.c V4L/DVB (8805): Steven Toth email address change 2008-09-03 18:37:21 -03:00
mt2131.h V4L/DVB (8805): Steven Toth email address change 2008-09-03 18:37:21 -03:00
mt2131_priv.h V4L/DVB (8805): Steven Toth email address change 2008-09-03 18:37:21 -03:00
mt2266.c V4L/DVB (7769): Move other terrestrial tuners to common/tuners 2008-04-29 18:41:38 -03:00
mt2266.h Rename common tuner Kconfig names to use the same 2008-04-29 18:41:38 -03:00
mxl5005s.c V4L/DVB (9638): drivers/media: use ARRAY_SIZE 2008-12-29 17:53:34 -02:00
mxl5005s.h V4L/DVB (8805): Steven Toth email address change 2008-09-03 18:37:21 -03:00
mxl5007t.c V4L/DVB (10248): v4l-dvb: fix a bunch of compile warnings. 2009-01-29 08:38:04 -02:00
mxl5007t.h V4L/DVB (8549): mxl5007: Fix an error at include file 2008-07-27 19:36:08 -03:00
qt1010.c V4L/DVB (7769): Move other terrestrial tuners to common/tuners 2008-04-29 18:41:38 -03:00
qt1010.h Rename common tuner Kconfig names to use the same 2008-04-29 18:41:38 -03:00
qt1010_priv.h V4L/DVB (7769): Move other terrestrial tuners to common/tuners 2008-04-29 18:41:38 -03:00
tda827x.c V4L/DVB (9774): tda827x: fix returned frequency 2008-12-30 09:38:18 -02:00
tda827x.h V4L/DVB (9049): convert tuner drivers to use dvb_frontend->callback 2008-10-12 09:37:09 -02:00
tda8290.c V4L/DVB (10182): tda8290: fix TDA8290 + TDA18271 initialization 2009-01-07 22:18:55 -02:00
tda8290.h V4L/DVB (9049): convert tuner drivers to use dvb_frontend->callback 2008-10-12 09:37:09 -02:00
tda9887.c V4L/DVB (9497): tda9887/cx88: Adds SECAM/BGH standards 2008-12-29 17:53:25 -02:00
tda9887.h Rename common tuner Kconfig names to use the same 2008-04-29 18:41:38 -03:00
tda18271-common.c V4L/DVB (8035): tda18271: dont touch EB14 if rf_cal lookup is out of range 2008-06-26 15:58:49 -03:00
tda18271-fe.c V4L/DVB (8954): common/tuners: Drop code after return or goto 2008-10-12 09:37:01 -02:00
tda18271-maps.c V4L/DVB (7984): tda18271: update filename in comments 2008-07-20 07:08:05 -03:00
tda18271-priv.h V4L/DVB (7844): tda18271: add tda_fail macro to log error cases 2008-05-14 02:54:06 -03:00
tda18271.h Rename common tuner Kconfig names to use the same 2008-04-29 18:41:38 -03:00
tea5761.c V4L/DVB (7902): fix handling of tea5761_autodetection return value 2008-06-05 06:35:40 -03:00
tea5761.h Rename common tuner Kconfig names to use the same 2008-04-29 18:41:38 -03:00
tea5767.c V4L/DVB (7804): tea5767: Fix error logic 2008-05-14 02:53:58 -03:00
tea5767.h Rename common tuner Kconfig names to use the same 2008-04-29 18:41:38 -03:00
tuner-i2c.h V4L/DVB (7943): tuner: add macro, hybrid_tuner_report_instance_count 2008-06-05 06:35:46 -03:00
tuner-simple.c V4L/DVB (10527): tuner: fix TUV1236D analog/digital setup 2009-02-17 09:43:08 -03:00
tuner-simple.h Rename common tuner Kconfig names to use the same 2008-04-29 18:41:38 -03:00
tuner-types.c V4L/DVB (9268): tuner: add FMD1216MEX tuner 2008-10-17 17:29:09 -03:00
tuner-xc2028-types.h
tuner-xc2028.c V4L/DVB (9913): tuner-xc2028: allow printing stack trace as debug on sleep code 2008-12-30 09:39:15 -02:00
tuner-xc2028.h V4L/DVB (9055): tuner-xc2028: Do a better job selecting firmware type 2008-10-12 09:37:09 -02:00
xc5000.c V4L/DVB (9923): xc5000: remove init_fw option 2008-12-30 09:39:19 -02:00
xc5000.h V4L/DVB (9261): xc5000: Checkpatch compliance 2008-10-17 17:27:59 -03:00