V4L/DVB fixes
cover V4L/DVB fixes
Linus,
Please pull 'master' from:
git://git.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git master
saa717x chips are wrongly detected as saa711x:
- Improve saa711x check
Fixes an oops on some special condition:
- Fix oops on symbol rate==0
There is also a pending request for you, sent on Nov, 21, with 5 patches:
Quoted 13 lines
Linus,
We've solved a few bugs at some drivers.
Please pull 'master' from:
git://git.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.gitmasterIt contains the following:
Some DVBS boards are miss-identified. Those two patches fixes it:
- Fix tuning on older budget DVBS cards.
- Budget:diseqc_methodmodule parameter for cards with subsystem-id 13c2:1003
Quoted 8 lines
A var is not initialized at DVB core frontend zigzag:
- Fix uninitialised variable indvb_frontend_swzigzagSpin unlock missing:
- Add missingspin_unlockto saa6588 decoder driverLack of proper releasing the module:
- Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera
Cheers,
Mauro.
V4L/DVB development is hosted at http://linuxtv.org
---
The diffstat of the 7 pending patches is:
drivers/media/dvb/dvb-core/dvb_frontend.c | 2 +- drivers/media/dvb/frontends/tda10086.c | 4 ++++ drivers/media/dvb/ttpci/budget.c | 9 +++++++++ drivers/media/video/et61x251/et61x251_core.c | 3 +-- drivers/media/video/saa6588.c | 4 +++- drivers/media/video/saa7115.c | 9 +++++++-- drivers/media/video/sn9c102/sn9c102_core.c | 3 +-- 7 files changed, 26 insertions(+), 8 deletions(-)
PATCH 1/2 V4L/DVB (4885): Improve saa711x check
From: Hans Verkuil <[email protected]>
The old code would accept any device on the same i2c address as the saa711x chips as an saa711x. However, this fails with saa717x chips, which use that same address and so are misdetected as a saa7111. Now check whether the chip is really a saa711x model.
---
drivers/media/video/saa7115.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
drivers/media/video/saa7115.c +7 -2
@@ -1464,8 +1464,6 @@ static int saa711x_attach(struct i2c_ada client->driver = &i2c_driver_saa711x;snprintf (client->name,sizeof (client->name) -1 ,"saa7115" ); -v4l_dbg (1 , debug, client,"detecting saa7115 client on address 0x%x\n" , address <<1 ); -for (i=0 ;i<0x0f ;i++) {saa711x_write (client,0 , i); name[i] = (saa711x_read (client,0 ) &0x0f ) +'0' ;
@@ -1477,6 +1475,13 @@ static int saa711x_attach(struct i2c_adasaa711x_write (client,0 ,5 ); chip_id =saa711x_read (client,0 ) &0x0f ; +/* Check whether this chip is part of the saa711x series */ +if (memcmp (name,"1f711" ,5 )) { +v4l_dbg (1 , debug, client,"chip found @ 0x%x (ID %s) does not match a known saa711x chip.\n" , + address <<1 , name); +return 0 ; + } +snprintf (client->name,sizeof (client->name) -1 ,"saa711%d" ,chip_id);v4l_info (client,"saa711%d found (%s) @ 0x%x (%s)\n" , chip_id, name, address <<1 , adapter->name);
PATCH 2/2 V4L/DVB (4874): Fix oops on symbol rate==0
In reply to Mauro Carvalho ChehabFrom: Andrew de Quincey <[email protected]>
The tda10086 causes an oops (divide by zero) if a zero symbol rate is used; this prevents this.
---
drivers/media/dvb/frontends/tda10086.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/media/dvb/frontends/tda10086.c +4 -0
@@ -441,6 +441,10 @@ static int tda10086_get_frontend(structdprintk ("%s\n" , __FUNCTION__); +// check for invalid symbol rate +if (fe_params->u.qpsk.symbol_rate <500000 ) +return -EINVAL ; +// calculate the updated frequency (note: we convert from Hz->kHz) tmp64 =tda10086_read_byte (state,0x52 ); tmp64 |= (tda10086_read_byte (state,0x51 ) <<8 );