From patchwork Fri Jul 31 13:20:16 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: hermann pitton X-Patchwork-Id: 38511 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6VDSN9A001928 for ; Fri, 31 Jul 2009 13:30:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750774AbZGaNaK (ORCPT ); Fri, 31 Jul 2009 09:30:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750967AbZGaNaK (ORCPT ); Fri, 31 Jul 2009 09:30:10 -0400 Received: from mail-in-02.arcor-online.net ([151.189.21.42]:41962 "EHLO mail-in-02.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750774AbZGaNaG (ORCPT ); Fri, 31 Jul 2009 09:30:06 -0400 Received: from mail-in-11-z2.arcor-online.net (mail-in-11-z2.arcor-online.net [151.189.8.28]) by mx.arcor.de (Postfix) with ESMTP id 910053FE022; Fri, 31 Jul 2009 15:30:04 +0200 (CEST) Received: from mail-in-02.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by mail-in-11-z2.arcor-online.net (Postfix) with ESMTP id 6CAC83464CC; Fri, 31 Jul 2009 15:30:04 +0200 (CEST) Received: from [192.168.178.24] (pD9E10140.dip0.t-ipconnect.de [217.225.1.64]) (Authenticated sender: hermann-pitton@arcor.de) by mail-in-02.arcor-online.net (Postfix) with ESMTPSA id 1D3933FE3EF; Fri, 31 Jul 2009 15:30:03 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-02.arcor-online.net 1D3933FE3EF DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1249047003; bh=w+WNffgWiO8EiYT365GR6rnV584WgNHGJrMJ8sCZgLQ=; h=Subject:From:To:Cc:In-Reply-To:References:Content-Type:Date: Message-Id:Mime-Version; b=CtDd82BxneOc9sp9XC9VVd8VQUBbToV/np4errZmWpbAjA2JTC9rxO/pEfZi3GZSg ZxE5IoGeOw5y4i05N6uzm/z+pK8oi1PraeAEfJA30mhfo1gU7P468NPG3Lq9KRdG/9 Pm26XDXZ8yg6T1sByvQAuui/87co1e3iYB0CTG00= Subject: Re: [PATCH] - For MSI TV@nywhere Satellite Pro DVB-S From: hermann pitton To: Roland Schnabl Cc: linux-media@vger.kernel.org In-Reply-To: References: Date: Fri, 31 Jul 2009 15:20:16 +0200 Message-Id: <1249046417.3931.66.camel@pc07.localdom.local> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-5.fc8) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Roland, Am Donnerstag, den 30.07.2009, 12:33 +0200 schrieb Roland Schnabl: > Hello I have written a patch for the MSI TV@nywhere Satellite Pro > my enviroment is debian etch with kernel 2.6.28.9 > 01: PCI 107.0: 11200 TV Card > [Created at pci.281] > Unique ID: 2_DJ.cZjSSo5ZA4B > Parent ID: 8otl.Ao4TF0pWC38 > SysFS ID: /devices/pci0000:00/0000:00:04.0/0000:01:07.0 > SysFS BusID: 0000:01:07.0 > Hardware Class: tv card > Model: "Micro-Star International SAA7134 Video Broadcast Decoder" > Vendor: pci 0x1131 "Philips Semiconductors" > Device: pci 0x7134 "SAA7134 Video Broadcast Decoder" > SubVendor: pci 0x1462 "Micro-Star International Co., Ltd." > SubDevice: pci 0x8811 > Revision: 0x01 > Driver: "saa7134" > Driver Modules: "saa7134" > Memory Range: 0xfafff000-0xfafff3ff (rw,non-prefetchable) > IRQ: 17 (no events) > Module Alias: "pci:v00001131d00007134sv00001462sd00008811bc04sc80i00" > Driver Info #0: > Driver Status: saa7134 is active > Driver Activation Cmd: "modprobe saa7134" > Config Status: cfg=new, avail=yes, need=no, active=unknown > Attached to: #15 (PCI bridge) > > 01:07.0 Multimedia controller [0480]: Philips Semiconductors > SAA7134/SAA7135HL Video Broadcast Decoder [1131:7134] (rev 01) > Subsystem: Micro-Star International Co., Ltd. Unknown device [1462:8811] > Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- > ParErr- Stepping- SERR- FastB2B- > Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium > >TAbort- SERR- Latency: 32 (21000ns min, 8000ns max) > Interrupt: pin A routed to IRQ 17 > Region 0: Memory at fafff000 (32-bit, non-prefetchable) [size=1K] > Capabilities: [40] Power Management version 1 > Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA > PME(D0-,D1-,D2-,D3hot-,D3cold-) > Status: D0 PME-Enable- DSel=0 DScale=1 PME- > > here is the diff: thanks for working on it and providing patches. Looks quite good so far, but there are some issues. Most important, we need a Signed-off-by: your name line from you to forward the patch. Read on the wiki about how to add information about new cards. I had to crawl the web to find your prior activities on the card. http://www.vdr-portal.de/board/thread.php?threadid=88020 Your patch inline now has broken lines, so I copied from vdr-portal. Do also attach it, if your mailer is not safe for patches. Minimum to provide is "dmesg" for the card with "i2c_scan=1", a listing of the chips present and of all connectors. I still don't know, how the remote is connected. On that analog input breakout cable? The indentation in saa7134-dvb.c was one tab too deep, also you forgot to check, if the isl6124 is present on your board. I have removed a wprintk there for the card and your nickname and did instead add your name and email at saa7134-cards.c at the usual place. Is this OK with you? We need it only at your Signed-off-by line. The card is moved to the current end of all related functions to make later reviews easier. It is currently removed from the i2c remotes, because it has no further details in saa7134-input, ir-common or ir-i2c-kbd. But the reason, why it is not simply treated as a clone of LifeView FlyDVB-S /Acorp TV134DS is exactly the IR chip on it. I read KS012. (else saa7134, isl6421, tda826x, tda10086) We have support on the MSI TV@nywhere Plus for KS003. KS007 is also known to function. However the KS003 needed some write attempt to another address at the bus to become visible functional then at 0x30. Please test the recent version of the patch, make further suggestions and/or send us your Signed-off-by, if OK so far. Also please provide relevant "dmesg" with i2c_scan=1 for saa7134 to see if there is any trace of the KS012. If not, you still can try to add the card back to the i2c remotes and also to the case statement for the MSI TV@nywhere Plus in saa7134-input.c and watch out, if something changes. KS012 seems to be untested so far. case SAA7134_BOARD_MSI_TVATANYWHERE_PLUS: #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30) snprintf(ir->c.name, sizeof(ir->c.name), "MSI TV@nywhere Plus"); ir->get_key = get_key_msi_tvanywhere_plus; ir->ir_codes = ir_codes_msi_tvanywhere_plus; #else init_data.name = "MSI TV@nywhere Plus"; init_data.get_key = get_key_msi_tvanywhere_plus; init_data.ir_codes = ir_codes_msi_tvanywhere_plus; info.addr = 0x30; /* MSI TV@nywhere Plus controller doesn't seem to respond to probes unless we read something from an existing device. Weird... REVISIT: might no longer be needed */ rc = i2c_transfer(&dev->i2c_adap, &msg_msi, 1); dprintk(KERN_DEBUG "probe 0x%02x @ %s: %s\n", msg_msi.addr, dev->i2c_adap.name, (1 == rc) ? "yes" : "no"); #endif break; Good luck for the IR! Did you try card=97. Should work, except for the remote, I guess. Cheers, Hermann saa7134: add support for MSI TV@nywhere Satellite Pro Patch v2, also attached. If OK, please sign here. > ----------------------------------------------------------------------------------------------------------- > diff -r fd96af63f79b linux/Documentation/video4linux/CARDLIST.saa7134 > --- a/linux/Documentation/video4linux/CARDLIST.saa7134 Fri Jun 19 > 19:56:56 2009 +0000 > +++ b/linux/Documentation/video4linux/CARDLIST.saa7134 Thu Jul 30 > 12:26:05 2009 +0200 > @@ -167,3 +167,4 @@ > 166 -> Beholder BeholdTV 607 RDS [5ace:6073] > 167 -> Beholder BeholdTV 609 RDS [5ace:6092] > 168 -> Beholder BeholdTV 609 RDS [5ace:6093] > +169 -> MSI TV@nywhere Satellite Pro [1462:8811] > diff -r fd96af63f79b linux/drivers/media/video/saa7134/saa7134-cards.c > --- a/linux/drivers/media/video/saa7134/saa7134-cards.c Fri Jun 19 > 19:56:56 2009 +0000 > +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Thu Jul 30 > 12:26:05 2009 +0200 > @@ -5117,6 +5117,24 @@ > .gpio = 0x01, > }, > }, > + [SAA7134_BOARD_MSI_TVATANYWHERE_SATELLITE_PRO] = { > + .name = "MSI TV@nywhere Satellite Pro", > + .audio_clock = 0x00200000, > + .tuner_type = TUNER_ABSENT, > + .radio_type = UNSET, > + .tuner_addr = ADDR_UNSET, > + .radio_addr = ADDR_UNSET, > + .mpeg = SAA7134_MPEG_DVB, > + .inputs = {{ > + .name = name_comp1, > + .vmux = 3, > + .amux = LINE1, > + }, { > + .name = name_svideo, > + .vmux = 8, > + .amux = LINE1, > + } }, > + }, > [SAA7134_BOARD_AVERMEDIA_STUDIO_507UA] = { > /* Andy Shevchenko */ > .name = "Avermedia AVerTV Studio 507UA", > @@ -6256,6 +6274,12 @@ > .subvendor = 0x17de, > .subdevice = 0x7128, > .driver_data = SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG, > + }, { > + .vendor = PCI_VENDOR_ID_PHILIPS, > + .device = PCI_DEVICE_ID_PHILIPS_SAA7134, > + .subvendor = 0x1462, > + .subdevice = 0x8811, > + .driver_data = SAA7134_BOARD_MSI_TVATANYWHERE_SATELLITE_PRO, > }, { > .vendor = PCI_VENDOR_ID_PHILIPS, > .device = PCI_DEVICE_ID_PHILIPS_SAA7133, > @@ -6743,6 +6767,7 @@ > case SAA7134_BOARD_PINNACLE_PCTV_310i: > case SAA7134_BOARD_UPMOST_PURPLE_TV: > case SAA7134_BOARD_MSI_TVATANYWHERE_PLUS: > + case SAA7134_BOARD_MSI_TVATANYWHERE_SATELLITE_PRO: > case SAA7134_BOARD_HAUPPAUGE_HVR1110: > case SAA7134_BOARD_BEHOLD_607FM_MK3: > case SAA7134_BOARD_BEHOLD_607FM_MK5: > diff -r fd96af63f79b linux/drivers/media/video/saa7134/saa7134-dvb.c > --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c Fri Jun 19 > 19:56:56 2009 +0000 > +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c Thu Jul 30 > 12:26:05 2009 +0200 > @@ -1191,6 +1191,20 @@ > } > } > break; > + case SAA7134_BOARD_MSI_TVATANYWHERE_SATELLITE_PRO: > + wprintk("MSI TV@nywhere Satellite Pro by roli\n"); > + fe0->dvb.frontend = dvb_attach(tda10086_attach, > + &flydvbs, &dev->i2c_adap); > + if (fe0->dvb.frontend) { > + if (dvb_attach(tda826x_attach, > + fe0->dvb.frontend, 0x60, > + &dev->i2c_adap, 0) == NULL) { > + wprintk("%s: MSI TV@nywhere > Satellite Pro, no " > + "tda826x found!\n", __func__); > + goto dettach_frontend; > + } > + } > + break; > case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: > case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: > fe0->dvb.frontend = dvb_attach(tda10046_attach, > diff -r fd96af63f79b linux/drivers/media/video/saa7134/saa7134.h > --- a/linux/drivers/media/video/saa7134/saa7134.h Fri Jun 19 > 19:56:56 2009 +0000 > +++ b/linux/drivers/media/video/saa7134/saa7134.h Thu Jul 30 > 12:26:05 2009 +0200 > @@ -293,6 +293,7 @@ > #define SAA7134_BOARD_BEHOLD_607RDS_MK5 166 > #define SAA7134_BOARD_BEHOLD_609RDS_MK3 167 > #define SAA7134_BOARD_BEHOLD_609RDS_MK5 168 > +#define SAA7134_BOARD_MSI_TVATANYWHERE_SATELLITE_PRO 169 > > #define SAA7134_MAXBOARDS 32 > #define SAA7134_INPUT_MAX 8 > ----------------------------------------------------------------------------------------------------------- > NrybXǧv^)޺{.n+{bj)w*jgݢj/zޖ2ޙ&)ߡaGhj:+vw٥ diff -r 3f2dffde2429 linux/Documentation/video4linux/CARDLIST.saa7134 --- a/linux/Documentation/video4linux/CARDLIST.saa7134 Thu Jul 30 20:00:44 2009 -0300 +++ b/linux/Documentation/video4linux/CARDLIST.saa7134 Fri Jul 31 13:38:21 2009 +0200 @@ -167,3 +167,4 @@ 166 -> Beholder BeholdTV 607 RDS [5ace:6073] 167 -> Beholder BeholdTV 609 RDS [5ace:6092] 168 -> Beholder BeholdTV 609 RDS [5ace:6093] +169 -> MSI TV@nywhere Satellite Pro [1462:8811] diff -r 3f2dffde2429 linux/drivers/media/video/saa7134/saa7134-cards.c --- a/linux/drivers/media/video/saa7134/saa7134-cards.c Thu Jul 30 20:00:44 2009 -0300 +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Fri Jul 31 13:38:21 2009 +0200 @@ -5155,6 +5155,25 @@ .gpio = 0x00, }, }, + [SAA7134_BOARD_MSI_TVATANYWHERE_SATELLITE_PRO] = { + /* Roland Schnabl */ + .name = "MSI TV@nywhere Satellite Pro", + .audio_clock = 0x00200000, + .tuner_type = TUNER_ABSENT, + .radio_type = UNSET, + .tuner_addr = ADDR_UNSET, + .radio_addr = ADDR_UNSET, + .mpeg = SAA7134_MPEG_DVB, + .inputs = {{ + .name = name_comp1, + .vmux = 3, + .amux = LINE1, + }, { + .name = name_svideo, + .vmux = 8, + .amux = LINE1, + } }, + }, }; const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); @@ -6262,7 +6281,12 @@ .subvendor = 0x1461, /* Avermedia Technologies Inc */ .subdevice = 0xf31d, .driver_data = SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS, - + }, { + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7134, + .subvendor = 0x1462, + .subdevice = 0x8811, + .driver_data = SAA7134_BOARD_MSI_TVATANYWHERE_SATELLITE_PRO, }, { /* --- boards without eeprom + subsystem ID --- */ .vendor = PCI_VENDOR_ID_PHILIPS, diff -r 3f2dffde2429 linux/drivers/media/video/saa7134/saa7134-dvb.c --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c Thu Jul 30 20:00:44 2009 -0300 +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c Fri Jul 31 13:38:21 2009 +0200 @@ -1477,6 +1477,24 @@ } } break; + case SAA7134_BOARD_MSI_TVATANYWHERE_SATELLITE_PRO: + fe0->dvb.frontend = dvb_attach(tda10086_attach, &flydvbs, + &dev->i2c_adap); + if (fe0->dvb.frontend) { + if (dvb_attach(tda826x_attach, fe0->dvb.frontend, 0x60, + &dev->i2c_adap, 0) == NULL) { + wprintk("%s: MSI TV@nywhere Satellite Pro, no " + "tda826x found!\n", __func__); + goto dettach_frontend; + } + if (dvb_attach(isl6421_attach, fe0->dvb.frontend, + &dev->i2c_adap, 0x08, 0, 0) == NULL) { + wprintk("%s: MSI TV@nywhere Satellite Pro, no " + "isl6421 found!\n", __func__); + goto dettach_frontend; + } + } + break; default: wprintk("Huh? unknown DVB card?\n"); break; diff -r 3f2dffde2429 linux/drivers/media/video/saa7134/saa7134.h --- a/linux/drivers/media/video/saa7134/saa7134.h Thu Jul 30 20:00:44 2009 -0300 +++ b/linux/drivers/media/video/saa7134/saa7134.h Fri Jul 31 13:38:21 2009 +0200 @@ -293,6 +293,7 @@ #define SAA7134_BOARD_BEHOLD_607RDS_MK5 166 #define SAA7134_BOARD_BEHOLD_609RDS_MK3 167 #define SAA7134_BOARD_BEHOLD_609RDS_MK5 168 +#define SAA7134_BOARD_MSI_TVATANYWHERE_SATELLITE_PRO 169 #define SAA7134_MAXBOARDS 32 #define SAA7134_INPUT_MAX 8