From patchwork Fri Feb 5 22:48:16 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 77436 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 o15MnEpP014242 for ; Fri, 5 Feb 2010 22:49:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934014Ab0BEWtK (ORCPT ); Fri, 5 Feb 2010 17:49:10 -0500 Received: from mail-in-07.arcor-online.net ([151.189.21.47]:37891 "EHLO mail-in-07.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933995Ab0BEWs6 (ORCPT ); Fri, 5 Feb 2010 17:48:58 -0500 Received: from mail-in-04-z2.arcor-online.net (mail-in-04-z2.arcor-online.net [151.189.8.16]) by mx.arcor.de (Postfix) with ESMTP id BA2443CA526; Fri, 5 Feb 2010 23:48:57 +0100 (CET) Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by mail-in-04-z2.arcor-online.net (Postfix) with ESMTP id ADE50AC189; Fri, 5 Feb 2010 23:48:57 +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 330CA33279F; Fri, 5 Feb 2010 23:48:57 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-05.arcor-online.net 330CA33279F DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1265410137; bh=3gyOKql2L8QKOvS5QcYcR8Ps5iE9MbK8t49PH6ExL6M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=uXja44yO+200qzBldYi+cQdTZ658XfcBnC0L31L06pCQMFXkIlRCs1yNCIklwGSYS geaMWnuIGvtVU78w4QBa87Jn5GmeJsaa56EM9ItA+ybm+KFJq4r0HT7gYIgGQ3hE1D ykJcA2CF+ZFtWO4gW5HtpyTy8P+sKMmFY3P/zAG0= 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: Fri, 5 Feb 2010 23:48:16 +0100 Message-Id: <1265410096-11788-11-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1265410096-11788-10-git-send-email-stefan.ringel@arcor.de> References: <1265410096-11788-1-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-2-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-3-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-4-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-5-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-6-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-7-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-8-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-9-git-send-email-stefan.ringel@arcor.de> <1265410096-11788-10-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 22:49:14 +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;