diff options
author | Hans Verkuil <devnull@localhost> | 2006-01-18 21:51:34 +0000 |
---|---|---|
committer | Hans Verkuil <devnull@localhost> | 2006-01-18 21:51:34 +0000 |
commit | d742a81bae92836245df7a9f778f2c8a95d0d29c (patch) | |
tree | f1b8f1f562d8f01967d00788b0baa6d00f0844a4 /linux | |
parent | f7ef0e07e02040e66dd49a7bfce0cce75ab777a0 (diff) | |
download | mediapointer-dvb-s2-d742a81bae92836245df7a9f778f2c8a95d0d29c.tar.gz mediapointer-dvb-s2-d742a81bae92836245df7a9f778f2c8a95d0d29c.tar.bz2 |
Add probe check for the tda9840.
Add probe check for the tda9840 to prevent misdetection of
a Micronas dpl3518a as a tda9840.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/tvaudio.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index 4e1bc3f52..792724258 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -404,6 +404,14 @@ static void tda9840_setmode(struct CHIPSTATE *chip, int mode) chip_write(chip, TDA9840_SW, t); } +static int tda9840_checkit(struct CHIPSTATE *chip) +{ + int rc; + rc = chip_read(chip); + /* lower 5 bits should be 0 */ + return ((rc & 0x1f) == 0) ? 1 : 0; +} + /* ---------------------------------------------------------------------- */ /* audio chip descriptions - defines+functions for tda985x */ @@ -1283,6 +1291,7 @@ static struct CHIPDESC chiplist[] = { .addr_hi = I2C_TDA9840 >> 1, .registers = 5, + .checkit = tda9840_checkit, .getmode = tda9840_getmode, .setmode = tda9840_setmode, .checkmode = generic_checkmode, |