linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] smipcie: add support for TechnoTrend S2-4200 Twin
@ 2016-03-09 22:38 Olli Salonen
  2016-03-09 22:38 ` [PATCH 2/2] smipcie: MAC address printout formatting Olli Salonen
  2016-03-10  1:28 ` Nibble Max
  0 siblings, 2 replies; 3+ messages in thread
From: Olli Salonen @ 2016-03-09 22:38 UTC (permalink / raw)
  To: linux-media; +Cc: Olli Salonen

Add support for TechnoTrend TT-budget S2-4200 Twin DVB-S2 tuner. The
device seems to be rather similar to DVBSky S952 V3. This is a PCIe
card with 2 tuners. SMI PCIe bridge is used and the card has two 
Montage M88RS6000 demod/tuners.

The M88RS6000 demod/tuner package needs firmware. You can download
one here:
http://palosaari.fi/linux/v4l-dvb/firmware/M88RS6000/

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
---
 drivers/media/pci/smipcie/smipcie-ir.c   |  5 ++++-
 drivers/media/pci/smipcie/smipcie-main.c | 10 ++++++++++
 drivers/media/pci/smipcie/smipcie.h      |  1 +
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/drivers/media/pci/smipcie/smipcie-ir.c b/drivers/media/pci/smipcie/smipcie-ir.c
index d018673..d737b5e 100644
--- a/drivers/media/pci/smipcie/smipcie-ir.c
+++ b/drivers/media/pci/smipcie/smipcie-ir.c
@@ -203,7 +203,10 @@ int smi_ir_init(struct smi_dev *dev)
 	rc_dev->dev.parent = &dev->pci_dev->dev;
 
 	rc_dev->driver_type = RC_DRIVER_SCANCODE;
-	rc_dev->map_name = RC_MAP_DVBSKY;
+	if (dev->info->type == SMI_TECHNOTREND_S2_4200)
+		rc_dev->map_name = RC_MAP_TT_1500;
+	else
+		rc_dev->map_name = RC_MAP_DVBSKY;
 
 	ir->rc_dev = rc_dev;
 	ir->dev = dev;
diff --git a/drivers/media/pci/smipcie/smipcie-main.c b/drivers/media/pci/smipcie/smipcie-main.c
index b039a22..993a2d1 100644
--- a/drivers/media/pci/smipcie/smipcie-main.c
+++ b/drivers/media/pci/smipcie/smipcie-main.c
@@ -1086,6 +1086,15 @@ static struct smi_cfg_info dvbsky_t9580_cfg = {
 	.fe_1 = DVBSKY_FE_M88DS3103,
 };
 
+static struct smi_cfg_info technotrend_s2_4200_cfg = {
+	.type = SMI_TECHNOTREND_S2_4200,
+	.name = "TechnoTrend TT-budget S2-4200 Twin",
+	.ts_0 = SMI_TS_DMA_BOTH,
+	.ts_1 = SMI_TS_DMA_BOTH,
+	.fe_0 = DVBSKY_FE_M88RS6000,
+	.fe_1 = DVBSKY_FE_M88RS6000,
+};
+
 /* PCI IDs */
 #define SMI_ID(_subvend, _subdev, _driverdata) {	\
 	.vendor      = SMI_VID,    .device    = SMI_PID, \
@@ -1096,6 +1105,7 @@ static const struct pci_device_id smi_id_table[] = {
 	SMI_ID(0x4254, 0x0550, dvbsky_s950_cfg),
 	SMI_ID(0x4254, 0x0552, dvbsky_s952_cfg),
 	SMI_ID(0x4254, 0x5580, dvbsky_t9580_cfg),
+	SMI_ID(0x13c2, 0x3016, technotrend_s2_4200_cfg),
 	{0}
 };
 MODULE_DEVICE_TABLE(pci, smi_id_table);
diff --git a/drivers/media/pci/smipcie/smipcie.h b/drivers/media/pci/smipcie/smipcie.h
index 68cdda2..5528e48 100644
--- a/drivers/media/pci/smipcie/smipcie.h
+++ b/drivers/media/pci/smipcie/smipcie.h
@@ -216,6 +216,7 @@ struct smi_cfg_info {
 #define SMI_DVBSKY_S950         1
 #define SMI_DVBSKY_T9580        2
 #define SMI_DVBSKY_T982         3
+#define SMI_TECHNOTREND_S2_4200 4
 	int type;
 	char *name;
 #define SMI_TS_NULL             0
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] smipcie: MAC address printout formatting
  2016-03-09 22:38 [PATCH 1/2] smipcie: add support for TechnoTrend S2-4200 Twin Olli Salonen
@ 2016-03-09 22:38 ` Olli Salonen
  2016-03-10  1:28 ` Nibble Max
  1 sibling, 0 replies; 3+ messages in thread
From: Olli Salonen @ 2016-03-09 22:38 UTC (permalink / raw)
  To: linux-media; +Cc: Olli Salonen

Modify the printout for MAC address to be more vendor agnostic.
Print also the port number.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
---
 drivers/media/pci/smipcie/smipcie-main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/media/pci/smipcie/smipcie-main.c b/drivers/media/pci/smipcie/smipcie-main.c
index 993a2d1..4a9275a 100644
--- a/drivers/media/pci/smipcie/smipcie-main.c
+++ b/drivers/media/pci/smipcie/smipcie-main.c
@@ -716,7 +716,8 @@ static int smi_fe_init(struct smi_port *port)
 	/* init MAC.*/
 	ret = smi_read_eeprom(&dev->i2c_bus[0], 0xc0, mac_ee, 16);
 	dev_info(&port->dev->pci_dev->dev,
-		"DVBSky SMI PCIe MAC= %pM\n", mac_ee + (port->idx)*8);
+		"%s port %d MAC: %pM\n", dev->info->name,
+		port->idx, mac_ee + (port->idx)*8);
 	memcpy(adap->proposed_mac, mac_ee + (port->idx)*8, 6);
 	return ret;
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] smipcie: MAC address printout formatting
  2016-03-09 22:38 [PATCH 1/2] smipcie: add support for TechnoTrend S2-4200 Twin Olli Salonen
  2016-03-09 22:38 ` [PATCH 2/2] smipcie: MAC address printout formatting Olli Salonen
@ 2016-03-10  1:28 ` Nibble Max
  1 sibling, 0 replies; 3+ messages in thread
From: Nibble Max @ 2016-03-10  1:28 UTC (permalink / raw)
  To: Olli Salonen, linux-media; +Cc: Olli Salonen

Reviewed-by: Max Nibble<nibble.max@gmail.com>

On 2016-03-10 06:39:27, Olli Salonen <olli.salonen@iki.fi> wrote:
>Modify the printout for MAC address to be more vendor agnostic.
>Print also the port number.
>
>Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
>---
> drivers/media/pci/smipcie/smipcie-main.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/media/pci/smipcie/smipcie-main.c b/drivers/media/pci/smipcie/smipcie-main.c
>index 993a2d1..4a9275a 100644
>--- a/drivers/media/pci/smipcie/smipcie-main.c
>+++ b/drivers/media/pci/smipcie/smipcie-main.c
>@@ -716,7 +716,8 @@ static int smi_fe_init(struct smi_port *port)
> 	/* init MAC.*/
> 	ret = smi_read_eeprom(&dev->i2c_bus[0], 0xc0, mac_ee, 16);
> 	dev_info(&port->dev->pci_dev->dev,
>-		"DVBSky SMI PCIe MAC= %pM\n", mac_ee + (port->idx)*8);
>+		"%s port %d MAC: %pM\n", dev->info->name,
>+		port->idx, mac_ee + (port->idx)*8);
> 	memcpy(adap->proposed_mac, mac_ee + (port->idx)*8, 6);
> 	return ret;
> }
>-- 
>1.9.1
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-media" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-10  1:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-09 22:38 [PATCH 1/2] smipcie: add support for TechnoTrend S2-4200 Twin Olli Salonen
2016-03-09 22:38 ` [PATCH 2/2] smipcie: MAC address printout formatting Olli Salonen
2016-03-10  1:28 ` Nibble Max

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).