From patchwork Mon May 23 14:37:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Petter Selasky X-Patchwork-Id: 7179 Return-path: Envelope-to: mchehab@pedra Delivery-date: Mon, 23 May 2011 11:39:53 -0300 Received: from mchehab by pedra with local (Exim 4.72) (envelope-from ) id 1QOWIR-0004JD-1G for mchehab@pedra; Mon, 23 May 2011 11:39:52 -0300 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Mon, 23 May 2011 11:39:51 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QOWHj-000862-Ik; Mon, 23 May 2011 14:39:07 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755330Ab1EWOiv (ORCPT + 1 other); Mon, 23 May 2011 10:38:51 -0400 Received: from mailfe03.c2i.net ([212.247.154.66]:44497 "EHLO swip.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755253Ab1EWOiv (ORCPT ); Mon, 23 May 2011 10:38:51 -0400 X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=0KkIQGagYCvnrzE3Z2Lmid87OPdbX6VLcZYwAuLMZ50= c=1 sm=1 a=oBVYxUPRnbQA:10 a=WQU8e4WWZSUA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=SObZXD9RMCsnjX8LmoMA:9 a=CjuIK1q_8ugA:10 a=8kQB0OdkAAAA:8 a=X2PpMt_jvgySGMW1IAgA:9 a=9aOQ2cSd83gA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 130655544; Mon, 23 May 2011 16:38:50 +0200 To: "linux-media@vger.kernel.org" Subject: [PATCH] Alternate setting 1 must be selected for interface 0 on the model that I received. Else the rest is identical. Cc: Mauro Carvalho Chehab From: Hans Petter Selasky X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-15?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-15?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= Date: Mon, 23 May 2011 16:37:39 +0200 MIME-Version: 1.0 Message-Id: <201105231637.39053.hselasky@c2i.net> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Sender: --HPS From 3cf61d6a77b22f58471188cd0e7e3dc6c3a29b0b Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky 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 --- 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