All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brad Love <brad@nextdimension.cc>
To: linux-media@vger.kernel.org
Cc: Brad Love <brad@nextdimension.cc>
Subject: [PATCH v2 07/12] cx23885: Add analog tuner support to Hauppauge QuadHD
Date: Wed, 27 Feb 2019 12:27:41 -0600	[thread overview]
Message-ID: <1551292066-29574-8-git-send-email-brad@nextdimension.cc> (raw)
In-Reply-To: <1551292066-29574-1-git-send-email-brad@nextdimension.cc>

Add analog tuner frontend to 888 Hauppauge QuadHD boards

Signed-off-by: Brad Love <brad@nextdimension.cc>
---
No changes

 drivers/media/pci/cx23885/cx23885-cards.c | 32 +++++++++++++++++++++++++++----
 drivers/media/pci/cx23885/cx23885-dvb.c   | 20 +++++++++++++++++++
 drivers/media/pci/cx23885/cx23885-video.c |  8 +++++++-
 3 files changed, 55 insertions(+), 5 deletions(-)

diff --git a/drivers/media/pci/cx23885/cx23885-cards.c b/drivers/media/pci/cx23885/cx23885-cards.c
index ed3210d..774c6ea 100644
--- a/drivers/media/pci/cx23885/cx23885-cards.c
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
@@ -767,24 +767,48 @@ struct cx23885_board cx23885_boards[] = {
 		} },
 	},
 	[CX23885_BOARD_HAUPPAUGE_QUADHD_DVB] = {
-		.name        = "Hauppauge WinTV-QuadHD-DVB",
+		.name         = "Hauppauge WinTV-QuadHD-DVB",
+		.porta        = CX23885_ANALOG_VIDEO,
 		.portb        = CX23885_MPEG_DVB,
 		.portc        = CX23885_MPEG_DVB,
+		.tuner_type	= TUNER_ABSENT,
+		.force_bff	= 1,
+		.input          = {{
+			.type   = CX23885_VMUX_TELEVISION,
+			.vmux   =	CX25840_VIN7_CH3 |
+					CX25840_VIN5_CH2 |
+					CX25840_VIN2_CH1 |
+					CX25840_DIF_ON,
+			.amux   = CX25840_AUDIO8,
+		} },
 	},
 	[CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885] = {
-		.name       = "Hauppauge WinTV-QuadHD-DVB(885)",
+		.name         = "Hauppauge WinTV-QuadHD-DVB(885)",
 		.portb        = CX23885_MPEG_DVB,
 		.portc        = CX23885_MPEG_DVB,
+		.tuner_type   = TUNER_ABSENT,
 	},
 	[CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC] = {
-		.name        = "Hauppauge WinTV-QuadHD-ATSC",
+		.name         = "Hauppauge WinTV-QuadHD-ATSC",
+		.porta        = CX23885_ANALOG_VIDEO,
 		.portb        = CX23885_MPEG_DVB,
 		.portc        = CX23885_MPEG_DVB,
+		.tuner_type	= TUNER_ABSENT,
+		.force_bff	= 1,
+		.input          = {{
+			.type   = CX23885_VMUX_TELEVISION,
+			.vmux   =	CX25840_VIN7_CH3 |
+					CX25840_VIN5_CH2 |
+					CX25840_VIN2_CH1 |
+					CX25840_DIF_ON,
+			.amux   = CX25840_AUDIO8,
+		} },
 	},
 	[CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885] = {
-		.name       = "Hauppauge WinTV-QuadHD-ATSC(885)",
+		.name         = "Hauppauge WinTV-QuadHD-ATSC(885)",
 		.portb        = CX23885_MPEG_DVB,
 		.portc        = CX23885_MPEG_DVB,
+		.tuner_type   = TUNER_ABSENT,
 	},
 	[CX23885_BOARD_HAUPPAUGE_HVR1265_K4] = {
 		.name		= "Hauppauge WinTV-HVR-1265(161111)",
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
index 0d0929c..ee85c55 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -2382,6 +2382,16 @@ static int dvb_register(struct cx23885_tsport *port)
 				goto frontend_detach;
 			}
 			port->i2c_client_tuner = client_tuner;
+
+			/* we only attach tuner for analog on the 888 version */
+			if (dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_DVB) {
+				pr_info("%s(): QUADHD_DVB analog setup\n",
+					__func__);
+				dev->ts1.analog_fe.tuner_priv = client_tuner;
+				memcpy(&dev->ts1.analog_fe.ops.tuner_ops,
+					&fe0->dvb.frontend->ops.tuner_ops,
+					sizeof(struct dvb_tuner_ops));
+			}
 			break;
 
 		/* port c - terrestrial/cable */
@@ -2471,6 +2481,16 @@ static int dvb_register(struct cx23885_tsport *port)
 				goto frontend_detach;
 			}
 			port->i2c_client_tuner = client_tuner;
+
+			/* we only attach tuner for analog on the 888 version */
+			if (dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC) {
+				pr_info("%s(): QUADHD_ATSC analog setup\n",
+					__func__);
+				dev->ts1.analog_fe.tuner_priv = client_tuner;
+				memcpy(&dev->ts1.analog_fe.ops.tuner_ops,
+					&fe0->dvb.frontend->ops.tuner_ops,
+					sizeof(struct dvb_tuner_ops));
+			}
 			break;
 
 		/* port c - terrestrial/cable */
diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c
index 168178c..ed4ca1e 100644
--- a/drivers/media/pci/cx23885/cx23885-video.c
+++ b/drivers/media/pci/cx23885/cx23885-video.c
@@ -264,6 +264,8 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
 		(dev->board == CX23885_BOARD_HAUPPAUGE_HVR1255) ||
 		(dev->board == CX23885_BOARD_HAUPPAUGE_HVR1255_22111) ||
 		(dev->board == CX23885_BOARD_HAUPPAUGE_HVR1265_K4) ||
+		(dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC) ||
+		(dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_DVB) ||
 		(dev->board == CX23885_BOARD_HAUPPAUGE_HVR1850) ||
 		(dev->board == CX23885_BOARD_MYGICA_X8507) ||
 		(dev->board == CX23885_BOARD_AVERMEDIA_HC81R) ||
@@ -1012,7 +1014,9 @@ static int cx23885_set_freq_via_ops(struct cx23885_dev *dev,
 	if ((dev->board == CX23885_BOARD_HAUPPAUGE_HVR1850) ||
 	    (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1255) ||
 	    (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1255_22111) ||
-	    (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1265_K4))
+	    (dev->board == CX23885_BOARD_HAUPPAUGE_HVR1265_K4) ||
+	    (dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_DVB) ||
+	    (dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC))
 		fe = &dev->ts1.analog_fe;
 
 	if (fe && fe->ops.tuner_ops.set_analog_params) {
@@ -1043,6 +1047,8 @@ int cx23885_set_frequency(struct file *file, void *priv,
 	case CX23885_BOARD_HAUPPAUGE_HVR1255_22111:
 	case CX23885_BOARD_HAUPPAUGE_HVR1265_K4:
 	case CX23885_BOARD_HAUPPAUGE_HVR1850:
+	case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
+	case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC:
 		ret = cx23885_set_freq_via_ops(dev, f);
 		break;
 	default:
-- 
2.7.4


  parent reply	other threads:[~2019-02-27 18:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-29 17:51 [PATCH 00/13] si2157: Analog tuning and optimizations Brad Love
2018-12-29 17:51 ` [PATCH 01/13] si2157: Enable tuner status flags Brad Love
2018-12-29 17:51 ` [PATCH 02/13] si2157: Check error status bit on cmd execute Brad Love
2019-01-09 18:01   ` Antti Palosaari
2019-01-15 17:28     ` Brad Love
2018-12-29 17:51 ` [PATCH 03/13] si2157: Better check for running tuner in init Brad Love
2018-12-29 17:51 ` [PATCH 04/13] si2157: Add clock and pin setup for si2141 Brad Love
2019-01-20 17:17   ` Antti Palosaari
2019-01-22 17:10     ` Brad Love
2018-12-29 17:51 ` [PATCH 05/13] cx25840: Register labeling, chip specific correction Brad Love
2018-12-29 17:51 ` [PATCH 06/13] si2157: Add analog tuning related functions Brad Love
2018-12-29 17:51 ` [PATCH 07/13] si2157: Briefly wait for tuning operation to complete Brad Love
2019-04-05 10:29   ` Sean Young
2019-04-08 18:14     ` Brad Love
2019-04-08 20:55       ` Sean Young
2019-04-08 21:37         ` Brad Love
2019-04-10 14:48           ` Brad Love
2018-12-29 17:51 ` [PATCH 08/13] cx23885: Add analog tuner support to Hauppauge QuadHD Brad Love
2018-12-29 17:51 ` [PATCH 09/13] cx23885: Add analog tuner to 1265_K4 Brad Love
2018-12-29 17:51 ` [PATCH 11/13] cx23885: Add i2c device analog tuner support Brad Love
2018-12-29 17:51 ` [PATCH 10/13] cx231xx: " Brad Love
2018-12-29 17:51 ` [PATCH 12/13] si2157: add on-demand rf strength func Brad Love
2019-01-20 19:09   ` Antti Palosaari
2018-12-29 17:51 ` [PATCH 13/13] lgdt3306a: Add CNR v5 stat Brad Love
2019-02-27 18:27 ` [PATCH v2 00/13] si2157: Analog tuning and optimizations Brad Love
2019-02-27 18:27   ` [PATCH v2 01/12] si2157: Enable tuner status flags Brad Love
2019-02-27 18:27   ` [PATCH v2 02/12] si2157: Check error status bit on cmd execute Brad Love
2019-02-27 18:27   ` [PATCH v2 03/12] si2157: Better check for running tuner in init Brad Love
2019-02-27 18:27   ` [PATCH v2 04/12] cx25840: Register labeling, chip specific correction Brad Love
2019-02-27 18:27   ` [PATCH v2 05/12] si2157: Add analog tuning related functions Brad Love
2019-04-05 13:24     ` Sean Young
2019-04-08 18:18       ` Brad Love
2019-02-27 18:27   ` [PATCH v2 06/12] si2157: Briefly wait for tuning operation to complete Brad Love
2019-02-27 18:27   ` Brad Love [this message]
2019-02-27 18:27   ` [PATCH v2 08/12] cx23885: Add analog frontend to 1265_K4 Brad Love
2019-02-27 18:27   ` [PATCH v2 09/12] cx23885: Add i2c device analog tuner support Brad Love
2019-02-27 18:27   ` [PATCH v2 10/12] cx231xx: " Brad Love
2019-02-27 18:27   ` [PATCH v2 11/12] si2157: add on-demand rf strength func Brad Love
2019-02-27 18:27   ` [PATCH v2 12/12] lgdt3306a: Add CNR v5 stat Brad Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1551292066-29574-8-git-send-email-brad@nextdimension.cc \
    --to=brad@nextdimension.cc \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.