2021-12-10 12:59:24

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: [PATCH 0/3] media: si2157: do some minor improvements at the driver

The si21xx terrestrial tuners can support ISDB-T and DTMB (as it is really
just a tuner, and not a demod), but the missing settings are missing.

Some of the devices on this family also support bandwidth filters for 1.7 and 6.1.

Finally, si2158 and si2157 have identical APIs for analog TV. So, it makes
sense to also enable it for si2158.

Compile-tested only.

Mauro Carvalho Chehab (3):
media: si2157: add support for ISDB-T and DTMB
media: si2157: add support for 1.7MHz and 6.1 MHz
media: si2157: add ATV support for si2158

drivers/media/tuners/si2157.c | 12 +++++++++++-
drivers/media/tuners/si2157_priv.h | 8 ++++++++
2 files changed, 19 insertions(+), 1 deletion(-)

--
2.33.1




2021-12-10 12:59:25

by Mauro Carvalho Chehab

[permalink] [raw]
Subject: [PATCH 3/3] media: si2157: add ATV support for si2158

This device also supports ATV, as it has the same API for
setting analog TV tuning parameters.

Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---

To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH 0/3] at: https://lore.kernel.org/all/[email protected]/

drivers/media/tuners/si2157.c | 2 +-
drivers/media/tuners/si2157_priv.h | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index 2d3937af4f5f..481c5c3b577d 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -576,7 +576,7 @@ static int si2157_set_analog_params(struct dvb_frontend *fe,
u8 color = 0; /* 0=NTSC/PAL, 0x10=SECAM */
u8 invert_analog = 1; /* analog tuner spectrum; 0=normal, 1=inverted */

- if (dev->part_id != SI2157) {
+ if (!SUPPORTS_ATV_IF(dev)) {
dev_info(&client->dev, "Analog tuning not supported yet for Si21%d\n",
dev->part_id);
ret = -EINVAL;
diff --git a/drivers/media/tuners/si2157_priv.h b/drivers/media/tuners/si2157_priv.h
index 24849c8ed398..8579e80f7af7 100644
--- a/drivers/media/tuners/si2157_priv.h
+++ b/drivers/media/tuners/si2157_priv.h
@@ -71,6 +71,9 @@ struct si2157_cmd {
((dev)->part_id == SI2157) || \
((dev)->part_id == SI2177))

+#define SUPPORTS_ATV_IF(dev) (((dev)->part_id == SI2157) || \
+ ((dev)->part_id == SI2158))
+
/* Old firmware namespace */
#define SI2158_A20_FIRMWARE "dvb-tuner-si2158-a20-01.fw"
#define SI2141_A10_FIRMWARE "dvb-tuner-si2141-a10-01.fw"
--
2.33.1