Re: [PATCH] media: cx231xx: fix si2157 inversion for Hauppauge WinTV-HVR-935C
Dimitris Kerasiotis <[email protected]>
| Newsgroups | org.kernel.vger.linux-media |
|---|---|
| Message-ID | <CADSHN4hwhycAqVoH=QCL+Of4wPmz8Tpy=Ja=3rZar1e+-CxLuQ@mail.gmail.com> |
Hi Brad, I extracted the 4.0.11 firmware from your linux-firmware-hauppauge package (md5 matches yours: b2670d8ae5e3369fc71edbb98cdd8f6e), restored the stock unpatched module (inversion = true), and the result is an immediate, clean lock: Lock (0x1f) Signal= -49 dBm C/N= 37 dB UCB= 0 postBER= 0 dmesg confirms: firmware version: B 4.0.11 So the mainline driver is correct as-is, and the problem was entirely the firmware I had installed: the 4.0.25 build distributed in the LibreELEC dvb-firmware repository does not lock with inversion = true on this device — my patch was unknowingly compensating for that. Please consider the patch withdrawn. Hans, apologies for the noise, and thanks for routing this to the right person. One thought: since the LibreELEC repo is one of the first search hits for this firmware file, other users may hit the same silent failure. If there is a canonical location you'd like people directed to for the 4.0.11 file, I'd be happy to report the incompatibility to the LibreELEC dvb-firmware maintainers as well. Thanks again for taking the time to set up the generator and test — much appreciated. Kind regards, Dimitris On Sat, Jul 25, 2026 at 1:33 AM Bradford Love <[email protected]> wrote: > > Hi Dimitris, > > The 975 is the "full" build with two demods. The other two devices > only have one demod populated, if you open yours you'll see a spot for > the atsc demod. > > I configured my generator for your exact parameters, I find channels > whether I set my generator to invert RF or not. I tested 6, 7, and 8 > MHz bandwidths to be sure. > > What I do notice is that your firmware file is not the same version as > what we supply. > > $ md5sum /lib/firmware/dvb-demod-si2168-b40-01.fw > b2670d8ae5e3369fc71edbb98cdd8f6e /lib/firmware/dvb-demod-si2168-b40-01.fw > > dmesg reports: > > si2168 14-0064: firmware version: B 4.0.11 > > I would suggest finding and trying firmware 4.0.11 and reporting back. > I'm user ~b-rad on launchpad.net, you're welcome to extract it from my > linux-firmware-hauppauge package. I have not tested against 4.0.25 and > cannot verify that firmware works with our devices. > > Regards, > > Bradford > > > > > > > On Fri, Jul 24, 2026 at 4:11 AM Dimitris Kerasiotis > <[email protected]> wrote: > > > > Hi Bradford, > > > > Thanks a lot for testing — and for the 975 ATSC data point, that's very > > useful. > > > > Here are the exact parameters of the muxes I'm receiving (Athens, Greece, > > Hymettus transmitter). All of them are plain DVB-T, no DVB-T2 in use here > > for the main national muxes: > > > > Bandwidth: 8 MHz > > Constellation: 64-QAM > > Transmission mode: 8K > > Guard interval: 1/4 > > Hierarchy: none > > Code rate (HP): 3/4 on the DIGEA muxes, 2/3 on the ERT muxes > > > > Frequencies (all locked with inversion = false): > > 474 MHz (ERT) 482 MHz (DIGEA) 498 MHz (DIGEA) > > 522 MHz (DIGEA) 530 MHz (ERT) 546 MHz (DIGEA) > > 554 MHz (DIGEA) 578 MHz (DIGEA) > > > > Signal on the strongest mux (522 MHz), rooftop antenna: > > -48 dBm, C/N 33-38 dB, UCB 0, postBER 0, PER 0. > > > > With inversion = true the same mux never gets past > > FE_HAS_SIGNAL | FE_HAS_CARRIER (status 0x03) at that same signal level. > > > > One thing that may be relevant to reproducing this: my unit's Si2168-B40 > > ships with ROM firmware B 4.0.2, and with that firmware the demod reports > > 0.00 dBm on every frequency — no carrier detection at all. I had to add > > dvb-demod-si2168-b40-01.fw (which brings it to B 4.0.25) before I got any > > signal readings at all. The inversion issue only became visible after > > that. If your test units load a different demod firmware, that might > > explain part of the difference. > > > > On the 975 result: looking at the driver, the 975 attaches both lgdt3306a > > and si2168 to a single si2157, so the inversion flag is shared between > > the ATSC and DVB-T frontends. The 935C is si2168-only. It may be worth > > noting that the only other si2168-only board in cx231xx-dvb.c, the > > Evromedia Full Hybrid Full HD, already uses inversion = false, while the > > lgdt3306a and si2165 boards all use true. That made me wonder whether the > > correct value is really demod-dependent rather than board-dependent. > > > > If that's the case, a question that would settle it: on your 975, does > > DVB-T lock reliably with inversion = true? If DVB-T is also marginal > > there, the 975 may need the flag set per frontend rather than per board. > > > > Caveats on my side: I only have one unit (model 111519, rev G2I6) and I > > have only tested DVB-T — no DVB-C or DVB-T2 here to try. > > > > I'm happy to run any test you'd like on this unit, or to respin the patch > > in whatever form you and Hans prefer — gated on the eeprom revision, or > > reworked so the 975 keeps true for ATSC while si2168 gets false. > > > > Kind regards, > > Dimitris > > > > On Fri, Jul 24, 2026 at 1:48 AM Bradford Love <[email protected]> wrote: > > > > > > Hi Dimitris, > > > > > > I am testing this and investigating. I don't have a 935, but I have 955 and 975 of all revisions. The "family" consists of those three. Your finding would affect both 935 and 975. > > > > > > I will confirm that your patch does break atsc when using dvbv5-scan on a 975, so while as is I imagine it's ok for 935's setup, there is something else going on. The device you're using has been in production a very long time, and you're the first to report such issue. It's just odd. I'm going to talk with hardware lead about exact revision changes. I need to reach out to our European support as well to have them test. > > > > > > Can you by chance give me your exact parameters so I can set my generator up as close as possible to your Greek stations? Granted I don't have a dvbt2 generator, but there may be one in the main office. When I set my dvbt generator up the rf output setting does not matter, both normal and inverted work without issue when switching between for dvbt. > > > > > > Kind regards, > > > > > > Bradford > > > > > > > > > > > > On Tue, Jul 21, 2026, 12:30 Dimitris Kerasiotis <[email protected]> wrote: > > >> > > >> Hi Hans, Brad, > > >> > > >> Thanks for looking at this. > > >> > > >> I can only confirm the behaviour on my own unit: Hauppauge model > > >> 111519, rev G2I6 (USB ID 2040:b151), tuner reported as Si2157-A30. > > >> With inversion = true it never locks on any DVB-T mux, briefly showing > > >> FE_HAS_SIGNAL | FE_HAS_CARRIER but never FE_HAS_LOCK, even at -48 dBm > > >> / ~33 dB C/N. With inversion = false it locks immediately and scans > > >> all 8 DVB-T muxes here in Athens, Greece cleanly (postBER 0). The same > > >> unit works under the Windows driver. > > >> > > >> I don't have a second 935C to test other revisions, so I can't tell > > >> whether this is universal or specific to this revision. I based the > > >> change on the fact that the Evromedia Full Hybrid Full HD, which uses > > >> the same cx231xx + si2168 + si2157 combination, already uses inversion > > >> = false. > > >> > > >> If it turns out to be revision-specific, I'm happy to respin the patch > > >> to gate it on the eeprom model/revision instead — just let me know > > >> what you'd prefer. > > >> > > >> Regards, > > >> Dimitris > > >> On Tue, Jul 21, 2026 at 8:14 PM Dimitris Kerasiotis > > >> <[email protected]> wrote: > > >> > > > >> > Hi Hans, Brad, > > >> > > > >> > Thanks for looking at this. > > >> > > > >> > I can only confirm the behaviour on my own unit: Hauppauge model 111519, rev G2I6 (USB ID 2040:b151), tuner reported as Si2157-A30. With inversion = true it never locks on any DVB-T mux, briefly showing FE_HAS_SIGNAL | FE_HAS_CARRIER but never FE_HAS_LOCK, even at -48 dBm / ~33 dB C/N. With inversion = false it locks immediately and scans all 8 DVB-T muxes here in Athens, Greece cleanly (postBER 0). The same unit works under the Windows driver. > > >> > > > >> > I don't have a second 935C to test other revisions, so I can't tell whether this is universal or specific to this revision. I based the change on the fact that the Evromedia Full Hybrid Full HD, which uses the same cx231xx + si2168 + si2157 combination, already uses inversion = false. > > >> > > > >> > If it turns out to be revision-specific, I'm happy to respin the patch to gate it on the eeprom model/revision instead — just let me know what you'd prefer. > > >> > > > >> > Regards, > > >> > Dimitris > > >> > > > >> > > > >> > On Thu, Jul 16, 2026 at 7:34 AM Bradford Love <[email protected]> wrote: > > >> >> > > >> >> Hi Hans et al, > > >> >> > > >> >> I'm out of town currently but can run tests Sunday. I have models of every generation, so I can test for inversion changes. I will run dvbt tests and reply again. > > >> >> > > >> >> Regards, > > >> >> > > >> >> Bradford > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> On Wed, Jul 15, 2026, 06:18 Hans Verkuil <[email protected]> wrote: > > >> >>> > > >> >>> Brad, > > >> >>> > > >> >>> Can you review this patch? I'm not sure if this 'inversion = false' is valid for just > > >> >>> one specific model, or if it is valid for all 935C models. > > >> >>> > > >> >>> I'm hoping you have some info about that, or are perhaps able to test this with a > > >> >>> 935C. > > >> >>> > > >> >>> Regards, > > >> >>> > > >> >>> Hans > > >> >>> > > >> >>> On 09/07/2026 23:19, Dimitris Kerasiotis wrote: > > >> >>> > On the Hauppauge WinTV-HVR-935C (USB ID 2040:b151) the si2157 tuner > > >> >>> > is configured with inversion = true. On at least some hardware > > >> >>> > revisions (tested: Hauppauge model 111519, rev G2I6) this is wrong: > > >> >>> > tuner and demod probe successfully, firmware loads (si2157 patch > > >> >>> > 3.0.5, si2168 B 4.0.25), signal strength is reported correctly and > > >> >>> > the Si2168 briefly reports FE_HAS_SIGNAL | FE_HAS_CARRIER, but it > > >> >>> > never achieves lock on any DVB-T mux, on any frequency, regardless > > >> >>> > of signal quality (tested down to -48 dBm, C/N 38 dB). The same > > >> >>> > unit works under the vendor's Windows driver. > > >> >>> > > > >> >>> > Setting inversion = false results in immediate lock (FE_HAS_LOCK, > > >> >>> > postBER 0) and a successful scan of all eight DVB-T muxes receivable > > >> >>> > in Attica, Greece. This matches the configuration already used for > > >> >>> > the Evromedia Full Hybrid Full HD, which uses the same > > >> >>> > cx231xx + si2168 + si2157 chip combination. > > >> >>> > > > >> >>> > Tested on kernels 6.1 and 6.12 with identical results. > > >> >>> > > > >> >>> > Signed-off-by: Dimitris Kerasiotis <[email protected]> > > >> >>> > --- > > >> >>> > 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 472a4405a..a5486bcca 100644 > > >> >>> > --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c > > >> >>> > +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c > > >> >>> > @@ -1014,7 +1014,7 @@ static int dvb_init(struct cx231xx *dev) > > >> >>> > si2157_config.mdev = dev->media_dev; > > >> >>> > #endif > > >> >>> > si2157_config.if_port = 1; > > >> >>> > - si2157_config.inversion = true; > > >> >>> > + si2157_config.inversion = false; > > >> >>> > > > >> >>> > /* perform probe/init/attach */ > > >> >>> > client = dvb_module_probe("si2157", NULL, tuner_i2c, > > >> >>>