diff mbox series

media: si6157: fix a tune regression for 6.1MHz

Message ID 71025d9c4f8d37f23cf080ee69e1d583bf320e3e.1641498239.git.mchehab@kernel.org (mailing list archive)
State New, archived
Headers show
Series media: si6157: fix a tune regression for 6.1MHz | expand

Commit Message

Mauro Carvalho Chehab Jan. 6, 2022, 7:44 p.m. UTC
The patch which added support for 1.7MHz and 6.1 MHz has
two issues: there's a missing else for 1.7 and the value
for 6.1 MHz filter is decimal 10 (0x0a).

Fix those.

Reported-by: Robert Schlabbach <Robert.Schlabbach@gmx.net>
Fixes: 98c65a3dac95 ("media: si2157: add support for 1.7MHz and 6.1 MHz")
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 drivers/media/tuners/si2157.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Mauro Carvalho Chehab Jan. 6, 2022, 8:13 p.m. UTC | #1
Em Thu,  6 Jan 2022 20:44:29 +0100
Mauro Carvalho Chehab <mchehab@kernel.org> escreveu:

> The patch which added support for 1.7MHz and 6.1 MHz has
> two issues: there's a missing else for 1.7 and the value
> for 6.1 MHz filter is decimal 10 (0x0a).
> 
> Fix those.

Please ignore this one. I was too quick writing it: it doesn't
address all reported issues.

Regards,
Mauro
diff mbox series

Patch

diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index 481c5c3b577d..a484239333ef 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -460,10 +460,10 @@  static int si2157_set_params(struct dvb_frontend *fe)
 
 	if (SUPPORTS_1700KHz(dev) && c->bandwidth_hz <= 1700000)
 		bandwidth = 0x09;
-	if (c->bandwidth_hz <= 6000000)
+	else if (c->bandwidth_hz <= 6000000)
 		bandwidth = 0x06;
-	if (SUPPORTS_1700KHz(dev) && c->bandwidth_hz <= 6100000)
-		bandwidth = 0x10;
+	else if (SUPPORTS_1700KHz(dev) && c->bandwidth_hz <= 6100000)
+		bandwidth = 0x0a;
 	else if (c->bandwidth_hz <= 7000000)
 		bandwidth = 0x07;
 	else if (c->bandwidth_hz <= 8000000)