* [PATCH 0/8] FIXME: Assorted of missed bits from merge
@ 2018-03-06 19:14 Brad Love
2018-03-06 19:14 ` [PATCH 1/8] lgdt3306a: remove symbol count mismatch fix Brad Love
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: Brad Love @ 2018-03-06 19:14 UTC (permalink / raw)
To: linux-media; +Cc: Brad Love
Hello Mauro,
Here are the assorted bits and bobs that wound up missing
due to the patchwork snafu.
One new patch is:
- cx231xx: Set mfe_shared if second frontend found
Due to your suggestion in regards to the shared tuner logic.
I put the check in what seems like a sensical spot.
Brad Love (8):
lgdt3306a: remove symbol count mismatch fix
em28xx: Change hex to lower case
cx231xx: Use frontend i2c adapter with tuner
cx23885: Add tuner type and analog inputs to 1265
cx231xx: Set mfe_shared if second frontend found
cx231xx: Use constant instead of hard code for max
cx231xx: Add second i2c demod to Hauppauge 975
cx23885: Fix gpio on Hauppauge QuadHD PCIe cards
drivers/media/dvb-frontends/lgdt3306a.c | 10 ++----
drivers/media/pci/cx23885/cx23885-cards.c | 20 +++++++++--
drivers/media/usb/cx231xx/cx231xx-cards.c | 1 +
drivers/media/usb/cx231xx/cx231xx-dvb.c | 60 ++++++++++++++++++++++++++++---
drivers/media/usb/em28xx/em28xx-core.c | 2 +-
5 files changed, 77 insertions(+), 16 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/8] lgdt3306a: remove symbol count mismatch fix
2018-03-06 19:14 [PATCH 0/8] FIXME: Assorted of missed bits from merge Brad Love
@ 2018-03-06 19:14 ` Brad Love
2018-03-06 19:14 ` [PATCH 2/8] em28xx: Change hex to lower case Brad Love
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Brad Love @ 2018-03-06 19:14 UTC (permalink / raw)
To: linux-media; +Cc: Brad Love
This symbol mismatch is handled by NULL'ing out the release
callback if the driver is loaded as an i2c device.
This patch reverts:
- 94448e21cf08b10f7dc7acdaca387594370396b0
- 835d66173a38538c072a7c393d02360dcfac8582
The symbol count mismatch is handled by:
- 5b3a8e906973540b61dbf402c6b6f8d64d4ae119
Signed-off-by: Brad Love <brad@nextdimension.cc>
---
drivers/media/dvb-frontends/lgdt3306a.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/drivers/media/dvb-frontends/lgdt3306a.c
index 5b19033..7eb4e14 100644
--- a/drivers/media/dvb-frontends/lgdt3306a.c
+++ b/drivers/media/dvb-frontends/lgdt3306a.c
@@ -1814,13 +1814,7 @@ static void lgdt3306a_release(struct dvb_frontend *fe)
struct lgdt3306a_state *state = fe->demodulator_priv;
dbg_info("\n");
-
- /*
- * If state->muxc is not NULL, then we are an i2c device
- * and lgdt3306a_remove will clean up state
- */
- if (!state->muxc)
- kfree(state);
+ kfree(state);
}
static const struct dvb_frontend_ops lgdt3306a_ops;
@@ -2221,7 +2215,7 @@ static int lgdt3306a_probe(struct i2c_client *client,
sizeof(struct lgdt3306a_config));
config->i2c_addr = client->addr;
- fe = dvb_attach(lgdt3306a_attach, config, client->adapter);
+ fe = lgdt3306a_attach(config, client->adapter);
if (fe == NULL) {
ret = -ENODEV;
goto err_fe;
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/8] em28xx: Change hex to lower case
2018-03-06 19:14 [PATCH 0/8] FIXME: Assorted of missed bits from merge Brad Love
2018-03-06 19:14 ` [PATCH 1/8] lgdt3306a: remove symbol count mismatch fix Brad Love
@ 2018-03-06 19:14 ` Brad Love
2018-03-06 19:14 ` [PATCH 3/8] cx231xx: Use frontend i2c adapter with tuner Brad Love
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Brad Love @ 2018-03-06 19:14 UTC (permalink / raw)
To: linux-media; +Cc: Brad Love
Checkpatch fix.
Signed-off-by: Brad Love <brad@nextdimension.cc>
---
drivers/media/usb/em28xx/em28xx-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c
index bb1b650..36d341f 100644
--- a/drivers/media/usb/em28xx/em28xx-core.c
+++ b/drivers/media/usb/em28xx/em28xx-core.c
@@ -643,7 +643,7 @@ int em28xx_capture_start(struct em28xx *dev, int start)
em28xx_write_reg(dev, (dev->ts == PRIMARY_TS) ?
EM2874_R5D_TS1_PKT_SIZE :
EM2874_R5E_TS2_PKT_SIZE,
- 0xFF);
+ 0xff);
} else {
/* ISOC Maximum Transfer Size = 188 * 5 */
em28xx_write_reg(dev, (dev->ts == PRIMARY_TS) ?
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/8] cx231xx: Use frontend i2c adapter with tuner
2018-03-06 19:14 [PATCH 0/8] FIXME: Assorted of missed bits from merge Brad Love
2018-03-06 19:14 ` [PATCH 1/8] lgdt3306a: remove symbol count mismatch fix Brad Love
2018-03-06 19:14 ` [PATCH 2/8] em28xx: Change hex to lower case Brad Love
@ 2018-03-06 19:14 ` Brad Love
2018-03-06 19:14 ` [PATCH 4/8] cx23885: Add tuner type and analog inputs to 1265 Brad Love
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Brad Love @ 2018-03-06 19:14 UTC (permalink / raw)
To: linux-media; +Cc: Brad Love
Utilize the i2c mux adapter returned by the frontend.
Signed-off-by: Brad Love <brad@nextdimension.cc>
---
drivers/media/usb/cx231xx/cx231xx-dvb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index 63deca9..c3b2d69 100644
--- a/drivers/media/usb/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c
@@ -1221,7 +1221,7 @@ static int dvb_init(struct cx231xx *dev)
info.platform_data = &si2157_config;
request_module("si2157");
- client = i2c_new_device(tuner_i2c, &info);
+ client = i2c_new_device(adapter, &info);
if (client == NULL || client->dev.driver == NULL) {
module_put(dvb->i2c_client_demod[0]->dev.driver->owner);
i2c_unregister_device(dvb->i2c_client_demod[0]);
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/8] cx23885: Add tuner type and analog inputs to 1265
2018-03-06 19:14 [PATCH 0/8] FIXME: Assorted of missed bits from merge Brad Love
` (2 preceding siblings ...)
2018-03-06 19:14 ` [PATCH 3/8] cx231xx: Use frontend i2c adapter with tuner Brad Love
@ 2018-03-06 19:14 ` Brad Love
2018-03-06 19:14 ` [PATCH 5/8] cx231xx: Set mfe_shared if second frontend found Brad Love
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Brad Love @ 2018-03-06 19:14 UTC (permalink / raw)
To: linux-media; +Cc: Brad Love
Missing composite and s-video inputs
Signed-off-by: Brad Love <brad@nextdimension.cc>
---
drivers/media/pci/cx23885/cx23885-cards.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/media/pci/cx23885/cx23885-cards.c b/drivers/media/pci/cx23885/cx23885-cards.c
index 831b066..5a64098 100644
--- a/drivers/media/pci/cx23885/cx23885-cards.c
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
@@ -788,8 +788,24 @@ struct cx23885_board cx23885_boards[] = {
},
[CX23885_BOARD_HAUPPAUGE_HVR1265_K4] = {
.name = "Hauppauge WinTV-HVR-1265(161111)",
+ .porta = CX23885_ANALOG_VIDEO,
.portc = CX23885_MPEG_DVB,
+ .tuner_type = TUNER_ABSENT,
.force_bff = 1,
+ .input = {{
+ .type = CX23885_VMUX_COMPOSITE1,
+ .vmux = CX25840_VIN7_CH3 |
+ CX25840_VIN4_CH2 |
+ CX25840_VIN6_CH1,
+ .amux = CX25840_AUDIO7,
+ }, {
+ .type = CX23885_VMUX_SVIDEO,
+ .vmux = CX25840_VIN7_CH3 |
+ CX25840_VIN4_CH2 |
+ CX25840_VIN8_CH1 |
+ CX25840_SVIDEO_ON,
+ .amux = CX25840_AUDIO7,
+ } },
},
[CX23885_BOARD_HAUPPAUGE_STARBURST2] = {
.name = "Hauppauge WinTV-Starburst2",
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/8] cx231xx: Set mfe_shared if second frontend found
2018-03-06 19:14 [PATCH 0/8] FIXME: Assorted of missed bits from merge Brad Love
` (3 preceding siblings ...)
2018-03-06 19:14 ` [PATCH 4/8] cx23885: Add tuner type and analog inputs to 1265 Brad Love
@ 2018-03-06 19:14 ` Brad Love
2018-03-06 19:15 ` [PATCH 6/8] cx231xx: Use constant instead of hard code for max Brad Love
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Brad Love @ 2018-03-06 19:14 UTC (permalink / raw)
To: linux-media; +Cc: Brad Love
If frontend[1] exists, then enable the dvb adapter mfe lock system.
Signed-off-by: Brad Love <brad@nextdimension.cc>
---
drivers/media/usb/cx231xx/cx231xx-dvb.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index c3b2d69..9d326a0 100644
--- a/drivers/media/usb/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c
@@ -504,6 +504,9 @@ static int register_dvb(struct cx231xx_dvb *dvb,
dev->name, result);
goto fail_frontend1;
}
+
+ /* MFE lock */
+ dvb->adapter.mfe_shared = 1;
}
/* register demux stuff */
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 6/8] cx231xx: Use constant instead of hard code for max
2018-03-06 19:14 [PATCH 0/8] FIXME: Assorted of missed bits from merge Brad Love
` (4 preceding siblings ...)
2018-03-06 19:14 ` [PATCH 5/8] cx231xx: Set mfe_shared if second frontend found Brad Love
@ 2018-03-06 19:15 ` Brad Love
2018-03-06 19:15 ` [PATCH 7/8] cx231xx: Add second i2c demod to Hauppauge 975 Brad Love
2018-03-06 19:15 ` [PATCH 8/8] cx23885: Fix gpio on Hauppauge QuadHD PCIe cards Brad Love
7 siblings, 0 replies; 9+ messages in thread
From: Brad Love @ 2018-03-06 19:15 UTC (permalink / raw)
To: linux-media; +Cc: Brad Love
Nit regarding hard coded value.
Signed-off-by: Brad Love <brad@nextdimension.cc>
---
drivers/media/usb/cx231xx/cx231xx-dvb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index 9d326a0..21e7817 100644
--- a/drivers/media/usb/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c
@@ -53,9 +53,10 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
#define CX231XX_DVB_NUM_BUFS 5
#define CX231XX_DVB_MAX_PACKETSIZE 564
#define CX231XX_DVB_MAX_PACKETS 64
+#define CX231XX_DVB_MAX_FRONTENDS 2
struct cx231xx_dvb {
- struct dvb_frontend *frontend[2];
+ struct dvb_frontend *frontend[CX231XX_DVB_MAX_FRONTENDS];
/* feed count management */
struct mutex lock;
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 7/8] cx231xx: Add second i2c demod to Hauppauge 975
2018-03-06 19:14 [PATCH 0/8] FIXME: Assorted of missed bits from merge Brad Love
` (5 preceding siblings ...)
2018-03-06 19:15 ` [PATCH 6/8] cx231xx: Use constant instead of hard code for max Brad Love
@ 2018-03-06 19:15 ` Brad Love
2018-03-06 19:15 ` [PATCH 8/8] cx23885: Fix gpio on Hauppauge QuadHD PCIe cards Brad Love
7 siblings, 0 replies; 9+ messages in thread
From: Brad Love @ 2018-03-06 19:15 UTC (permalink / raw)
To: linux-media; +Cc: Brad Love
Hauppauge HVR-975 is a hybrid, dual frontend, single tuner USB device.
It contains lgdt3306a and si2168 frontends and one si2157 tuner. The
lgdt3306a frontend is currently enabled. This creates the second
demodulator and attaches it to the tuner.
Enables lgdt3306a|si2168 + si2157
Signed-off-by: Brad Love <brad@nextdimension.cc>
---
drivers/media/usb/cx231xx/cx231xx-cards.c | 1 +
drivers/media/usb/cx231xx/cx231xx-dvb.c | 52 +++++++++++++++++++++++++++++--
2 files changed, 50 insertions(+), 3 deletions(-)
diff --git a/drivers/media/usb/cx231xx/cx231xx-cards.c b/drivers/media/usb/cx231xx/cx231xx-cards.c
index 8582568..00e88a8f 100644
--- a/drivers/media/usb/cx231xx/cx231xx-cards.c
+++ b/drivers/media/usb/cx231xx/cx231xx-cards.c
@@ -979,6 +979,7 @@ struct cx231xx_board cx231xx_boards[] = {
.demod_i2c_master = I2C_1_MUX_3,
.has_dvb = 1,
.demod_addr = 0x59, /* 0xb2 >> 1 */
+ .demod_addr2 = 0x64, /* 0xc8 >> 1 */
.norm = V4L2_STD_ALL,
.input = {{
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index 21e7817..72f83d0 100644
--- a/drivers/media/usb/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c
@@ -1177,14 +1177,17 @@ static int dvb_init(struct cx231xx *dev)
{
struct i2c_client *client;
struct i2c_adapter *adapter;
+ struct i2c_adapter *adapter2;
struct i2c_board_info info = {};
struct si2157_config si2157_config = {};
struct lgdt3306a_config lgdt3306a_config = {};
+ struct si2168_config si2168_config = {};
- /* attach demodulator chip */
+ /* attach first demodulator chip */
lgdt3306a_config = hauppauge_955q_lgdt3306a_config;
lgdt3306a_config.fe = &dev->dvb->frontend[0];
lgdt3306a_config.i2c_adapter = &adapter;
+ lgdt3306a_config.deny_i2c_rptr = 0;
strlcpy(info.type, "lgdt3306a", sizeof(info.type));
info.addr = dev->board.demod_addr;
@@ -1206,10 +1209,43 @@ static int dvb_init(struct cx231xx *dev)
}
dvb->i2c_client_demod[0] = client;
- dev->dvb->frontend[0]->ops.i2c_gate_ctrl = NULL;
+
+ /* attach second demodulator chip */
+ si2168_config.ts_mode = SI2168_TS_SERIAL;
+ si2168_config.fe = &dev->dvb->frontend[1];
+ si2168_config.i2c_adapter = &adapter2;
+ si2168_config.ts_clock_inv = true;
+
+ memset(&info, 0, sizeof(struct i2c_board_info));
+ strlcpy(info.type, "si2168", sizeof(info.type));
+ info.addr = dev->board.demod_addr2;
+ info.platform_data = &si2168_config;
+
+ request_module(info.type);
+ client = i2c_new_device(adapter, &info);
+ if (client == NULL || client->dev.driver == NULL) {
+ dev_err(dev->dev,
+ "Failed to attach %s frontend.\n", info.type);
+ module_put(dvb->i2c_client_demod[0]->dev.driver->owner);
+ i2c_unregister_device(dvb->i2c_client_demod[0]);
+ result = -ENODEV;
+ goto out_free;
+ }
+
+ if (!try_module_get(client->dev.driver->owner)) {
+ i2c_unregister_device(client);
+ module_put(dvb->i2c_client_demod[0]->dev.driver->owner);
+ i2c_unregister_device(dvb->i2c_client_demod[0]);
+ result = -ENODEV;
+ goto out_free;
+ }
+
+ dvb->i2c_client_demod[1] = client;
+ dvb->frontend[1]->id = 1;
/* define general-purpose callback pointer */
dvb->frontend[0]->callback = cx231xx_tuner_callback;
+ dvb->frontend[1]->callback = cx231xx_tuner_callback;
/* attach tuner */
si2157_config.fe = dev->dvb->frontend[0];
@@ -1227,6 +1263,8 @@ static int dvb_init(struct cx231xx *dev)
client = i2c_new_device(adapter, &info);
if (client == NULL || client->dev.driver == NULL) {
+ module_put(dvb->i2c_client_demod[1]->dev.driver->owner);
+ i2c_unregister_device(dvb->i2c_client_demod[1]);
module_put(dvb->i2c_client_demod[0]->dev.driver->owner);
i2c_unregister_device(dvb->i2c_client_demod[0]);
result = -ENODEV;
@@ -1237,6 +1275,8 @@ static int dvb_init(struct cx231xx *dev)
dev_err(dev->dev,
"Failed to obtain %s tuner.\n", info.type);
i2c_unregister_device(client);
+ module_put(dvb->i2c_client_demod[1]->dev.driver->owner);
+ i2c_unregister_device(dvb->i2c_client_demod[1]);
module_put(dvb->i2c_client_demod[0]->dev.driver->owner);
i2c_unregister_device(dvb->i2c_client_demod[0]);
result = -ENODEV;
@@ -1244,7 +1284,13 @@ static int dvb_init(struct cx231xx *dev)
}
dev->cx231xx_reset_analog_tuner = NULL;
- dev->dvb->i2c_client_tuner = client;
+ dvb->i2c_client_tuner = client;
+
+ dvb->frontend[1]->tuner_priv = dvb->frontend[0]->tuner_priv;
+
+ memcpy(&dvb->frontend[1]->ops.tuner_ops,
+ &dvb->frontend[0]->ops.tuner_ops,
+ sizeof(struct dvb_tuner_ops));
break;
}
default:
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 8/8] cx23885: Fix gpio on Hauppauge QuadHD PCIe cards
2018-03-06 19:14 [PATCH 0/8] FIXME: Assorted of missed bits from merge Brad Love
` (6 preceding siblings ...)
2018-03-06 19:15 ` [PATCH 7/8] cx231xx: Add second i2c demod to Hauppauge 975 Brad Love
@ 2018-03-06 19:15 ` Brad Love
7 siblings, 0 replies; 9+ messages in thread
From: Brad Love @ 2018-03-06 19:15 UTC (permalink / raw)
To: linux-media; +Cc: Brad Love
Bug fix for gpios
Signed-off-by: Brad Love <brad@nextdimension.cc>
---
drivers/media/pci/cx23885/cx23885-cards.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/pci/cx23885/cx23885-cards.c b/drivers/media/pci/cx23885/cx23885-cards.c
index 5a64098..41f5669 100644
--- a/drivers/media/pci/cx23885/cx23885-cards.c
+++ b/drivers/media/pci/cx23885/cx23885-cards.c
@@ -1828,8 +1828,6 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
cx23885_gpio_set(dev, GPIO_2);
break;
case CX23885_BOARD_HAUPPAUGE_HVR5525:
- case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
- case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC:
case CX23885_BOARD_HAUPPAUGE_STARBURST2:
/*
* HVR5525 GPIO Details:
@@ -1861,7 +1859,9 @@ void cx23885_gpio_setup(struct cx23885_dev *dev)
*/
break;
case CX23885_BOARD_HAUPPAUGE_HVR1265_K4:
+ case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB:
case CX23885_BOARD_HAUPPAUGE_QUADHD_DVB_885:
+ case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC:
case CX23885_BOARD_HAUPPAUGE_QUADHD_ATSC_885:
/*
* GPIO-08 TER1_RESN
--
2.7.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-03-06 19:15 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-06 19:14 [PATCH 0/8] FIXME: Assorted of missed bits from merge Brad Love
2018-03-06 19:14 ` [PATCH 1/8] lgdt3306a: remove symbol count mismatch fix Brad Love
2018-03-06 19:14 ` [PATCH 2/8] em28xx: Change hex to lower case Brad Love
2018-03-06 19:14 ` [PATCH 3/8] cx231xx: Use frontend i2c adapter with tuner Brad Love
2018-03-06 19:14 ` [PATCH 4/8] cx23885: Add tuner type and analog inputs to 1265 Brad Love
2018-03-06 19:14 ` [PATCH 5/8] cx231xx: Set mfe_shared if second frontend found Brad Love
2018-03-06 19:15 ` [PATCH 6/8] cx231xx: Use constant instead of hard code for max Brad Love
2018-03-06 19:15 ` [PATCH 7/8] cx231xx: Add second i2c demod to Hauppauge 975 Brad Love
2018-03-06 19:15 ` [PATCH 8/8] cx23885: Fix gpio on Hauppauge QuadHD PCIe cards Brad Love
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).