From patchwork Sun Sep 26 18:16:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 210182 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8QIGd4E030340 for ; Sun, 26 Sep 2010 18:16:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757160Ab0IZSQg (ORCPT ); Sun, 26 Sep 2010 14:16:36 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:45844 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756216Ab0IZSQg (ORCPT ); Sun, 26 Sep 2010 14:16:36 -0400 Received: by wyb28 with SMTP id 28so3252064wyb.19 for ; Sun, 26 Sep 2010 11:16:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=EOTEDz7HGKX0LzyuFYoiw3hXgoKdPFtSZqHDDjrG4oU=; b=nKk/VQJKVNiD84uzebZG00WEWwciXD0v2nWBPv/XMFH0QKjkU452rb6V4EV262ty4q XrRVrOeICNea0rGXPg3hVk364/D7Wsu7D0dHaQ+yo+zRHI9TjaaHdAaDcxCUIougpU2/ WBFl1y/nx7ZoXiBDuZcIleeL7FpxCZXimKtg0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=rbWFTgWI5AVK/o+nsB4UppGxHDoNaUBdqqf0B7qzaYWR1v25wNm4KJnwkrwNU497LQ pI6YYliZcf6Db+I7qG9vGNntzxZXLy4egg+mAU1Ml2+3sDbAqWoSxGcEz5wEcfCNZEiB fEZAbsEqUqm4kSenW2pMdSiXez6fGWDAP6o+g= Received: by 10.216.4.19 with SMTP id 19mr5202800wei.110.1285524994344; Sun, 26 Sep 2010 11:16:34 -0700 (PDT) Received: from [10.64.64.65] (nat65.mia.three.co.uk [217.171.129.65]) by mx.google.com with ESMTPS id e56sm2974061wer.22.2010.09.26.11.16.31 (version=SSLv3 cipher=RC4-MD5); Sun, 26 Sep 2010 11:16:33 -0700 (PDT) Subject: Re: [PATCH] DiSEqC bug fixed for stv0288 based interfaces From: tvbox To: josef@pavlik.it Cc: linux-media@vger.kernel.org, Mauro Carvalho Chehab Date: Sun, 26 Sep 2010 19:16:20 +0100 Message-ID: <1285524980.6999.51.camel@canaries-desktop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 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 (demeter1.kernel.org [140.211.167.41]); Sun, 26 Sep 2010 18:16:39 +0000 (UTC) diff --git a/drivers/media/dvb/frontends/stv0288.c b/drivers/media/dvb/frontends/stv0288.c index 2930a5d..6cd442e 100644 --- a/drivers/media/dvb/frontends/stv0288.c +++ b/drivers/media/dvb/frontends/stv0288.c @@ -6,6 +6,8 @@ Copyright (C) 2008 Igor M. Liplianin Removed stb6000 specific tuner code and revised some procedures. + 2010-09-01 Josef Pavlik + Fixed diseqc_msg, diseqc_burst and set_tone problems This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -156,14 +158,13 @@ static int stv0288_send_diseqc_msg(struct dvb_frontend *fe, stv0288_writeregI(state, 0x09, 0); msleep(30); - stv0288_writeregI(state, 0x05, 0x16); + stv0288_writeregI(state, 0x05, 0x12);/* modulated mode, single shot */ for (i = 0; i < m->msg_len; i++) { if (stv0288_writeregI(state, 0x06, m->msg[i])) return -EREMOTEIO; - msleep(12); } - + msleep(m->msg_len*12); return 0; } @@ -174,13 +175,14 @@ static int stv0288_send_diseqc_burst(struct dvb_frontend *fe, dprintk("%s\n", __func__); - if (stv0288_writeregI(state, 0x05, 0x16))/* burst mode */ - return -EREMOTEIO; - - if (stv0288_writeregI(state, 0x06, burst == SEC_MINI_A ? 0x00 : 0xff)) + if (stv0288_writeregI(state, 0x05, 0x03))/* burst mode, single shot */ + return -EREMOTEIO; + + if (stv0288_writeregI(state, 0x06, burst == SEC_MINI_A ? 0x00 : 0xff)) return -EREMOTEIO; - if (stv0288_writeregI(state, 0x06, 0x12)) + msleep(15); + if (stv0288_writeregI(state, 0x05, 0x12)) return -EREMOTEIO; return 0; @@ -192,18 +194,19 @@ static int stv0288_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) switch (tone) { case SEC_TONE_ON: - if (stv0288_writeregI(state, 0x05, 0x10))/* burst mode */ + if (stv0288_writeregI(state, 0x05, 0x10))/* cont carrier */ return -EREMOTEIO; - return stv0288_writeregI(state, 0x06, 0xff); + break; case SEC_TONE_OFF: - if (stv0288_writeregI(state, 0x05, 0x13))/* burst mode */ + if (stv0288_writeregI(state, 0x05, 0x12))/* burst mode off*/ return -EREMOTEIO; - return stv0288_writeregI(state, 0x06, 0x00); + break; default: return -EINVAL; } + return 0; } static u8 stv0288_inittab[] = {