STV0299 has bogus CAN_INVERSION_AUTO flag
from gdb dump:
[...]
info = {
name = "ST STV0299 DVB-S", '\000' <repeats 111 times>, type = FE_QPSK,
frequency_min = 950000, frequency_max = 2150000,
frequency_stepsize = 125, frequency_tolerance = 0,
symbol_rate_min = 1000000, symbol_rate_max = 45000000,
symbol_rate_tolerance = 500, notifier_delay = 0,
caps = (FE_CAN_INVERSION_AUTO | FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | FE_CAN_QPSK)}, [...]
when tuning:
[...]
[331012.238617] stv0299 does not support auto-inversion [331012.538760] stv0299 does not support auto-inversion [331012.838898] stv0299 does not support auto-inversion [331014.192121] stv0299 does not support auto-inversion [331014.492257] stv0299 does not support auto-inversion [331014.792391] stv0299 does not support auto-inversion [331015.092571] stv0299 does not support auto-inversion [331015.392692] stv0299 does not support auto-inversion [331015.692825] stv0299 does not support auto-inversion [331015.992964] stv0299 does not support auto-inversion [331016.293106] stv0299 does not support auto-inversion [331019.306883] stv0299 does not support auto-inversion [331019.607024] stv0299 does not support auto-inversion [331019.907166] stv0299 does not support auto-inversion [331020.207352] stv0299 does not support auto-inversion [331020.507480] stv0299 does not support auto-inversion [331020.807610] stv0299 does not support auto-inversion [331021.107747] stv0299 does not support auto-inversion
[...]
(but how the heck should I know?)
kernel:
[...]
uname -a
Linux tivi 4.1.0-1-586 #1 Debian 4.1.3-1 (2015-08-03) i686 GNU/Linux [...]
hardware[boot msg]:
[...]
[ 12.785499] saa7146: register extension 'budget_av' [ 12.786359] saa7146: found saa7146 @ mem cf83e000 (revision 1, irq 10) (0x153b,0x1154) [ 12.786472] saa7146 (0): dma buffer size 192512 [ 12.786533] DVB: registering new adapter (TerraTec Cinergy 1200 DVB-S) [ 12.828641] adapter failed MAC signature check [ 12.828721] encoded MAC from EEPROM was ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff [ 13.096516] budget_av: KNC1-0: MAC addr = 00:0a:ac:01:8d:a1 [ 13.604381] budget_av 0000:00:14.0: DVB: registering adapter 0 frontend 0 (ST STV0299 DVB-S)... [ 13.621283] budget_av: ci interface initialised
[...]
Pls fix this!!!
Either by fixing.
<https://github.com/torvalds/linux/blob/master/drivers/media/dvb-frontends/stv0299.c> around line 583.
or
<https://github.com/torvalds/linux/blob/master/drivers/media/dvb-core/dvb_frontend.c> line 2319
but there it's problematic coz they tried to be `smart' with this in the tuning functions...
And don't start nagging around that I'm supposed to use the `unlimited' capabilities API, coz IT IS NOT IMPLEMENTED AND I AM NOT GONNA WRITE IT.
<https://github.com/torvalds/linux/search?utf8=%E2%9C%93&q=DTV_FE_CAPABILITY>
peace
It breaks tuning, you know.
IT BREAKS TUNING.
Quoted 9 lines · Johann Klammer
from gdb dump:
[...]info = { name = "ST STV0299 DVB-S", '\000' <repeats 111 times>, type = FE_QPSK, frequency_min = 950000, frequency_max = 2150000, frequency_stepsize = 125, frequency_tolerance = 0, symbol_rate_min = 1000000, symbol_rate_max = 45000000, symbol_rate_tolerance = 500, notifier_delay = 0, caps = (FE_CAN_INVERSION_AUTO | FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | FE_CAN_QPSK)},
Quoted 4 lines
[...]
when tuning:
[...]
Hi
..
Quoted 6 lines
[331020.207352] stv0299 does not support auto-inversion [331020.507480] stv0299 does not support auto-inversion [331020.807610] stv0299 does not support auto-inversion [331021.107747] stv0299 does not support auto-inversion[...]
(but how the heck should I know?)
I am using the stv0299 with no problems at all, the code hasn't changed much in years. I am using linux 4.2-rc6
You shouldn't be getting that message as dvb core does the auto inversion for the driver.
I looked through the code and can't find any fault.
Regards
Malcolm
Quoted 23 lines · Malcolm Priestley
Quoted 9 lines · Johann Klammer
from gdb dump:
[...]info = { name = "ST STV0299 DVB-S", '\000' <repeats 111 times>, type = FE_QPSK, frequency_min = 950000, frequency_max = 2150000, frequency_stepsize = 125, frequency_tolerance = 0, symbol_rate_min = 1000000, symbol_rate_max = 45000000, symbol_rate_tolerance = 500, notifier_delay = 0, caps = (FE_CAN_INVERSION_AUTO | FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | FE_CAN_QPSK)},Quoted 4 lines
[...]
when tuning:
[...]Hi
..Quoted 6 lines
[331020.207352] stv0299 does not support auto-inversion [331020.507480] stv0299 does not support auto-inversion [331020.807610] stv0299 does not support auto-inversion [331021.107747] stv0299 does not support auto-inversion[...]
(but how the heck should I know?)
Quoted 2 lines
I am using the stv0299 with no problems at all, the code hasn't changed much in years. I am using linux 4.2-rc6 boot/vmlinuz-4.1.0-1-586
Something must have changed. I updated kernel and got those messages. I did not get then before. The vmlinuz.old
points to: boot/vmlinuz-3.14.15
vmlinuz points to: boot/vmlinuz-4.1.0-1-586
(debian testing binary .deb)
Quoted 1 line
You shouldn't be getting that message as dvb core does the auto inversion for the driver.
It may have been exposed by trying oneshot tuning mode... not sure...
I had to try that 'coz I only got about 50% success on any tuning attempt on this card (has always been like that).
got rid of that, it tunes reliably now if I set INVERSION to 0.
and retry a few times instead of uning once, then polling for LOCK (which often won't happen).
It's entirely possible the bug was in there for a while.
Quoted 4 lines
I looked through the code and can't find any fault.
They explicitly set the CAN_INVERSION_AUTO flag in the FE_GET_INFO ioctl, then fail -EINVAL when you try to tune with INVERSION_AUTO. At least that's where the error message comes from.
Quoted 10 lines
Regards
Malcolm
Quoted 27 lines · Johann Klammer
Quoted 23 lines · Malcolm Priestley
Quoted 9 lines · Johann Klammer
from gdb dump:
[...]info = { name = "ST STV0299 DVB-S", '\000' <repeats 111 times>, type = FE_QPSK, frequency_min = 950000, frequency_max = 2150000, frequency_stepsize = 125, frequency_tolerance = 0, symbol_rate_min = 1000000, symbol_rate_max = 45000000, symbol_rate_tolerance = 500, notifier_delay = 0, caps = (FE_CAN_INVERSION_AUTO | FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | FE_CAN_QPSK)},Quoted 4 lines
[...]
when tuning:
[...]Hi
..Quoted 6 lines
[331020.207352] stv0299 does not support auto-inversion [331020.507480] stv0299 does not support auto-inversion [331020.807610] stv0299 does not support auto-inversion [331021.107747] stv0299 does not support auto-inversion[...]
(but how the heck should I know?)Quoted 2 lines
I am using the stv0299 with no problems at all, the code hasn't changed much in years. I am using linux 4.2-rc6 boot/vmlinuz-4.1.0-1-586
Quoted 8 lines
Something must have changed. I updated kernel and got those messages. I did not get then before. The vmlinuz.old
points to: boot/vmlinuz-3.14.15
vmlinuz points to: boot/vmlinuz-4.1.0-1-586
(debian testing binary .deb)Quoted 1 line
You shouldn't be getting that message as dvb core does the auto inversion for the driver.
It may have been exposed by trying oneshot tuning mode... not sure...
Yes, it is with setting oneshot.
Looks like the FE_CAN_INVERSION_AUTO flag is only bogus in FE_TUNE_MODE_ONESHOT mode.
Obversely don't set INVERSION_AUTO bearing in mind when you do it manually you have to tune first with it off and if that fails again with it on.
Regards
Malcolm