From patchwork Mon Jan 22 17:13:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 10178913 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 6AE1D601D5 for ; Mon, 22 Jan 2018 17:13:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50B9E28210 for ; Mon, 22 Jan 2018 17:13:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4551B28421; Mon, 22 Jan 2018 17:13:59 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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 D6A2928210 for ; Mon, 22 Jan 2018 17:13:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751040AbeAVRN5 (ORCPT ); Mon, 22 Jan 2018 12:13:57 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:41220 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751087AbeAVRNz (ORCPT ); Mon, 22 Jan 2018 12:13:55 -0500 Received: by mail-wm0-f68.google.com with SMTP id f71so17717426wmf.0 for ; Mon, 22 Jan 2018 09:13:55 -0800 (PST) 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=j8wGaWuX9xS90o5VsqBJlOBPrC7UjzEMeOlCE1n20mw=; b=VOcU3JrxVe1HtAVfJsG76FJe4AI4Cky1ttSClTyRxi6RwG+nFh3q+CNGznse0R7sHd VVRd/4bTyRlpmvqozTc/Y+MUshs5UFM9r+V+CVvh/CxlV+gkZCipfPppR/qK5zj0ldSx izMn/1tt7ABuQE/o9fsHCe4XBmREX1MOLd+I5GrM31GhA6j1H/slAgPLOVl6ZngAdBm4 +ooioUTHNTArcoNbNXmCnhu1BBSUB0t1vy/1T07IkrkI4RNCzrZfuhkZbxGL6HJDYz9v 3Auq5/PxdNyGwXAfgHOAGCex5VWrHEoSPkP8qrfy5TckILnMKNGcQ5PJPv4czMiJP+QA FcNw== 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=j8wGaWuX9xS90o5VsqBJlOBPrC7UjzEMeOlCE1n20mw=; b=r52ee2gYNodIvnWNP1RSCBOZIaZgrFVOUcJ5q4zQSFFZWGGVZCz/sjLM+fI8t7XY4S 2VIWb8QBNDd1KhS3tyHjZZdEKfjKNs1cDxoDMyeS1uwNFrTk/miOznLtByxjLQRJvXy4 5IgnEiMcPvjV22C54tHdsHYmq/J6NlExTMFLjx+Ody2KdzizyRWYq7ODB1w/UPny0xER nWol7Q7Lu6GdlGbOP4uqRCPG5eKd4n+Ei5Ol2ZR/a2q7Fwh6zyRgZgsAsYT2GWBi8EKe Pkno1rmHCvFOvO5Gch62Np5AhhNWNypBHD8fnpJgluIfYlNfNU9QbKfmB7WyWoWzYBqx fvIg== X-Gm-Message-State: AKwxytf1MrH4+fmmQRp8rXgSOAXZKYoNxv/+0DnLZgeEt96iTNXfOjf8 IIiNsq8KweKTU0X5+/bzeQyCFw== X-Google-Smtp-Source: AH8x2247cDMOpXW6oDyS6iWNtOtx6zKpIiSJ/ShS25CImjiaVDmA6JA2sM/rFU2wTkmt8v/TBbqjgw== X-Received: by 10.28.206.12 with SMTP id e12mr6162973wmg.73.1516641234239; Mon, 22 Jan 2018 09:13:54 -0800 (PST) Received: from dvbdev.wuest.de (ip-84-118-193-200.unity-media.net. [84.118.193.200]) by smtp.gmail.com with ESMTPSA id z39sm13113986wrz.20.2018.01.22.09.13.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Jan 2018 09:13:53 -0800 (PST) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@s-opensource.com Cc: rascobie@slingshot.co.nz Subject: [PATCH v2 4/5] media: dvb-frontends/stv0910: report S2 rolloff in get_frontend() Date: Mon, 22 Jan 2018 18:13:45 +0100 Message-Id: <20180122171346.822-5-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180122171346.822-1-d.scheller.oss@gmail.com> References: <20180122171346.822-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 Report the currently used S2 rolloff factor in get_frontend(). For cosmetic reasons, also change all feroll_off occurences to fe_rolloff. Signed-off-by: Daniel Scheller --- drivers/media/dvb-frontends/stv0910.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c index de132a85e537..7ab014cec56c 100644 --- a/drivers/media/dvb-frontends/stv0910.c +++ b/drivers/media/dvb-frontends/stv0910.c @@ -113,7 +113,7 @@ struct stv { enum fe_stv0910_mod_cod mod_cod; enum dvbs2_fectype fectype; u32 pilots; - enum fe_stv0910_roll_off feroll_off; + enum fe_stv0910_roll_off fe_rolloff; int is_standard_broadcast; int is_vcm; @@ -541,7 +541,7 @@ static int get_signal_parameters(struct stv *state) } state->is_vcm = 0; state->is_standard_broadcast = 1; - state->feroll_off = FE_SAT_35; + state->fe_rolloff = FE_SAT_35; } return 0; } @@ -1300,14 +1300,14 @@ static int manage_matype_info(struct stv *state) read_regs(state, RSTV0910_P2_MATSTR1 + state->regoff, bbheader, 2); - state->feroll_off = + state->fe_rolloff = (enum fe_stv0910_roll_off)(bbheader[0] & 0x03); state->is_vcm = (bbheader[0] & 0x10) == 0; state->is_standard_broadcast = (bbheader[0] & 0xFC) == 0xF0; } else if (state->receive_mode == RCVMODE_DVBS) { state->is_vcm = 0; state->is_standard_broadcast = 1; - state->feroll_off = FE_SAT_35; + state->fe_rolloff = FE_SAT_35; } return 0; } @@ -1571,11 +1571,15 @@ static int get_frontend(struct dvb_frontend *fe, FEC_3_4, FEC_4_5, FEC_5_6, FEC_8_9, FEC_9_10 }; + const enum fe_rolloff ro2ro[4] = { + ROLLOFF_35, ROLLOFF_25, ROLLOFF_20, ROLLOFF_15, + }; read_reg(state, RSTV0910_P2_DMDMODCOD + state->regoff, &tmp); mc = ((tmp & 0x7c) >> 2); p->pilot = (tmp & 0x01) ? PILOT_ON : PILOT_OFF; p->modulation = modcod2mod[mc]; p->fec_inner = modcod2fec[mc]; + p->rolloff = ro2ro[state->fe_rolloff]; } else if (state->receive_mode == RCVMODE_DVBS) { read_reg(state, RSTV0910_P2_VITCURPUN + state->regoff, &tmp); switch (tmp & 0x1F) {