From patchwork Thu Jul 17 17:31:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Alves X-Patchwork-Id: 4577621 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 20A339F26C for ; Thu, 17 Jul 2014 17:31:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3DE522017D for ; Thu, 17 Jul 2014 17:31:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5AE7520160 for ; Thu, 17 Jul 2014 17:31:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751072AbaGQRbg (ORCPT ); Thu, 17 Jul 2014 13:31:36 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:63226 "EHLO mail-we0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750748AbaGQRbg (ORCPT ); Thu, 17 Jul 2014 13:31:36 -0400 Received: by mail-we0-f169.google.com with SMTP id u56so3460789wes.0 for ; Thu, 17 Jul 2014 10:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=4AzewTNqlb1/+2ZW1m58kiSOd470DpRKUrS+6uk8Cmg=; b=fuKl3ONX65qvWDzVccLKvKD1Hqv0e7E4NkoEdMXqmo/huSIBHCXXR253eFWbCAuLSF IqItagCRUZKrfF9JGZvY/00PL9jUJbUM9UWXplwEiKHq/4v7sWuf488fONcjO2Ev8T+p osMjf65tbbAXfikbGF/hseGBMqaDyWrAkkmETFVlUpCE67hA/dF5Y9DL1siEkXWpacGW 02aspoA+reSebIklL28s72K4xob9sUH034d/3Lv4uxbF/9SDNEO2gp2cLcRGAKma3r/X t/adiH/V9Fo6oFRHe4i1TlQpd4hX3ccxN38Axes2aqDx7cyoUXmkd7ZJ+OCR0sUxsYrp PwEQ== X-Received: by 10.194.109.170 with SMTP id ht10mr48200307wjb.72.1405618294023; Thu, 17 Jul 2014 10:31:34 -0700 (PDT) Received: from localhost.localdomain (a89-152-208-230.cpe.netcabo.pt. [89.152.208.230]) by mx.google.com with ESMTPSA id w6sm7627703wjr.4.2014.07.17.10.31.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jul 2014 10:31:33 -0700 (PDT) From: Luis Alves To: linux-media@vger.kernel.org Cc: crope@iki.fi, Luis Alves Subject: [PATCH 1/1] si2168: Set symbol_rate in set_frontend for DVB-C delivery system. Date: Thu, 17 Jul 2014 18:31:28 +0100 Message-Id: <1405618288-28317-1-git-send-email-ljalvs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds symbol rate setting to the driver. Signed-off-by: Luis Alves --- drivers/media/dvb-frontends/si2168.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 0422925..7980741 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -278,6 +278,18 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; + /* set DVB-C symbol rate */ + if (c->delivery_system == SYS_DVBC_ANNEX_A) { + memcpy(cmd.args, "\x14\x00\x02\x11", 4); + cmd.args[4] = (c->symbol_rate / 1000) & 0xff; + cmd.args[5] = ((c->symbol_rate / 1000) >> 8) & 0xff; + cmd.wlen = 6; + cmd.rlen = 4; + ret = si2168_cmd_execute(s, &cmd); + if (ret) + goto err; + } + memcpy(cmd.args, "\x14\x00\x0f\x10\x10\x00", 6); cmd.wlen = 6; cmd.rlen = 4;