Skip to content

Commit 98c65a3

Browse files
committed
media: si2157: add support for 1.7MHz and 6.1 MHz
Some tuners allow setting the bandwidth filter to 1.7MHz and 6.1 MHz. Add support for it upstream, as the narrower is the bandwidth filter, the better. Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 6446a22 commit 98c65a3

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

drivers/media/tuners/si2157.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,12 @@ static int si2157_set_params(struct dvb_frontend *fe)
458458
goto err;
459459
}
460460

461+
if (SUPPORTS_1700KHz(dev) && c->bandwidth_hz <= 1700000)
462+
bandwidth = 0x09;
461463
if (c->bandwidth_hz <= 6000000)
462464
bandwidth = 0x06;
465+
if (SUPPORTS_1700KHz(dev) && c->bandwidth_hz <= 6100000)
466+
bandwidth = 0x10;
463467
else if (c->bandwidth_hz <= 7000000)
464468
bandwidth = 0x07;
465469
else if (c->bandwidth_hz <= 8000000)

drivers/media/tuners/si2157_priv.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ struct si2157_cmd {
6666
unsigned rlen;
6767
};
6868

69+
#define SUPPORTS_1700KHz(dev) (((dev)->part_id == SI2141) || \
70+
((dev)->part_id == SI2147) || \
71+
((dev)->part_id == SI2157) || \
72+
((dev)->part_id == SI2177))
73+
6974
/* Old firmware namespace */
7075
#define SI2158_A20_FIRMWARE "dvb-tuner-si2158-a20-01.fw"
7176
#define SI2141_A10_FIRMWARE "dvb-tuner-si2141-a10-01.fw"

0 commit comments

Comments
 (0)