From patchwork Sat Jun 23 15:36:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 10483727 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 364B560230 for ; Sat, 23 Jun 2018 15:36:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39FD7288D1 for ; Sat, 23 Jun 2018 15:36:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EE0F289D1; Sat, 23 Jun 2018 15:36:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3632288D1 for ; Sat, 23 Jun 2018 15:36:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751765AbeFWPgl (ORCPT ); Sat, 23 Jun 2018 11:36:41 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:40277 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751708AbeFWPgf (ORCPT ); Sat, 23 Jun 2018 11:36:35 -0400 Received: by mail-wr0-f196.google.com with SMTP id g18-v6so9409703wro.7 for ; Sat, 23 Jun 2018 08:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=o0utgIHe/f01Lbbu1tpvQCpyd6WbMavrGOJH8CGMxJ8=; b=I06HOSBkVAf9XtNaNQ/Tt2q0CnR9kMq/WBWUgq6NxQyjflIF7q9jswroDb5v/52bmo IRKVL6oZOSAOlw4LvXrigC8vU84vG24GVlmPudQ5sBIcQFLf7X73FCKeMFSSmAbAzdSk sPAVy9ICSaQ40S91Cn5/w92f4vjdfobvrz1QskFDnJnMuqvt/tGyCcMKKe1pMAhYbmH0 KA5OX8L80LW6NSihmX1awuFSgrfOPajWUjlifRM0agZFGkbdMU+uNDOkszKiDcJihzrJ gtI/gLLldkTdW9r3bE4HDQQVLKEV9hPBHfigXHuAYxCquxWlZhJl1U7m5GviJBvpqRhF LOLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=o0utgIHe/f01Lbbu1tpvQCpyd6WbMavrGOJH8CGMxJ8=; b=IJ9ZPgczyschPsWmxAayuV2elDPsT3vKSzYgwZmS0dI0RVJiSYtETEhAW4fZlvrWJw GCAGOP8JuXCdnfy8Iaf/cMbYAeweMoW+pBUlZ7M/k01XJCDuHf794egRHahpy+BzJO6/ v5RoWVpn81yg36qXIevrKfJFPmvPvZUo3L/aFSOPwh0QeQrT/XBQ0oagensVuVXH0oxN 1kB7FAcWZm7S+XUF7NJb03zecQEKdPgqqzEYcwt9ipXv/PtvULwABeOEZ+s654YChuTL f4X0TLSvPb0x4VfD5VWLDxAqhM+XCifpsuuey58HNNpv8MutzfuiL8YwCAoqEg4KBW4A p7vA== X-Gm-Message-State: APt69E1EmcWZf3CAmQX/vMXvFgc3j/3sB+rURxModyRjZVu2N40JJlAS 7mNH1y8cjSePn+P044+oCAo= X-Google-Smtp-Source: AAOMgpfVnCwpfCTg0/0/bRxy1eRE1L0gBnSeoGqBIgdfgrlRUoUDr+KrPjwyiSngavRszH1I3CqnJw== X-Received: by 2002:adf:979c:: with SMTP id s28-v6mr5333280wrb.28.1529768194300; Sat, 23 Jun 2018 08:36:34 -0700 (PDT) Received: from dvbdev.wuest.de (ip-176-199-71-134.hsi06.unitymediagroup.de. [176.199.71.134]) by smtp.gmail.com with ESMTPSA id o15-v6sm3443156wrm.38.2018.06.23.08.36.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Jun 2018 08:36:33 -0700 (PDT) From: Daniel Scheller To: mchehab@kernel.org, mchehab@s-opensource.com Cc: linux-media@vger.kernel.org Subject: [PATCH 18/19] [media] ddbridge/sx8: enable modulation selection in set_parameters() Date: Sat, 23 Jun 2018 17:36:14 +0200 Message-Id: <20180623153615.27630-19-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20180623153615.27630-1-d.scheller.oss@gmail.com> References: <20180623153615.27630-1-d.scheller.oss@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Daniel Scheller Allow for tuning to transponders with specific modulations in set_parameters(). Setting a specific modulation will also enable lower modulations. Picked up from the upstream dddvb GIT. Upstream also has support for APSK64/128/256 modulations which aren't supported yet by the DVB API, so comment them out until support for them is added. Signed-off-by: Daniel Scheller --- drivers/media/pci/ddbridge/ddbridge-sx8.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/drivers/media/pci/ddbridge/ddbridge-sx8.c b/drivers/media/pci/ddbridge/ddbridge-sx8.c index c87cefa10762..4418604258d1 100644 --- a/drivers/media/pci/ddbridge/ddbridge-sx8.c +++ b/drivers/media/pci/ddbridge/ddbridge-sx8.c @@ -372,15 +372,31 @@ static int set_parameters(struct dvb_frontend *fe) if (iq_mode) ts_config = (SX8_TSCONFIG_TSHEADER | SX8_TSCONFIG_MODE_IQ); if (iq_mode < 3) { - u32 flags = 3; - u32 mask = 0x7f; - - if (p->modulation == APSK_16 || - p->modulation == APSK_32) { - flags = 2; + u32 mask; + + switch (p->modulation) { + /* uncomment whenever these modulations hit the DVB API + * case APSK_256: + * mask = 0x7f; + * break; + * case APSK_128: + * mask = 0x3f; + * break; + * case APSK_64: + * mask = 0x1f; + * break; + */ + case APSK_32: mask = 0x0f; + break; + case APSK_16: + mask = 0x07; + break; + default: + mask = 0x03; + break; } - stat = start(fe, flags, mask, ts_config); + stat = start(fe, 3, mask, ts_config); } else { u32 flags = (iq_mode == 2) ? 1 : 0;