public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Alternate setting 1 must be selected for interface 0 on the model that I received. Else the rest is identical.
@ 2011-05-23 14:37 Hans Petter Selasky
  2011-05-23 18:14 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Petter Selasky @ 2011-05-23 14:37 UTC (permalink / raw)
  To: linux-media@vger.kernel.org; +Cc: Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 6 bytes --]

--HPS

[-- Attachment #2: dvb-usb-0016.patch --]
[-- Type: text/x-patch, Size: 1280 bytes --]

From 3cf61d6a77b22f58471188cd0e7e3dc6c3a29b0b Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <hselasky@c2i.net>
Date: Mon, 23 May 2011 16:36:55 +0200
Subject: [PATCH] Alternate setting 1 must be selected for interface 0 on the model that I received. Else the rest is identical.

Signed-off-by: Hans Petter Selasky <hselasky@c2i.net>
---
 drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index cbe2f0d..38a7d03 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -971,6 +971,14 @@ static int ttusb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
 
 static int ttusb_setup_interfaces(struct ttusb *ttusb)
 {
+	/*
+	 * Try to select alternate setting 1 for first interface. If
+	 * that does not work, restore to alternate setting 0.
+	 */
+	if (usb_set_interface(ttusb->dev, 0, 1) < 0)
+		usb_set_interface(ttusb->dev, 0, 0);
+
+	/* Select alternate setting 1 for second interface. */
 	usb_set_interface(ttusb->dev, 1, 1);
 
 	ttusb->bulk_out_pipe = usb_sndbulkpipe(ttusb->dev, 1);
-- 
1.7.1.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-05-23 20:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-23 14:37 [PATCH] Alternate setting 1 must be selected for interface 0 on the model that I received. Else the rest is identical Hans Petter Selasky
2011-05-23 18:14 ` Mauro Carvalho Chehab
2011-05-23 18:48   ` Hans Petter Selasky
2011-05-23 19:06     ` Mauro Carvalho Chehab
2011-05-23 19:17       ` Hans Petter Selasky
2011-05-23 19:47         ` Mauro Carvalho Chehab
2011-05-23 19:52           ` Hans Petter Selasky
2011-05-23 20:04             ` Mauro Carvalho Chehab
2011-05-23 20:07               ` Hans Petter Selasky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox