From patchwork Wed Jan 12 03:33:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Schlabbach X-Patchwork-Id: 531686 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCD80C433EF for ; Wed, 12 Jan 2022 03:33:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350325AbiALDdn (ORCPT ); Tue, 11 Jan 2022 22:33:43 -0500 Received: from mout.gmx.net ([212.227.17.20]:37661 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236491AbiALDdm (ORCPT ); Tue, 11 Jan 2022 22:33:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1641958421; bh=DDM57Gc4p9eLUXpc+kX6z5x7b+X/a+ASHYfFFcKMfbs=; h=X-UI-Sender-Class:From:To:Subject:Date; b=iL82EOzAJ/TB3R/h5hK1XSns0K3agWVLzgwZmsVw1T8CieN7wQXtZI9+bcTaYsN8W j0aksdBwmQGzlZJfDMJFC58K28watz1wDMm0W4HDAD5A1+2yJeTdxnnIkmIzDO+x84 6kUp1KtnZaSgi+1laYjjvry5QB2+QKBDq+S65AhE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [91.65.60.26] ([91.65.60.26]) by web-mail.gmx.net (3c-app-gmx-bap21.server.lan [172.19.172.91]) (via HTTP); Wed, 12 Jan 2022 04:33:41 +0100 MIME-Version: 1.0 Message-ID: From: Robert Schlabbach To: linux-media@vger.kernel.org Subject: [PATCH 1/1] media: dvb_frontend: add missing DSS switch cases Date: Wed, 12 Jan 2022 04:33:41 +0100 Importance: normal Sensitivity: Normal X-Priority: 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EuLS8Oam7iiaPDcmWk525UN/iJ64 +ngLRiQ+fU2m1LwcrFzfX0OMnn7R9mFWc6/zgV7OvVQGQREhXMFO8AM61Q09dSnrAiekS0+8x vhkMbW9 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org While the documentation mentions the delivery system DSS as a satellite system, it was missing from all but one switch statement in the DVB frontend code, leading to tuning failures, because the frequency was not correctly handled as being in kHz rather than Hz. Add the missing switch cases so that DSS is handled like the other satellite systems. For the rolloff, assume 0.20 as per one publication found via Internet search. Signed-off-by: Robert Schlabbach --- drivers/media/dvb-core/dvb_frontend.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.17.1 diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 48e735cdbe6b..d0955e0c86f7 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -918,6 +918,7 @@ static void dvb_frontend_get_frequency_limits(struct dvb_frontend *fe, /* If the standard is for satellite, convert frequencies to kHz */ switch (c->delivery_system) { + case SYS_DSS: case SYS_DVBS: case SYS_DVBS2: case SYS_TURBO: @@ -943,6 +944,7 @@ static u32 dvb_frontend_get_stepsize(struct dvb_frontend *fe) u32 step = max(fe_step, tuner_step); switch (c->delivery_system) { + case SYS_DSS: case SYS_DVBS: case SYS_DVBS2: case SYS_TURBO: @@ -974,6 +976,7 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe) /* range check: symbol rate */ switch (c->delivery_system) { + case SYS_DSS: case SYS_DVBS: case SYS_DVBS2: case SYS_TURBO: @@ -1040,6 +1043,10 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe) c->scrambling_sequence_index = 0;/* default sequence */ switch (c->delivery_system) { + case SYS_DSS: + c->modulation = QPSK; + c->rolloff = ROLLOFF_20; + break; case SYS_DVBS: case SYS_DVBS2: case SYS_TURBO: @@ -1821,6 +1828,7 @@ static void prepare_tuning_algo_parameters(struct dvb_frontend *fe) } else { /* default values */ switch (c->delivery_system) { + case SYS_DSS: case SYS_DVBS: case SYS_DVBS2: case SYS_ISDBS: @@ -2288,6 +2296,9 @@ static int dtv_set_frontend(struct dvb_frontend *fe) case SYS_DVBC_ANNEX_C: rolloff = 113; break; + case SYS_DSS: + rolloff = 120; + break; case SYS_DVBS: case SYS_TURBO: case SYS_ISDBS: