[PATCH] Alternate setting 1 must be selected for interface 0 on the model that I received. Else the rest is identical.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--HPS
From 3cf61d6a77b22f58471188cd0e7e3dc6c3a29b0b Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <hselasky@xxxxxxx>
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@xxxxxxx>
---
 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


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux