From patchwork Wed Mar 10 17:57:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 84648 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2AHxOiF022156 for ; Wed, 10 Mar 2010 17:59:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932590Ab0CJR7X (ORCPT ); Wed, 10 Mar 2010 12:59:23 -0500 Received: from mail-in-17.arcor-online.net ([151.189.21.57]:52846 "EHLO mail-in-17.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932548Ab0CJR7W (ORCPT ); Wed, 10 Mar 2010 12:59:22 -0500 Received: from mail-in-01-z2.arcor-online.net (mail-in-01-z2.arcor-online.net [151.189.8.13]) by mx.arcor.de (Postfix) with ESMTP id 6153E3B26AB; Wed, 10 Mar 2010 18:59:21 +0100 (CET) Received: from mail-in-04.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44]) by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 4F60B2C0B47; Wed, 10 Mar 2010 18:59:21 +0100 (CET) Received: from localhost.localdomain (dslb-188-103-172-103.pools.arcor-ip.net [188.103.172.103]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-04.arcor-online.net (Postfix) with ESMTPA id DFE4533A9D9; Wed, 10 Mar 2010 18:59:20 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-04.arcor-online.net DFE4533A9D9 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1268243961; bh=Hnm2hF1c2YqDZEJ2bMIltaYOT612UCUBprbnv/Vah1I=; h=From:To:Cc:Subject:Date:Message-Id; b=KhY3+wt1Q7HoI6CGLtCZTS6N2ANc85qfizP9npy79MgJOp4lYcplPNOt6O9+E/uLB nIy6XA5hm0bewKewDGdGsCpWsv7FrUyb6eZSDZCZ3sZSFjBzCuxSk0m4RCFgBobwXL str4i8avrfOAgC9kRHs8n1fEQmOsLiTEMFAuEzTk= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, dheitmueller@kernellabs.com, Stefan Ringel Subject: [PATCH] tm6000: add new hybrid-stick Date: Wed, 10 Mar 2010 18:57:57 +0100 Message-Id: <1268243877-29157-1-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.6.6.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 10 Mar 2010 17:59:24 +0000 (UTC) diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 83cb4b9..2053008 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c @@ -47,6 +47,7 @@ #define TM6010_BOARD_BEHOLD_WANDER 10 #define TM6010_BOARD_BEHOLD_VOYAGER 11 #define TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE 12 +#define TM6010_BOARD_TWINHAN_TU501 13 #define TM6000_MAXBOARDS 16 static unsigned int card[] = {[0 ... (TM6000_MAXBOARDS - 1)] = UNSET }; @@ -169,7 +170,7 @@ struct tm6000_board tm6000_boards[] = { .gpio_addr_tun_reset = TM6000_GPIO_4, }, [TM6010_BOARD_HAUPPAUGE_900H] = { - .name = "Hauppauge HVR-900H", + .name = "Hauppauge WinTV HVR-900H / WinTV USB2-Stick", .tuner_type = TUNER_XC2028, /* has a XC3028 */ .tuner_addr = 0xc2 >> 1, .demod_addr = 0x1e >> 1, @@ -180,7 +181,7 @@ struct tm6000_board tm6000_boards[] = { .has_zl10353 = 1, .has_eeprom = 1, }, - .gpio_addr_tun_reset = TM6000_GPIO_2, + .gpio_addr_tun_reset = TM6010_GPIO_2, }, [TM6010_BOARD_BEHOLD_WANDER] = { .name = "Beholder Wander DVB-T/TV/FM USB2.0", @@ -212,7 +213,22 @@ struct tm6000_board tm6000_boards[] = { .gpio_addr_tun_reset = TM6000_GPIO_2, }, [TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE] = { - .name = "Terratec Cinergy Hybrid XE", + .name = "Terratec Cinergy Hybrid XE / Cinergy Hybrid-Stick", + .tuner_type = TUNER_XC2028, /* has a XC3028 */ + .tuner_addr = 0xc2 >> 1, + .demod_addr = 0x1e >> 1, + .type = TM6010, + .caps = { + .has_tuner = 1, + .has_dvb = 1, + .has_zl10353 = 1, + .has_eeprom = 1, + .has_remote = 1, + }, + .gpio_addr_tun_reset = TM6010_GPIO_2, + }, + [TM6010_BOARD_TWINHAN_TU501] = { + .name = "Twinhan TU501(704D1)", .tuner_type = TUNER_XC2028, /* has a XC3028 */ .tuner_addr = 0xc2 >> 1, .demod_addr = 0x1e >> 1, @@ -236,9 +252,17 @@ struct usb_device_id tm6000_id_table [] = { { USB_DEVICE(0x14aa, 0x0620), .driver_info = TM6000_BOARD_FREECOM_AND_SIMILAR }, { USB_DEVICE(0x06e1, 0xb339), .driver_info = TM6000_BOARD_ADSTECH_MINI_DUAL_TV }, { USB_DEVICE(0x2040, 0x6600), .driver_info = TM6010_BOARD_HAUPPAUGE_900H }, + { USB_DEVICE(0x2040, 0x6601), .driver_info = TM6010_BOARD_HAUPPAUGE_900H }, + { USB_DEVICE(0x2040, 0x6610), .driver_info = TM6010_BOARD_HAUPPAUGE_900H }, + { USB_DEVICE(0x2040, 0x6611), .driver_info = TM6010_BOARD_HAUPPAUGE_900H }, { USB_DEVICE(0x6000, 0xdec0), .driver_info = TM6010_BOARD_BEHOLD_WANDER }, { USB_DEVICE(0x6000, 0xdec1), .driver_info = TM6010_BOARD_BEHOLD_VOYAGER }, { USB_DEVICE(0x0ccd, 0x0086), .driver_info = TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE }, + { USB_DEVICE(0x0ccd, 0x00A5), .driver_info = TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE }, + { USB_DEVICE(0x13d3, 0x3240), .driver_info = TM6010_BOARD_TWINHAN_TU501 }, + { USB_DEVICE(0x13d3, 0x3241), .driver_info = TM6010_BOARD_TWINHAN_TU501 }, + { USB_DEVICE(0x13d3, 0x3243), .driver_info = TM6010_BOARD_TWINHAN_TU501 }, + { USB_DEVICE(0x13d3, 0x3264), .driver_info = TM6010_BOARD_TWINHAN_TU501 }, { }, }; @@ -271,7 +295,9 @@ int tm6000_tuner_callback(void *ptr, int component, int command, int arg) case 0: /* newer tuner can faster reset */ switch (dev->model) { + case TM6010_BOARD_HAUPPAUGE_900H: case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE: + case TM6010_BOARD_TWINHAN_TU501: tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, dev->tuner_reset_gpio, 0x01); msleep(60); @@ -328,11 +354,11 @@ int tm6000_cards_setup(struct tm6000_core *dev) */ switch (dev->model) { case TM6010_BOARD_HAUPPAUGE_900H: + case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE: + case TM6010_BOARD_TWINHAN_TU501: /* Turn xceive 3028 on */ tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_3, 0x01); - msleep(11); - break; - case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE: + msleep(15); /* Turn zarlink zl10353 on */ tm6000_set_reg(dev, REQ_03_SET_GET_MCU_PIN, TM6010_GPIO_4, 0x00); msleep(15); @@ -445,6 +471,7 @@ static void tm6000_config_tuner (struct tm6000_core *dev) switch(dev->model) { case TM6010_BOARD_HAUPPAUGE_900H: case TM6010_BOARD_TERRATEC_CINERGY_HYBRID_XE: + case TM6010_BOARD_TWINHAN_TU501: ctl.fname = "xc3028L-v36.fw"; break; default: