From patchwork Fri Feb 5 23:06:54 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 77461 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 o15N7ddd024963 for ; Fri, 5 Feb 2010 23:07:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757576Ab0BEXHm (ORCPT ); Fri, 5 Feb 2010 18:07:42 -0500 Received: from mail-in-10.arcor-online.net ([151.189.21.50]:33323 "EHLO mail-in-10.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752466Ab0BEXHl (ORCPT ); Fri, 5 Feb 2010 18:07:41 -0500 Received: from mail-in-02-z2.arcor-online.net (mail-in-02-z2.arcor-online.net [151.189.8.14]) by mx.arcor.de (Postfix) with ESMTP id B2B2B28F7E5; Sat, 6 Feb 2010 00:07:39 +0100 (CET) Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by mail-in-02-z2.arcor-online.net (Postfix) with ESMTP id 9EFA4113E4E; Sat, 6 Feb 2010 00:07:39 +0100 (CET) Received: from localhost.localdomain (dslb-188-103-200-186.pools.arcor-ip.net [188.103.200.186]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-05.arcor-online.net (Postfix) with ESMTPA id 30BF7332898; Sat, 6 Feb 2010 00:07:39 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-05.arcor-online.net 30BF7332898 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1265411259; bh=r8JTHZeNAAKSXeFPubfVSOi0+S/5T8JJegEploQhaqw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=b9LrR8wKTOFLhtPTkSesmF/7cewebJ6kSesEgU2Rl826/RzYljz01KavtzBm1s624 yK31V6mP9FAueIeteF0Mra49h3wxV4l/hsJpKDg29Mf9WBvH0gCBqDfc4KaJJENoj8 /I5bQWNkLRvmfTfdO3kkLc9A2hmV4Dr0mW9AHAgY= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, dheitmueller@kernellabs.com, Stefan Ringel Subject: [PATCH 12/12] tm6000: add a different set param values Date: Sat, 6 Feb 2010 00:06:54 +0100 Message-Id: <1265411214-12231-12-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1265411214-12231-11-git-send-email-stefan.ringel@arcor.de> References: <1265411214-12231-10-git-send-email-stefan.ringel@arcor.de> <1265411214-12231-11-git-send-email-stefan.ringel@arcor.de> 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]); Fri, 05 Feb 2010 23:07:43 +0000 (UTC) diff --git a/drivers/staging/tm6000/hack.c b/drivers/staging/tm6000/hack.c index f181fce..bb4100b 100644 --- a/drivers/staging/tm6000/hack.c +++ b/drivers/staging/tm6000/hack.c @@ -37,7 +37,6 @@ static inline int tm6000_snd_control_msg(struct tm6000_core *dev, __u8 request, static int pseudo_zl10353_pll(struct tm6000_core *tm6000_dev, struct dvb_frontend_parameters *p) { - int ret; u8 *data = kzalloc(50*sizeof(u8), GFP_KERNEL); printk(KERN_ALERT "should set frequency %u\n", p->frequency); @@ -51,7 +50,7 @@ printk(KERN_ALERT "and bandwith %u\n", p->u.ofdm.bandwidth); } // init ZL10353 - data[0] = 0x0b; +/* data[0] = 0x0b; ret = tm6000_snd_control_msg(tm6000_dev, 0x10, 0x501e, 0x00, data, 0x1); msleep(15); data[0] = 0x80; @@ -189,7 +188,162 @@ printk(KERN_ALERT "and bandwith %u\n", p->u.ofdm.bandwidth); msleep(15); break; } - +*/ + switch(p->u.ofdm.bandwidth) { + case BANDWIDTH_8_MHZ: + data[0] = 0x03; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x501e,0,data,1); + msleep(40); + data[0] = 0x44; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x511e,0,data,1); + msleep(40); + data[0] = 0x40; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x551e,0,data,1); + msleep(40); + data[0] = 0x46; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x521e,0,data,1); + msleep(40); + data[0] = 0x15; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x531e,0,data,1); + msleep(40); + data[0] = 0x0f; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x541e,0,data,1); + msleep(40); + data[0] = 0x80; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x551e,0,data,1); + msleep(40); + data[0] = 0x01; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xea1e,0,data,1); + msleep(40); + data[0] = 0x00; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xea1e,0,data,1); + msleep(40); + data[0] = 0x8b; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x631e,0,data,1); + msleep(40); + data[0] = 0x75; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xcc1e,0,data,1); + msleep(40); + data[0] = 0xe6; //0x19; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x6c1e,0,data,1); + msleep(40); + data[0] = 0x09; //0xf7; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x6d1e,0,data,1); + msleep(40); + data[0] = 0x67; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x651e,0,data,1); + msleep(40); + data[0] = 0xe5; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x661e,0,data,1); + msleep(40); + data[0] = 0x75; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5c1e,0,data,1); + msleep(40); + data[0] = 0x17; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5f1e,0,data,1); + msleep(40); + data[0] = 0x40; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5e1e,0,data,1); + msleep(40); + data[0] = 0x01; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x701e,0,data,1); + msleep(40); + break; + case BANDWIDTH_7_MHZ: + data[0] = 0x03; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x501e,0,data,1); + msleep(40); + data[0] = 0x44; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x511e,0,data,1); + msleep(40); + data[0] = 0x40; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x551e,0,data,1); + msleep(40); + data[0] = 0x46; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x521e,0,data,1); + msleep(40); + data[0] = 0x15; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x531e,0,data,1); + msleep(40); + data[0] = 0x0f; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x541e,0,data,1); + msleep(40); + data[0] = 0x80; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x551e,0,data,1); + msleep(40); + data[0] = 0x01; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xea1e,0,data,1); + msleep(40); + data[0] = 0x00; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xea1e,0,data,1); + msleep(40); + data[0] = 0x83; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x631e,0,data,1); + msleep(40); + data[0] = 0xa3; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0xcc1e,0,data,1); + msleep(40); + data[0] = 0xe6; //0x19; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x6c1e,0,data,1); + msleep(40); + data[0] = 0x09; //0xf7; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x6d1e,0,data,1); + msleep(40); + data[0] = 0x5a; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x651e,0,data,1); + msleep(40); + data[0] = 0xe9; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x661e,0,data,1); + msleep(40); + data[0] = 0x86; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5c1e,0,data,1); + msleep(40); + data[0] = 0x17; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5f1e,0,data,1); + msleep(40); + data[0] = 0x40; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x5e1e,0,data,1); + msleep(40); + data[0] = 0x01; + tm6000_read_write_usb(tm6000_dev,0x40,0x10,0x701e,0,data,1); + msleep(40); + break; + default: + printk(KERN_ALERT "tm6000: bandwidth not supported\n"); + } + + tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x051f,0,data,2); + printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]); + msleep(40); + + tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x051f,0,data,2); + printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]); + msleep(40); + + tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x051f,0,data,2); + printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]); + msleep(40); + + tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x051f,0,data,2); + printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]); + msleep(40); + + tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x051f,0,data,2); + printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]); + msleep(40); + + tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x0f1f,0,data,2); + printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]); + msleep(40); + + tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x091f,0,data,2); + printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]); + msleep(40); + + tm6000_read_write_usb(tm6000_dev,0xc0,0x10,0x0b1f,0,data,2); + printk(KERN_INFO "buf %#x %#x \n", data[0], data[1]); + msleep(40); + kfree(data); return 0;