On Tue Mar 17 16:49:02 2026 -0500, Bradford Love wrote:
> Initialized and left to themselves some boards with analog inputs,
> on some modern platforms can throw critical errors which prevents
> even digital from working thereafter. If analog is never used this
> module parameter allows analog to be disabled on a card by card
> basis.
>
> It is already possible to disable analog audio.
>
> For example, to disable for Hauppauge QuadHD with analog functionality:
>
> options cx23885 disable_analog_video=56,57
>
> can be placed insode of /etc/modprobe.d/cx23885.conf
>
> Signed-off-by: Bradford Love <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/pci/cx23885/cx23885-cards.c | 3 +++
drivers/media/pci/cx23885/cx23885-core.c | 15 ++++++++++++++-
drivers/media/pci/cx23885/cx23885-dvb.c | 6 ++++--
drivers/media/pci/cx23885/cx23885.h | 1 +
4 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/drivers/media/pci/cx23885/cx23885-cards.c
b/drivers/media/pci/cx23885/cx23885-cards.c
index da23e7dfeef5..95a84709d5a6 100644
--- a/drivers/media/pci/cx23885/cx23885-cards.c
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
@@ -2443,6 +2443,9 @@ void cx23885_card_setup(struct cx23885_dev *dev)
case CX23885_BOARD_VIEWCAST_460E:
case CX23885_BOARD_AVERMEDIA_CE310B:
case CX23885_BOARD_AVERMEDIA_H789C:
+ if (dev->disable_analog)
+ break;
+
dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev,
&dev->i2c_bus[2].i2c_adap,
"cx25840", 0x88 >> 1, NULL);
diff --git a/drivers/media/pci/cx23885/cx23885-core.c
b/drivers/media/pci/cx23885/cx23885-core.c
index 0892a5fd137d..4a8af8b88d84 100644
--- a/drivers/media/pci/cx23885/cx23885-core.c
+++ b/drivers/media/pci/cx23885/cx23885-core.c
@@ -48,6 +48,11 @@ static unsigned int debug;
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "enable debug messages");
+static unsigned int disable_analog_video[8] = { 0, 0, 0, 0, 0, 0, 0, 0};
+static int disable_analog_argc;
+module_param_array(disable_analog_video, int, &disable_analog_argc, 0644);
+MODULE_PARM_DESC(disable_analog_video, "disable analog video for card type");
+
static unsigned int card[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET };
module_param_array(card, int, NULL, 0444);
MODULE_PARM_DESC(card, "card type");
@@ -924,6 +929,13 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
dev->board = CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885;
}
+ for (i = 0; i < disable_analog_argc; i++) {
+ if (disable_analog_video[i] == dev->board) {
+ pr_warn("Disabling analog for board %d\n", dev->board);
+ dev->disable_analog = 1;
+ }
+ }
+
/* If the user specific a clk freq override, apply it */
if (cx23885_boards[dev->board].clk_freq > 0)
dev->clk_freq = cx23885_boards[dev->board].clk_freq;
@@ -1043,7 +1055,8 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)
cx23885_gpio_enable(dev, 0x300, 0);
}
- if (cx23885_boards[dev->board].porta == CX23885_ANALOG_VIDEO) {
+ if (cx23885_boards[dev->board].porta == CX23885_ANALOG_VIDEO &&
+ !dev->disable_analog) {
if (cx23885_video_register(dev) < 0) {
pr_err("%s() Failed to register analog video adapters
on VID_A\n",
__func__);
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c
b/drivers/media/pci/cx23885/cx23885-dvb.c
index 05a7859cbe57..f240ccda40ed 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -2373,7 +2373,8 @@ static int dvb_register(struct cx23885_tsport *port)
port->i2c_client_tuner = client_tuner;
/* we only attach tuner for analog on the 888 version */
- if (dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_DVB) {
+ if (dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_DVB &&
+ !dev->disable_analog) {
pr_info("%s(): QUADHD_DVB analog setup\n",
__func__);
dev->ts1.analog_fe.tuner_priv = client_tuner;
@@ -2466,7 +2467,8 @@ static int dvb_register(struct cx23885_tsport *port)
port->i2c_client_tuner = client_tuner;
/* we only attach tuner for analog on the 888 version */
- if (dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC) {
+ if (dev->board == CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC &&
+ !dev->disable_analog) {
pr_info("%s(): QUADHD_ATSC analog setup\n",
__func__);
dev->ts1.analog_fe.tuner_priv = client_tuner;
diff --git a/drivers/media/pci/cx23885/cx23885.h
b/drivers/media/pci/cx23885/cx23885.h
index 8ba1f306238c..8653ee1d9ba6 100644
--- a/drivers/media/pci/cx23885/cx23885.h
+++ b/drivers/media/pci/cx23885/cx23885.h
@@ -404,6 +404,7 @@ struct cx23885_dev {
unsigned char radio_addr;
struct v4l2_subdev *sd_cx25840;
struct work_struct cx25840_work;
+ unsigned int disable_analog;
/* Infrared */
struct v4l2_subdev *sd_ir;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]