From patchwork Mon Jan 18 06:17:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas GENTY X-Patchwork-Id: 73628 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0I6HWU3021244 for ; Mon, 18 Jan 2010 06:17:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751469Ab0ARGR1 (ORCPT ); Mon, 18 Jan 2010 01:17:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750995Ab0ARGR1 (ORCPT ); Mon, 18 Jan 2010 01:17:27 -0500 Received: from ey-out-2122.google.com ([74.125.78.24]:24156 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733Ab0ARGR0 (ORCPT ); Mon, 18 Jan 2010 01:17:26 -0500 Received: by ey-out-2122.google.com with SMTP id d26so609942eyd.19 for ; Sun, 17 Jan 2010 22:17:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id :disposition-notification-to:date:from:user-agent:mime-version:to :subject:content-type; bh=3cBBb66ISbD34lSCGyoBIt1EgeI6GxrkmJwcscY+tBI=; b=IovCsdThqRXYnfgSEWsU4chWQj8CD8oKFJtFTy+FI2dwyHMFWJ1DKgX3D9/OA8uIVr tpsQWVPARx26rV1atQ/rJiqad7KwhJudMSEI1Tn4felKAdqd3fZriFcFxzxtBd7QZLvr /e4OF/schxctzIXcOIAZYMP3HFDuwXmLLmehU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:subject:content-type; b=rek8AcgnRopWQctqRFN3U+QqrgRALgvFaGOjXI93vreL+RH7AItN6Du31M4ZPe779u wKBqsFGntM1erhwAlo5WmERJvAwGe3pBUrWm6VsC89D15Wh43bTquVQp9Jx2VlSQoNN2 lOh2yMOVgYZlWlx44wCWVJsJs7kj4Y87JoFsE= Received: by 10.213.100.167 with SMTP id y39mr6343424ebn.70.1263795444387; Sun, 17 Jan 2010 22:17:24 -0800 (PST) Received: from ?192.168.1.3? (AOrleans-552-1-108-107.w92-140.abo.wanadoo.fr [92.140.235.107]) by mx.google.com with ESMTPS id 16sm570318ewy.10.2010.01.17.22.17.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 17 Jan 2010 22:17:23 -0800 (PST) Message-ID: <4B53FCF2.7000303@gmail.com> Date: Mon, 18 Jan 2010 07:17:22 +0100 From: "tomlohave@gmail.com" User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: linux-media@vger.kernel.org, hermann pitton , jpnews13@free.fr Subject: [PATCH] [RFC] support for fly dvb duo on medion laptop Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff -r cdcf089168df linux/drivers/media/video/saa7134/saa7134-cards.c --- a/linux/drivers/media/video/saa7134/saa7134-cards.c Sun Jan 17 20:42:47 2010 -0200 +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Mon Jan 18 07:03:53 2010 +0100 @@ -5394,7 +5394,37 @@ .amux = LINE2, }, }, - + [SAA7134_BOARD_FLYDVBTDUO_MEDION] = { + /* Thomas Genty */ + .name = "LifeView FlyDVB-T DUO Medion", + .audio_clock = 0x00187de7, + .tuner_type = TUNER_PHILIPS_TDA8290, + .radio_type = UNSET, + .tuner_addr = ADDR_UNSET, + .radio_addr = ADDR_UNSET, + .gpiomask = 0x00200000, + .mpeg = SAA7134_MPEG_DVB, + .inputs = {{ + .name = name_tv, + .vmux = 1, + .amux = TV, + .gpio = 0x200000, + .tv = 1, + },{ + .name = name_comp1, /* Not tested */ + .vmux = 3, + .amux = LINE1, + },{ + .name = name_svideo, /* Not tested */ + .vmux = 8, + .amux = LINE1, + }}, + .radio = { + .name = name_radio, + .amux = TV, + .gpio = 0x000000, /* No tested */ + }, + }, }; const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); @@ -6551,6 +6581,12 @@ .subdevice = 0x6655, .driver_data = SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S, }, { + .vendor = PCI_VENDOR_ID_PHILIPS, + .device = PCI_DEVICE_ID_PHILIPS_SAA7133, + .subvendor = 0x5168, + .subdevice = 0x0307, /* LR307-N */ + .driver_data = SAA7134_BOARD_FLYDVBTDUO_MEDION, + }, { /* --- boards without eeprom + subsystem ID --- */ .vendor = PCI_VENDOR_ID_PHILIPS, .device = PCI_DEVICE_ID_PHILIPS_SAA7134, @@ -7318,6 +7354,7 @@ case SAA7134_BOARD_AVERMEDIA_SUPER_007: case SAA7134_BOARD_TWINHAN_DTV_DVB_3056: case SAA7134_BOARD_CREATIX_CTX953: + case SAA7134_BOARD_FLYDVBTDUO_MEDION: { /* this is a hybrid board, initialize to analog mode * and configure firmware eeprom address diff -r cdcf089168df linux/drivers/media/video/saa7134/saa7134-dvb.c --- a/linux/drivers/media/video/saa7134/saa7134-dvb.c Sun Jan 17 20:42:47 2010 -0200 +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c Mon Jan 18 07:03:53 2010 +0100 @@ -825,6 +825,20 @@ .request_firmware = philips_tda1004x_request_firmware }; +static struct tda1004x_config tda827x_flydvbtduo_medion_config = { + .demod_address = 0x08, + .invert = 1, + .invert_oclk = 0, + .xtal_freq = TDA10046_XTAL_16M, + .agc_config = TDA10046_AGC_TDA827X, + .gpio_config = TDA10046_GP01_I, + .if_freq = TDA10046_FREQ_045, + .i2c_gate = 0x4b, + .tuner_address = 0x61, + .antenna_switch = 2, + .request_firmware = philips_tda1004x_request_firmware +}; + /* ------------------------------------------------------------------ * special case: this card uses saa713x GPIO22 for the mode switch */ @@ -1586,6 +1600,22 @@ &dtv1000s_tda18271_config); } break; + case SAA7134_BOARD_FLYDVBTDUO_MEDION: + /* this card uses saa713x GPIO22 for the mode switch */ + fe0->dvb.frontend = dvb_attach(tda10046_attach, + &tda827x_flydvbtduo_medion_config, + &dev->i2c_adap); + if (fe0->dvb.frontend) { + if (dvb_attach(tda827x_attach,fe0->dvb.frontend, + tda827x_flydvbtduo_medion_config.tuner_address, &dev->i2c_adap, + &ads_duo_cfg) == NULL) { + wprintk("no tda827x tuner found at addr: %02x\n", + tda827x_flydvbtduo_medion_config.tuner_address); + goto dettach_frontend; + } + } else + wprintk("failed to attach tda10046\n"); + break; default: wprintk("Huh? unknown DVB card?\n"); break; diff -r cdcf089168df linux/drivers/media/video/saa7134/saa7134.h --- a/linux/drivers/media/video/saa7134/saa7134.h Sun Jan 17 20:42:47 2010 -0200 +++ b/linux/drivers/media/video/saa7134/saa7134.h Mon Jan 18 07:03:53 2010 +0100 @@ -301,6 +301,7 @@ #define SAA7134_BOARD_ASUS_EUROPA_HYBRID 174 #define SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S 175 #define SAA7134_BOARD_BEHOLD_505RDS_MK3 176 +#define SAA7134_BOARD_FLYDVBTDUO_MEDION 177 #define SAA7134_MAXBOARDS 32 #define SAA7134_INPUT_MAX 8