Skip to contentSkip to conversation

V4L/DVB bug fixes

PATCH New [email protected] 1 participant 6 messages Nov 21, 2006 Media (V4L/DVB)

lore
Share & tools
lore
#1 lore raw

PATCH 1/5 V4L/DVB (4831): Fix tuning on older budget DVBS cards.

In reply to [email protected]

From: Andrew de Quincey <[email protected]>

Fixes to DISEQC on these cards inadvertently broke normal tone/voltage signalling. This restores the necessary function.

---

 drivers/media/dvb/ttpci/budget.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/media/dvb/ttpci/budget.c +1 -0
index e58f039..e28617b 100644
@@ -382,6 +382,7 @@ static void frontend_init(struct budget 
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
 			budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
+			budget->dvb_frontend->ops.set_tone = budget_set_tone;
 			break;
 		}
 		break;
#3 lore raw

PATCH 3/5 V4L/DVB (4832): Fix uninitialised variable in dvb_frontend_swzigzag

In reply to [email protected]

From: Andrew de Quincey <[email protected]>

Spotted by coverity/Adrian Bunk.

---

 drivers/media/dvb/dvb-core/dvb_frontend.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +1 -1
index 53304e6..a2ab2ee 100644
@@ -348,7 +348,7 @@ static int dvb_frontend_swzigzag_autotun
 
 static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
 {
-	fe_status_t s;
+	fe_status_t s = 0;
 	struct dvb_frontend_private *fepriv = fe->frontend_priv;
 
 	/* if we've got no parameters, just keep idling */
#2 lore raw

PATCH 2/5 V4L/DVB (4840): Budget: diseqc_method module parameter for cards with subsystem-id 13c2:1003

In reply to [email protected]

From: Oliver Endriss <[email protected]>

New module parameter diseqc_method for cards with subsystem-id 13c2:1003.
- 0: unreliable method, can be used by all board revisions (default)
- 1: reliable method, works for newer board layouts only
The parameter has no effect for cards with other subsystem-ids.

---

 drivers/media/dvb/ttpci/budget.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
drivers/media/dvb/ttpci/budget.c +9 -1
index e28617b..56f1c80 100644
@@ -46,6 +46,10 @@ #include "tda826x.h"
 #include "lnbp21.h"
 #include "bsru6.h"
 
+static int diseqc_method;
+module_param(diseqc_method, int, 0444);
+MODULE_PARM_DESC(diseqc_method, "Select DiSEqC method for subsystem id 13c2:1003, 0: default, 1: more reliable (for newer revisions only)");
+
 static void Set22K (struct budget *budget, int state)
 {
 	struct saa7146_dev *dev=budget->dev;
@@ -382,7 +386,11 @@ static void frontend_init(struct budget 
 		if (budget->dvb_frontend) {
 			budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
 			budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
-			budget->dvb_frontend->ops.set_tone = budget_set_tone;
+			if (budget->dev->pci->subsystem_device == 0x1003 && diseqc_method == 0) {
+				budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
+				budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
+				budget->dvb_frontend->ops.set_tone = budget_set_tone;
+			}
 			break;
 		}
 		break;
#0 lore raw

cover V4L/DVB bug fixes

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.git master

It contains the following:

Some DVBS boards are miss-identified. Those two patches fixes it:
- Fix tuning on older budget DVBS cards.
- Budget: diseqc_method module parameter for cards with subsystem-id 13c2:1003

A var is not initialized at DVB core frontend zigzag:
- Fix uninitialised variable in dvb_frontend_swzigzag

Spin unlock missing:
- Add missing spin_unlock to saa6588 decoder driver

Lack 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
---

 drivers/media/dvb/dvb-core/dvb_frontend.c    |    2 +-
 drivers/media/dvb/ttpci/budget.c             |    9 +++++++++
 drivers/media/video/et61x251/et61x251_core.c |    3 +--
 drivers/media/video/saa6588.c                |    4 +++-
 drivers/media/video/sn9c102/sn9c102_core.c   |    3 +--
 5 files changed, 15 insertions(+), 6 deletions(-)
#5 lore raw

PATCH 5/5 V4L/DVB (4865): Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera

From: Luca Risolia <[email protected]>

The patch fix bug 5748.

---

 drivers/media/video/et61x251/et61x251_core.c |    3 +--
 drivers/media/video/sn9c102/sn9c102_core.c   |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/media/video/et61x251/et61x251_core.c +1 -2
index f786ab1..86e353b 100644
@@ -1182,8 +1182,6 @@ static void et61x251_release_resources(s
 	video_set_drvdata(cam->v4ldev, NULL);
 	video_unregister_device(cam->v4ldev);
 
-	usb_put_dev(cam->usbdev);
-
 	mutex_unlock(&et61x251_sysfs_lock);
 
 	kfree(cam->control_buffer);
@@ -1275,6 +1273,7 @@ static int et61x251_release(struct inode
 
 	if (cam->state & DEV_DISCONNECTED) {
 		et61x251_release_resources(cam);
+		usb_put_dev(cam->usbdev);
 		mutex_unlock(&cam->dev_mutex);
 		kfree(cam);
 		return 0;
drivers/media/video/sn9c102/sn9c102_core.c +1 -2
index a4702d3..42fb60d 100644
@@ -1462,8 +1462,6 @@ static void sn9c102_release_resources(st
 	video_set_drvdata(cam->v4ldev, NULL);
 	video_unregister_device(cam->v4ldev);
 
-	usb_put_dev(cam->usbdev);
-
 	mutex_unlock(&sn9c102_sysfs_lock);
 
 	kfree(cam->control_buffer);
@@ -1555,6 +1553,7 @@ static int sn9c102_release(struct inode*
 
 	if (cam->state & DEV_DISCONNECTED) {
 		sn9c102_release_resources(cam);
+		usb_put_dev(cam->usbdev);
 		mutex_unlock(&cam->dev_mutex);
 		kfree(cam);
 		return 0;
#4 lore raw

PATCH 4/5 V4L/DVB (4849): Add missing spin_unlock to saa6588 decoder driver

In reply to [email protected]

From: Ira Snyder <[email protected]>

Sparse noticed a lock imbalance in read_from_buf(). Further inspection shows that the lock should not be held when the function exits.
This adds a spin_unlock_irqrestore(), so that every exit path of the read_from_buf() function is consistent. The unlock was missing on an error path.

---

 drivers/media/video/saa6588.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/media/video/saa6588.c +3 -1
index a81285c..7b9859c 100644
@@ -212,8 +212,10 @@ static void read_from_buf(struct saa6588
 	if (rd_blocks > s->block_count)
 		rd_blocks = s->block_count;
 
-	if (!rd_blocks)
+	if (!rd_blocks) {
+		spin_unlock_irqrestore(&s->lock, flags);
 		return;
+	}
 
 	for (i = 0; i < rd_blocks; i++) {
 		if (block_to_user_buf(s, buf_ptr)) {