Skip to contentSkip to conversation

DVB-S PCI card regression on 4.19 / 4.20

DISCUSSION Takashi Iwai 5 participants 16 messages Nov 19, 2018 – Nov 20, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

we've got a regression report on openSUSE Bugzilla regarding DVB-S PCI card:
https://bugzilla.opensuse.org/show_bug.cgi?id=1116374

According to the reporter (Stakanov, Cc'ed), the card worked fine on 4.18.15, but since 4.19, it doesn't give any channels, sound nor picture, but only EPG is received.

The following errors might be relevant:

================

[    4.845180] b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully
[    4.869703] b2c2-flexcop: MAC address = xx:xx:xx:xx:xx:xx
[    5.100318] b2c2-flexcop: found 'ST STV0299 DVB-S' .
[    5.100323] b2c2_flexcop_pci 0000:06:06.0: DVB: registering adapter 0 frontend 0 (ST STV0299 DVB-S)...
[    5.100370] b2c2-flexcop: initialization of 'Sky2PC/SkyStar 2 DVB-S rev 2.6' at the 'PCI' bus controlled by a 'FlexCopIIb' complete
[  117.513086] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 frequency 1549000 out of range (950000..2150)
[  124.905222] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 frequency 1880000 out of range (950000..2150)
[  127.337079] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 frequency 1353500 out of range (950000..2150)

================

The lspci shows:
================
06:06.0 Network controller: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card (rev 02)
Subsystem: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32
Interrupt: pin A routed to IRQ 20
NUMA node: 0
Region 0: Memory at fe500000 (32-bit, non-prefetchable) [size=64K]
Region 1: I/O ports at b040 [size=32]
Kernel driver in use: b2c2_flexcop_pci
Kernel modules: b2c2_flexcop_pci
================

Other details can be found in the bugzilla entry above.

If any fix is known, please let me know. I'll build a test kernel for openSUSE to confirm it.

Thanks!

Takashi

#1 lore raw

Hi Takashi,

Em Mon, 19 Nov 2018 16:13:29 +0100
Takashi Iwai <[email protected]> escreveu:

Quoted 9 lines

Hi,

we've got a regression report on openSUSE Bugzilla regarding DVB-S PCI card:
https://bugzilla.opensuse.org/show_bug.cgi?id=1116374

According to the reporter (Stakanov, Cc'ed), the card worked fine on 4.18.15, but since 4.19, it doesn't give any channels, sound nor picture, but only EPG is received.

Receiving just EPG is weird.

Quoted 11 lines

The following errors might be relevant:

================

[    4.845180] b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully
[    4.869703] b2c2-flexcop: MAC address = xx:xx:xx:xx:xx:xx
[    5.100318] b2c2-flexcop: found 'ST STV0299 DVB-S' .
[    5.100323] b2c2_flexcop_pci 0000:06:06.0: DVB: registering adapter 0 frontend 0 (ST STV0299 DVB-S)...
[    5.100370] b2c2-flexcop: initialization of 'Sky2PC/SkyStar 2 DVB-S rev 2.6' at the 'PCI' bus controlled by a 'FlexCopIIb' complete
Quoted 3 lines
[  117.513086] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 frequency 1549000 out of range (950000..2150)
[  124.905222] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 frequency 1880000 out of range (950000..2150)
[  127.337079] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 frequency 1353500 out of range (950000..2150)

That indicates that it is trying to tune to an unsupported frequency. For DVB-S, all frequencies above should be in kHz.

It is very weird that the low frequency is bigger than the higher one.

I suspect that this could be the root cause of the issue.

Yet, the entry at stv0299 (with apparently is the used frontend) seems correct, as both min and max frequencies are in MHz:

static const struct dvb_frontend_ops stv0299_ops = {
	.delsys = { SYS_DVBS },
	.info = {
		.name			= "ST STV0299 DVB-S",
		.frequency_min_hz	=  950 * MHz,
		.frequency_max_hz	= 2150 * MHz,
		.frequency_stepsize_hz	=  125 * kHz,
		.symbol_rate_min	= 1000000,
		.symbol_rate_max	= 45000000,
		.symbol_rate_tolerance	= 500,	/* ppm */
		.caps = 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_QPSK |
		      FE_CAN_FEC_AUTO
	},

It could be some mistake at the tuner (if this driver loads a separate tuner).

From the code, it seems that this specific board uses this tuner from dvb-pll:

static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {
        .name = "Samsung TBMU24112",
        .min    =  950000,
        .max    = 2150000, /* guesses */
        .iffreq = 0,
        .count = 2,
        .entries = {
                { 1500000, 125, 0x84, 0x18 },
                { 9999999, 125, 0x84, 0x08 },
        }
};

Here, frequencies are in kHz. The code should be converting them to Hz if the TV standard is satellite.

Quoted 19 lines

================

The lspci shows:
================
06:06.0 Network controller: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card (rev 02)
Subsystem: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32
Interrupt: pin A routed to IRQ 20
NUMA node: 0
Region 0: Memory at fe500000 (32-bit, non-prefetchable) [size=64K]
Region 1: I/O ports at b040 [size=32]
Kernel driver in use: b2c2_flexcop_pci
Kernel modules: b2c2_flexcop_pci
================

Other details can be found in the bugzilla entry above.

Quoted 7 lines

If any fix is known, please let me know. I'll build a test kernel for openSUSE to confirm it.

Thanks!

Takashi

Thanks,
Mauro

--

Could you ask the user to apply the enclosed patch and provide us the results of those prints?

Documentation/media/uapi/mediactl/media-ioc-request-alloc.rst +12 -1
index 0f8b31874002..60874a1f3d89 100644
@@ -1,4 +1,15 @@
-.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections
+.. SPDX License for this file: GPL-2.0 OR GFDL-1.1-or-later
+..
+.. For GPL-2.0, see LICENSES/preferred/GPL-2.0
+..
+.. For GFDL-1.1-or-later, see:
+..
+.. Permission is granted to copy, distribute and/or modify this document
+.. under the terms of the GNU Free Documentation License, Version 1.1 or
+.. any later version published by the Free Software Foundation, with no
+.. Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.
+.. A copy of the license is included at
+.. Documentation/media/uapi/fdl-appendix.rst.
 
 .. _media_ioc_request_alloc:
 
Documentation/media/uapi/mediactl/media-request-ioc-queue.rst +12 -1
index 6dd2d7fea714..3f481256f75a 100644
@@ -1,4 +1,15 @@
-.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections
+.. SPDX License for this file: GPL-2.0 OR GFDL-1.1-or-later
+..
+.. For GPL-2.0, see LICENSES/preferred/GPL-2.0
+..
+.. For GFDL-1.1-or-later, see:
+..
+.. Permission is granted to copy, distribute and/or modify this document
+.. under the terms of the GNU Free Documentation License, Version 1.1 or
+.. any later version published by the Free Software Foundation, with no
+.. Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.
+.. A copy of the license is included at
+.. Documentation/media/uapi/fdl-appendix.rst.
 
 .. _media_request_ioc_queue:
 
Documentation/media/uapi/mediactl/media-request-ioc-reinit.rst +12 -1
index febe888494c8..d9c4d308b477 100644
@@ -1,4 +1,15 @@
-.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections
+.. SPDX License for this file: GPL-2.0 OR GFDL-1.1-or-later
+..
+.. For GPL-2.0, see LICENSES/preferred/GPL-2.0
+..
+.. For GFDL-1.1-or-later, see:
+..
+.. Permission is granted to copy, distribute and/or modify this document
+.. under the terms of the GNU Free Documentation License, Version 1.1 or
+.. any later version published by the Free Software Foundation, with no
+.. Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.
+.. A copy of the license is included at
+.. Documentation/media/uapi/fdl-appendix.rst.
 
 .. _media_request_ioc_reinit:
 
Documentation/media/uapi/mediactl/request-api.rst +12 -1
index 5f4a23029c48..7a85b346db91 100644
@@ -1,4 +1,15 @@
-.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections
+.. SPDX License for this file: GPL-2.0 OR GFDL-1.1-or-later
+..
+.. For GPL-2.0, see LICENSES/preferred/GPL-2.0
+..
+.. For GFDL-1.1-or-later, see:
+..
+.. Permission is granted to copy, distribute and/or modify this document
+.. under the terms of the GNU Free Documentation License, Version 1.1 or
+.. any later version published by the Free Software Foundation, with no
+.. Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.
+.. A copy of the license is included at
+.. Documentation/media/uapi/fdl-appendix.rst.
 
 .. _media-request-api:
 
Documentation/media/uapi/mediactl/request-func-close.rst +12 -1
index 098d7f2b9548..c85275a8870c 100644
@@ -1,4 +1,15 @@
-.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections
+.. SPDX License for this file: GPL-2.0 OR GFDL-1.1-or-later
+..
+.. For GPL-2.0, see LICENSES/preferred/GPL-2.0
+..
+.. For GFDL-1.1-or-later, see:
+..
+.. Permission is granted to copy, distribute and/or modify this document
+.. under the terms of the GNU Free Documentation License, Version 1.1 or
+.. any later version published by the Free Software Foundation, with no
+.. Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.
+.. A copy of the license is included at
+.. Documentation/media/uapi/fdl-appendix.rst.
 
 .. _request-func-close:
 
Documentation/media/uapi/mediactl/request-func-ioctl.rst +12 -1
index ff7b072a6999..8b69465bd2dd 100644
@@ -1,4 +1,15 @@
-.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections
+.. SPDX License for this file: GPL-2.0 OR GFDL-1.1-or-later
+..
+.. For GPL-2.0, see LICENSES/preferred/GPL-2.0
+..
+.. For GFDL-1.1-or-later, see:
+..
+.. Permission is granted to copy, distribute and/or modify this document
+.. under the terms of the GNU Free Documentation License, Version 1.1 or
+.. any later version published by the Free Software Foundation, with no
+.. Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.
+.. A copy of the license is included at
+.. Documentation/media/uapi/fdl-appendix.rst.
 
 .. _request-func-ioctl:
 
Documentation/media/uapi/mediactl/request-func-poll.rst +12 -1
index 85191254f381..8f58f9948cb6 100644
@@ -1,4 +1,15 @@
-.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-or-later WITH no-invariant-sections
+.. SPDX License for this file: GPL-2.0 OR GFDL-1.1-or-later
+..
+.. For GPL-2.0, see LICENSES/preferred/GPL-2.0
+..
+.. For GFDL-1.1-or-later, see:
+..
+.. Permission is granted to copy, distribute and/or modify this document
+.. under the terms of the GNU Free Documentation License, Version 1.1 or
+.. any later version published by the Free Software Foundation, with no
+.. Invariant Sections, no Front-Cover Texts and no Back-Cover Texts.
+.. A copy of the license is included at
+.. Documentation/media/uapi/fdl-appendix.rst.
 
 .. _request-func-poll:
 
drivers/media/dvb-core/dvb_frontend.c +3 -0
index 961207cf09eb..bcdfe9939d64 100644
@@ -917,6 +917,9 @@ static void dvb_frontend_get_frequency_limits(struct dvb_frontend *fe,
 			 "DVB: adapter %i frontend %u frequency limits undefined - fix the driver\n",
 			 fe->dvb->num, fe->id);
 
+printk("%s: frequencies: tuner: %u...%u, frontend: %u...%u",
+       __func__, tuner_min, tuner_max, frontend_min, frontend_max);
+
 	/* If the standard is for satellite, convert frequencies to kHz */
 	switch (c->delivery_system) {
 	case SYS_DVBS:
drivers/media/dvb-frontends/dvb-pll.c +2 -0
index 6d4b2eec67b4..62e81010b8cc 100644
@@ -857,6 +857,8 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
 		fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
 		fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
 	}
+printk("%s: delsys: %d, frequency range: %u..%u\n",
+       __func__, c->delivery_system, fe->ops.tuner_ops.info.frequency_min_hz, fe->ops.tuner_ops.info.frequency_max_hz);
 
 	if (!desc->initdata)
 		fe->ops.tuner_ops.init = NULL;
#2 lore raw

Hi

Quoted 28 lines · Mauro Carvalho Chehab

Hi Takashi,

Em Mon, 19 Nov 2018 16:13:29 +0100
Takashi Iwai <[email protected]> escreveu:

Quoted 9 lines

Hi,

we've got a regression report on openSUSE Bugzilla regarding DVB-S PCI card:
https://bugzilla.opensuse.org/show_bug.cgi?id=1116374

According to the reporter (Stakanov, Cc'ed), the card worked fine on 4.18.15, but since 4.19, it doesn't give any channels, sound nor picture, but only EPG is received.

Receiving just EPG is weird.

Quoted 9 lines

The following errors might be relevant:

================

[    4.845180] b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully
[    4.869703] b2c2-flexcop: MAC address = xx:xx:xx:xx:xx:xx
[    5.100318] b2c2-flexcop: found 'ST STV0299 DVB-S' .
[    5.100323] b2c2_flexcop_pci 0000:06:06.0: DVB: registering adapter 0 frontend 0 (ST STV0299 DVB-S)...
[    5.100370] b2c2-flexcop: initialization of 'Sky2PC/SkyStar 2 DVB-S rev 2.6' at the 'PCI' bus controlled by a 'FlexCopIIb' complete
Quoted 6 lines
Quoted 3 lines
[  117.513086] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 frequency 1549000 out of range (950000..2150)
[  124.905222] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 frequency 1880000 out of range (950000..2150)
[  127.337079] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 frequency 1353500 out of range (950000..2150)

That indicates that it is trying to tune to an unsupported frequency. For DVB-S, all frequencies above should be in kHz.

Kaffeine reports the wrong LNB frequency ranges for universal Europe... I just use Astra 1E settings instead which I am pretty sure is the same?

I am using the stv0299 / dvb_pll(opera1) combi and not reporting any problems other than the streaming issue with dvb-usb-v2 which I don't think this uses?

Regards

Malcolm

#4 lore raw

In data lunedì 19 novembre 2018 20:47:19 CET, Takashi Iwai ha scritto:

Quoted 12 lines

On Mon, 19 Nov 2018 18:53:26 +0100,

Quoted 2 lines · Mauro Carvalho Chehab

Could you ask the user to apply the enclosed patch and provide us the results of those prints?

OK, I built a test kernel in OBS home:tiwai:bsc1116374 repo. Now it's available at

https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/standard
/

Quoted 6 lines

Stakanov, could you test it and give the kernel messages?

Thanks!

Takashi

Here we go, I did saw your mail only late, sorry.

Result of proposed fix (rc3): card has still no function, does not sync, EPG works. No sound no picture.

entropy@silversurfer:~> uname -a
Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19 18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

output of
entropy@silversurfer:~> sudo dmesg | grep -i b2c2

[    4.831163] b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip 
loaded successfully
[    4.862648] b2c2-flexcop: MAC address = xx:xx:xx:xx:xx:xx
[    5.094173] b2c2-flexcop: found 'ST STV0299 DVB-S' .
[    5.094177] b2c2_flexcop_pci 0000:06:06.0: DVB: registering adapter 0 
frontend 0 (ST STV0299 DVB-S)...
[    5.094248] b2c2-flexcop: initialization of 'Sky2PC/SkyStar 2 DVB-S rev 
2.6' at the 'PCI' bus controlled by a 'FlexCopIIb' complete
[  121.789236] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 
frequency 1880000 out of range (950000..2150)
[  128.817325] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 

frequency 1944750 out of range (950000..2150)

sudo lspci -vvv
06:06.0 Network controller: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card (rev 02)
Subsystem: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip /
Technisat SkyStar2 DVB card
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32
Interrupt: pin A routed to IRQ 20
NUMA node: 0
Region 0: Memory at fe500000 (32-bit, non-prefetchable) [size=64K] Region 1: I/O ports at b040 [size=32]
Kernel driver in use: b2c2_flexcop_pci
Kernel modules: b2c2_flexcop_pci

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

#5 lore raw

Em Mon, 19 Nov 2018 23:59:39 +0100
stakanov <[email protected]> escreveu:

Quoted 16 lines

In data lunedì 19 novembre 2018 20:47:19 CET, Takashi Iwai ha scritto:

Quoted 15 lines

On Mon, 19 Nov 2018 18:53:26 +0100,

Quoted 2 lines · Mauro Carvalho Chehab

Could you ask the user to apply the enclosed patch and provide us the results of those prints?

OK, I built a test kernel in OBS home:tiwai:bsc1116374 repo. Now it's available at

https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/standard
/

Stakanov, could you test it and give the kernel messages?

Quoted 8 lines
Quoted 3 lines

Thanks!

Takashi

Here we go, I did saw your mail only late, sorry.

Result of proposed fix (rc3): card has still no function, does not sync, EPG works. No sound no picture.

This is not a fix. It just adds some new messages that should help to explain why the frequency range seems wrong.

Quoted 18 lines

entropy@silversurfer:~> uname -a
Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19 18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

output of
entropy@silversurfer:~> sudo dmesg | grep -i b2c2

[    4.831163] b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip 
loaded successfully
[    4.862648] b2c2-flexcop: MAC address = xx:xx:xx:xx:xx:xx
[    5.094173] b2c2-flexcop: found 'ST STV0299 DVB-S' .
[    5.094177] b2c2_flexcop_pci 0000:06:06.0: DVB: registering adapter 0 
frontend 0 (ST STV0299 DVB-S)...
[    5.094248] b2c2-flexcop: initialization of 'Sky2PC/SkyStar 2 DVB-S rev 
2.6' at the 'PCI' bus controlled by a 'FlexCopIIb' complete
[  121.789236] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 
frequency 1880000 out of range (950000..2150)
[  128.817325] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 
Quoted 1 line

frequency 1944750 out of range (950000..2150)

Are you sure you booted the right Kernel? I'm not seeing the new messages here that should be printing the tuner and frontend frequency ranges.

Quoted 21 lines

sudo lspci -vvv
06:06.0 Network controller: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip / Technisat SkyStar2 DVB card (rev 02)
Subsystem: Techsan Electronics Co Ltd B2C2 FlexCopII DVB chip /
Technisat SkyStar2 DVB card
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 32
Interrupt: pin A routed to IRQ 20
NUMA node: 0
Region 0: Memory at fe500000 (32-bit, non-prefetchable) [size=64K] Region 1: I/O ports at b040 [size=32]
Kernel driver in use: b2c2_flexcop_pci
Kernel modules: b2c2_flexcop_pci

Quoted 5 lines

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

Thanks,
Mauro

#6 lore raw

In data martedì 20 novembre 2018 00:08:45 CET, Mauro Carvalho Chehab ha scritto:

Quoted 4 lines

uname -a

Quoted 2 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19 18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

uname -a

Quoted 2 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19 18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

from https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/
standard/x86_64/

So I booted this one, should be the right one.
sudo dmesg | grep -i b2c2 should give these additional messages?

If Takashi is still around, he could confirm.

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

#7 lore raw

Em Tue, 20 Nov 2018 00:19:54 +0100
stakanov <[email protected]> escreveu:

Quoted 11 lines

In data martedì 20 novembre 2018 00:08:45 CET, Mauro Carvalho Chehab ha scritto:

Quoted 4 lines

uname -a

Quoted 2 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19 18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

uname -a

Quoted 2 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19 18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

Quoted 7 lines

from https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/
standard/x86_64/

So I booted this one, should be the right one.
sudo dmesg | grep -i b2c2 should give these additional messages?

If Takashi is still around, he could confirm.

Well, if the patch got applied, you should now be getting messages similar (but not identical) to:

	dvb_frontend_get_frequency_limits: frequencies: tuner: 9150000...2150000, frontend: 9150000...2150000
	dvb_pll_attach: delsys: 5, frequency range: 9150000..2150000
Quoted 8 lines

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

Thanks,
Mauro

#8 lore raw

In data martedì 20 novembre 2018 00:58:41 CET, Mauro Carvalho Chehab ha scritto:

Quoted 33 lines

Em Tue, 20 Nov 2018 00:19:54 +0100

stakanov <[email protected]> escreveu:

Quoted 15 lines

In data martedì 20 novembre 2018 00:08:45 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 5 lines

uname -a

Quoted 3 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

uname -a

Quoted 3 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

Quoted 7 lines

from https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/
standard/x86_64/

So I booted this one, should be the right one.
sudo dmesg | grep -i b2c2 should give these additional messages?

If Takashi is still around, he could confirm.

Well, if the patch got applied, you should now be getting messages similar (but not identical) to:

	dvb_frontend_get_frequency_limits: frequencies: tuner: 9150000...2150000,

frontend: 9150000...2150000 dvb_pll_attach: delsys: 5, frequency range:
9150000..2150000

Quoted 6 lines
Quoted 4 lines

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

Thanks,
Mauro

My bad.
With just dmesg:

[   89.399887] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[   95.020149] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[   95.152049] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[   95.152058] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 
frequency 1880000 out of range (950000..2150)
[   98.356539] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[   98.480372] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[   98.480381] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 
frequency 1587500 out of range (950000..2150)
[  100.016823] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[  100.140619] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[  100.140629] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 
frequency 1353500 out of range (950000..2150)
[  105.361166] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[  105.492972] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[  105.492977] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 

frequency 1944750 out of range (950000..2150)

Which is, I guess the info you need?

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

#9 lore raw

Em Tue, 20 Nov 2018 09:07:57 +0100
stakanov <[email protected]> escreveu:

Quoted 71 lines

In data martedì 20 novembre 2018 00:58:41 CET, Mauro Carvalho Chehab ha scritto:

Quoted 33 lines

Em Tue, 20 Nov 2018 00:19:54 +0100

stakanov <[email protected]> escreveu:

Quoted 15 lines

In data martedì 20 novembre 2018 00:08:45 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 5 lines

uname -a

Quoted 3 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

uname -a

Quoted 3 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

Quoted 7 lines

from https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/
standard/x86_64/

So I booted this one, should be the right one.
sudo dmesg | grep -i b2c2 should give these additional messages?

If Takashi is still around, he could confirm.

Well, if the patch got applied, you should now be getting messages similar (but not identical) to:

	dvb_frontend_get_frequency_limits: frequencies: tuner: 9150000...2150000,

frontend: 9150000...2150000 dvb_pll_attach: delsys: 5, frequency range:
9150000..2150000

Quoted 6 lines
Quoted 4 lines

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

Thanks,
Mauro

My bad.
With just dmesg:

[   89.399887] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[   95.020149] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[   95.152049] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[   95.152058] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 
frequency 1880000 out of range (950000..2150)
[   98.356539] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[   98.480372] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[   98.480381] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 
frequency 1587500 out of range (950000..2150)
[  100.016823] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[  100.140619] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[  100.140629] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 
frequency 1353500 out of range (950000..2150)
[  105.361166] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[  105.492972] dvb_frontend_get_frequency_limits: frequencies: tuner: 
950000...2150000, frontend: 950000000...2150000000
[  105.492977] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0 
Quoted 4 lines

frequency 1944750 out of range (950000..2150)

Which is, I guess the info you need?

Yes, partially. Clearly, the problem is coming from the tuner, with is not reporting the frequency in Hz, but I was hoping to see another message from the tuner driver, in order for me to be sure about what's happening there.

Didn't you get any message that starts with "dvb_pll_attach"?

The thing with Flexcop is that there are several variations, each one with a different tuner driver.

Anyway, I guess I found the trouble: it is trying to use the DVB cache to check the delivery system too early (at attach time).

I suspect that the enclosed patch will fix the issue. Could you please test it?

Thanks!
Mauro

drivers/media/dvb-frontends/dvb-pll.c +47 -54
index 6d4b2eec67b4..390ecc915096 100644
@@ -80,8 +80,8 @@ struct dvb_pll_desc {
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
 	.name  = "Thomson dtt7579",
-	.min   = 177000000,
-	.max   = 858000000,
+	.min   = 177 * MHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xb4, 0x03 },
 	.count = 4,
@@ -102,8 +102,8 @@ static void thomson_dtt759x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
 	.name  = "Thomson dtt759x",
-	.min   = 177000000,
-	.max   = 896000000,
+	.min   = 177 * MHz,
+	.max   = 896 * MHz,
 	.set   = thomson_dtt759x_bw,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0x84, 0x03 },
@@ -126,8 +126,8 @@ static void thomson_dtt7520x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
 	.name  = "Thomson dtt7520x",
-	.min   = 185000000,
-	.max   = 900000000,
+	.min   = 185 * MHz,
+	.max   = 900 * MHz,
 	.set   = thomson_dtt7520x_bw,
 	.iffreq = 36166667,
 	.count = 7,
@@ -144,8 +144,8 @@ static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
 
 static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 	.name  = "LG z201",
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xbc, 0x03 },
 	.count = 5,
@@ -160,8 +160,8 @@ static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 
 static const struct dvb_pll_desc dvb_pll_unknown_1 = {
 	.name  = "unknown 1", /* used by dntv live dvb-t */
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.count = 9,
 	.entries = {
@@ -182,8 +182,8 @@ static const struct dvb_pll_desc dvb_pll_unknown_1 = {
  */
 static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 	.name  = "Infineon TUA6010XS",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 3,
 	.entries = {
@@ -196,8 +196,8 @@ static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 /* Panasonic env57h1xd5 (some Philips PLL ?) */
 static const struct dvb_pll_desc dvb_pll_env57h1xd5 = {
 	.name  = "Panasonic ENV57H1XD5",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 4,
 	.entries = {
@@ -220,8 +220,8 @@ static void tda665x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tda665x = {
 	.name  = "Philips TDA6650/TDA6651",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.set   = tda665x_bw,
 	.iffreq= 36166667,
 	.initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
@@ -254,8 +254,8 @@ static void tua6034_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tua6034 = {
 	.name  = "Infineon TUA6034",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.count = 3,
 	.set   = tua6034_bw,
@@ -278,8 +278,8 @@ static void tded4_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tded4 = {
 	.name = "ALPS TDED4",
-	.min = 47000000,
-	.max = 863000000,
+	.min =  47 * MHz,
+	.max = 863 * MHz,
 	.iffreq= 36166667,
 	.set   = tded4_bw,
 	.count = 4,
@@ -296,8 +296,8 @@ static const struct dvb_pll_desc dvb_pll_tded4 = {
  */
 static const struct dvb_pll_desc dvb_pll_tdhu2 = {
 	.name = "ALPS TDHU2",
-	.min = 54000000,
-	.max = 864000000,
+	.min =  54 * MHz,
+	.max = 864 * MHz,
 	.iffreq= 44000000,
 	.count = 4,
 	.entries = {
@@ -313,8 +313,8 @@ static const struct dvb_pll_desc dvb_pll_tdhu2 = {
  */
 static const struct dvb_pll_desc dvb_pll_samsung_tbmv = {
 	.name = "Samsung TBMV30111IN / TBMV30712IN1",
-	.min = 54000000,
-	.max = 860000000,
+	.min =  54 * MHz,
+	.max = 860 * MHz,
 	.iffreq= 44000000,
 	.count = 6,
 	.entries = {
@@ -332,8 +332,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmv = {
  */
 static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {
 	.name  = "Philips SD1878",
-	.min   =  950000,
-	.max   = 2150000,
+	.min   =  950 * MHz,
+	.max   = 2150 * MHz,
 	.iffreq= 249, /* zero-IF, offset 249 is to round up */
 	.count = 4,
 	.entries = {
@@ -398,8 +398,8 @@ static void opera1_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_opera1 = {
 	.name  = "Opera Tuner",
-	.min   =  900000,
-	.max   = 2250000,
+	.min   =  900 * MHz,
+	.max   = 2250 * MHz,
 	.initdata = (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 },
 	.initdata2 = (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 },
 	.iffreq= 0,
@@ -445,8 +445,8 @@ static void samsung_dtos403ih102a_set(struct dvb_frontend *fe, u8 *buf)
 /* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */
 static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {
 	.name   = "Samsung DTOS403IH102A",
-	.min    =  44250000,
-	.max    = 858000000,
+	.min    = 44250 * kHz,
+	.max    = 858 * MHz,
 	.iffreq =  36125000,
 	.count  = 8,
 	.set    = samsung_dtos403ih102a_set,
@@ -465,8 +465,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {
 /* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */
 static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {
 	.name	= "Samsung TDTC9251DH0",
-	.min	=  48000000,
-	.max	= 863000000,
+	.min	=  48 * MHz,
+	.max	= 863 * MHz,
 	.iffreq	=  36166667,
 	.count	= 3,
 	.entries = {
@@ -479,8 +479,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {
 /* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.3 */
 static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {
 	.name = "Samsung TBDU18132",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -500,8 +500,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {
 /* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */
 static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {
 	.name = "Samsung TBMU24112",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -521,8 +521,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {
  * 822 - 862   1  *  0   0   1   0   0   0   0x88 */
 static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {
 	.name = "ALPS TDEE4",
-	.min	=  47000000,
-	.max	= 862000000,
+	.min	=  47 * MHz,
+	.max	= 862 * MHz,
 	.iffreq	=  36125000,
 	.count = 4,
 	.entries = {
@@ -537,8 +537,8 @@ static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {
 /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */
 static const struct dvb_pll_desc dvb_pll_tua6034_friio = {
 	.name   = "Infineon TUA6034 ISDB-T (Friio)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 },
 	.sleepdata = (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b },
@@ -553,8 +553,8 @@ static const struct dvb_pll_desc dvb_pll_tua6034_friio = {
 /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */
 static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 = {
 	.name   = "Philips TDA6651 ISDB-T (EarthSoft PT1)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 },
 	.count = 10,
@@ -845,18 +845,11 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
 
 	strncpy(fe->ops.tuner_ops.info.name, desc->name,
 		sizeof(fe->ops.tuner_ops.info.name));
-	switch (c->delivery_system) {
-	case SYS_DVBS:
-	case SYS_DVBS2:
-	case SYS_TURBO:
-	case SYS_ISDBS:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min * kHz;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max * kHz;
-		break;
-	default:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
-	}
+
+	fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
+	fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
+printk("%s: delsys: %d, frequency range: %u..%u\n",
+       __func__, c->delivery_system, fe->ops.tuner_ops.info.frequency_min_hz, fe->ops.tuner_ops.info.frequency_max_hz);
 
 	if (!desc->initdata)
 		fe->ops.tuner_ops.init = NULL;
#10 lore raw

In data martedì 20 novembre 2018 10:18:10 CET, Mauro Carvalho Chehab ha scritto:

Quoted 377 lines

Em Tue, 20 Nov 2018 09:07:57 +0100

stakanov <[email protected]> escreveu:

Quoted 80 lines

In data martedì 20 novembre 2018 00:58:41 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 40 lines

Em Tue, 20 Nov 2018 00:19:54 +0100

stakanov <[email protected]> escreveu:

Quoted 18 lines

In data martedì 20 novembre 2018 00:08:45 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 6 lines

uname -a

Quoted 4 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon
Nov 19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

uname -a

Quoted 4 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov
19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

Quoted 8 lines

from
https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/
standard/x86_64/

So I booted this one, should be the right one.
sudo dmesg | grep -i b2c2 should give these additional messages?

If Takashi is still around, he could confirm.

Well, if the patch got applied, you should now be getting messages similar

(but not identical) to:

	dvb_frontend_get_frequency_limits: frequencies: tuner:
	9150000...2150000,

frontend: 9150000...2150000 dvb_pll_attach: delsys: 5, frequency range:
9150000..2150000

Quoted 8 lines
Quoted 5 lines

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und
alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

Thanks,
Mauro

My bad.
With just dmesg:

[   89.399887] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.020149] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.152049] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.152058] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1880000 out of range (950000..2150)
[   98.356539] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   98.480372] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   98.480381] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1587500 out of range (950000..2150)
[  100.016823] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  100.140619] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  100.140629] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1353500 out of range (950000..2150)
[  105.361166] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  105.492972] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  105.492977] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
Quoted 4 lines

frequency 1944750 out of range (950000..2150)

Which is, I guess the info you need?

Yes, partially. Clearly, the problem is coming from the tuner, with is not reporting the frequency in Hz, but I was hoping to see another message from the tuner driver, in order for me to be sure about what's happening there.

Didn't you get any message that starts with "dvb_pll_attach"?

The thing with Flexcop is that there are several variations, each one with a different tuner driver.

Anyway, I guess I found the trouble: it is trying to use the DVB cache to check the delivery system too early (at attach time).

I suspect that the enclosed patch will fix the issue. Could you please test it?

Thanks!
Mauro

(quoted diff) +0 -0

b/drivers/media/dvb-frontends/dvb-pll.c index 6d4b2eec67b4..390ecc915096 100644

drivers/media/dvb-frontends/dvb-pll.c +4 -4
@@ -80,8 +80,8 @@ struct dvb_pll_desc {
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
 	.name  = "Thomson dtt7579",
-	.min   = 177000000,
-	.max   = 858000000,
+	.min   = 177 * MHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xb4, 0x03 },
 	.count = 4,
@@ -102,8 +102,8 @@ static void thomson_dtt759x_bw(struct dvb_frontend *fe,
 u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
 	.name  = "Thomson dtt759x",
-	.min   = 177000000,
-	.max   = 896000000,
+	.min   = 177 * MHz,
+	.max   = 896 * MHz,
 	.set   = thomson_dtt759x_bw,
 	.iffreq= 36166667,
drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.sleepdata = (u8[]){ 2, 0x84, 0x03 },
@@ -126,8 +126,8 @@ static void thomson_dtt7520x_bw(struct dvb_frontend *fe,
 u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
 	.name  = "Thomson dtt7520x",
-	.min   = 185000000,
-	.max   = 900000000,
+	.min   = 185 * MHz,
+	.max   = 900 * MHz,
 	.set   = thomson_dtt7520x_bw,
 	.iffreq = 36166667,
drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.count = 7,
@@ -144,8 +144,8 @@ static const struct dvb_pll_desc
 dvb_pll_thomson_dtt7520x = {
 
 static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 	.name  = "LG z201",
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xbc, 0x03 },
drivers/media/dvb-frontends/dvb-pll.c +16 -16
 	.count = 5,
@@ -160,8 +160,8 @@ static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 
 static const struct dvb_pll_desc dvb_pll_unknown_1 = {
 	.name  = "unknown 1", /* used by dntv live dvb-t */
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.count = 9,
 	.entries = {
@@ -182,8 +182,8 @@ static const struct dvb_pll_desc dvb_pll_unknown_1 = {
  */
 static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 	.name  = "Infineon TUA6010XS",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 3,
 	.entries = {
@@ -196,8 +196,8 @@ static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 /* Panasonic env57h1xd5 (some Philips PLL ?) */
 static const struct dvb_pll_desc dvb_pll_env57h1xd5 = {
 	.name  = "Panasonic ENV57H1XD5",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 4,
 	.entries = {
@@ -220,8 +220,8 @@ static void tda665x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tda665x = {
 	.name  = "Philips TDA6650/TDA6651",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.set   = tda665x_bw,
 	.iffreq= 36166667,
 	.initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
@@ -254,8 +254,8 @@ static void tua6034_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tua6034 = {
 	.name  = "Infineon TUA6034",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.count = 3,
 	.set   = tua6034_bw,
@@ -278,8 +278,8 @@ static void tded4_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tded4 = {
 	.name = "ALPS TDED4",
-	.min = 47000000,
-	.max = 863000000,
+	.min =  47 * MHz,
+	.max = 863 * MHz,
 	.iffreq= 36166667,
 	.set   = tded4_bw,
 	.count = 4,
@@ -296,8 +296,8 @@ static const struct dvb_pll_desc dvb_pll_tded4 = {
  */
 static const struct dvb_pll_desc dvb_pll_tdhu2 = {
 	.name = "ALPS TDHU2",
-	.min = 54000000,
-	.max = 864000000,
+	.min =  54 * MHz,
+	.max = 864 * MHz,
 	.iffreq= 44000000,
 	.count = 4,
 	.entries = {
@@ -313,8 +313,8 @@ static const struct dvb_pll_desc dvb_pll_tdhu2 = {
  */
 static const struct dvb_pll_desc dvb_pll_samsung_tbmv = {
 	.name = "Samsung TBMV30111IN / TBMV30712IN1",
-	.min = 54000000,
-	.max = 860000000,
+	.min =  54 * MHz,
+	.max = 860 * MHz,
 	.iffreq= 44000000,
 	.count = 6,
 	.entries = {
@@ -332,8 +332,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmv =

{ */
static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {

drivers/media/dvb-frontends/dvb-pll.c +4 -4
 	.name  = "Philips SD1878",
-	.min   =  950000,
-	.max   = 2150000,
+	.min   =  950 * MHz,
+	.max   = 2150 * MHz,
 	.iffreq= 249, /* zero-IF, offset 249 is to round up */
 	.count = 4,
 	.entries = {
@@ -398,8 +398,8 @@ static void opera1_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_opera1 = {
 	.name  = "Opera Tuner",
-	.min   =  900000,
-	.max   = 2250000,
+	.min   =  900 * MHz,
+	.max   = 2250 * MHz,
 	.initdata = (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 },
 	.initdata2 = (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 },
 	.iffreq= 0,
@@ -445,8 +445,8 @@ static void samsung_dtos403ih102a_set(struct

dvb_frontend *fe, u8 *buf) /* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */
static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name   = "Samsung DTOS403IH102A",
-	.min    =  44250000,
-	.max    = 858000000,
+	.min    = 44250 * kHz,
+	.max    = 858 * MHz,
 	.iffreq =  36125000,
 	.count  = 8,
 	.set    = samsung_dtos403ih102a_set,
@@ -465,8 +465,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_dtos403ih102a = { /* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */
static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name	= "Samsung TDTC9251DH0",
-	.min	=  48000000,
-	.max	= 863000000,
+	.min	=  48 * MHz,
+	.max	= 863 * MHz,
 	.iffreq	=  36166667,
 	.count	= 3,
 	.entries = {
@@ -479,8 +479,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tdtc9251dh0 = { /* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.3 */ static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name = "Samsung TBDU18132",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -500,8 +500,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tbdu18132 = { /* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */
static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name = "Samsung TBMU24112",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -521,8 +521,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tbmu24112 = { * 822 - 862 1 * 0 0 1 0 0 0
0x88 */
static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {

drivers/media/dvb-frontends/dvb-pll.c +4 -4
 	.name = "ALPS TDEE4",
-	.min	=  47000000,
-	.max	= 862000000,
+	.min	=  47 * MHz,
+	.max	= 862 * MHz,
 	.iffreq	=  36125000,
 	.count = 4,
 	.entries = {
@@ -537,8 +537,8 @@ static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {
 /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */
 static const struct dvb_pll_desc dvb_pll_tua6034_friio = {
 	.name   = "Infineon TUA6034 ISDB-T (Friio)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 },
 	.sleepdata = (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b },
@@ -553,8 +553,8 @@ static const struct dvb_pll_desc dvb_pll_tua6034_friio =

{ /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */
static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 = {

drivers/media/dvb-frontends/dvb-pll.c +7 -14
 	.name   = "Philips TDA6651 ISDB-T (EarthSoft PT1)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 },
 	.count = 10,
@@ -845,18 +845,11 @@ struct dvb_frontend *dvb_pll_attach(struct
 dvb_frontend *fe, int pll_addr,
 
 	strncpy(fe->ops.tuner_ops.info.name, desc->name,
 		sizeof(fe->ops.tuner_ops.info.name));
-	switch (c->delivery_system) {
-	case SYS_DVBS:
-	case SYS_DVBS2:
-	case SYS_TURBO:
-	case SYS_ISDBS:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min * kHz;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max * kHz;
-		break;
-	default:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
-	}
+
+	fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
+	fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
+printk("%s: delsys: %d, frequency range: %u..%u\n",
+       __func__, c->delivery_system,
 fe->ops.tuner_ops.info.frequency_min_hz,
 fe->ops.tuner_ops.info.frequency_max_hz);

drivers/media/dvb-frontends/dvb-pll.c struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, · line 855

Quoted 2 lines
drivers/media/dvb-frontends/dvb-pll.c +0 -0
 	if (!desc->initdata)
 		fe->ops.tuner_ops.init = NULL;

I will as soon as it will be ready.
BTW, I found what you search for (was a bit hidden in the jungle):

dvb_pll_attach: delsys: 0, frequency range: 950000..2150000

[    5.213817] b2c2-flexcop: found 'ST STV0299 DVB-S' .
[    5.213820] b2c2_flexcop_pci 0000:06:06.0: DVB: registering adapter 0 
frontend 0 (ST STV0299 DVB-S)...
[    5.213876] b2c2-flexcop: initialization of 'Sky2PC/SkyStar 2 DVB-S rev 

2.6' at the 'PCI' bus controlled by a 'FlexCopIIb' complete

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

#11 lore raw
Quoted 380 lines · stakanov

In data martedì 20 novembre 2018 10:18:10 CET, Mauro Carvalho Chehab ha scritto:

Quoted 377 lines

Em Tue, 20 Nov 2018 09:07:57 +0100

stakanov <[email protected]> escreveu:

Quoted 80 lines

In data martedì 20 novembre 2018 00:58:41 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 40 lines

Em Tue, 20 Nov 2018 00:19:54 +0100

stakanov <[email protected]> escreveu:

Quoted 18 lines

In data martedì 20 novembre 2018 00:08:45 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 6 lines

uname -a

Quoted 4 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon
Nov 19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

uname -a

Quoted 4 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov
19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

Quoted 8 lines

from
https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/
standard/x86_64/

So I booted this one, should be the right one.
sudo dmesg | grep -i b2c2 should give these additional messages?

If Takashi is still around, he could confirm.

Well, if the patch got applied, you should now be getting messages similar

(but not identical) to:

	dvb_frontend_get_frequency_limits: frequencies: tuner:
	9150000...2150000,

frontend: 9150000...2150000 dvb_pll_attach: delsys: 5, frequency range:
9150000..2150000

Quoted 8 lines
Quoted 5 lines

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und
alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

Thanks,
Mauro

My bad.
With just dmesg:

[   89.399887] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.020149] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.152049] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.152058] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1880000 out of range (950000..2150)
[   98.356539] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   98.480372] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   98.480381] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1587500 out of range (950000..2150)
[  100.016823] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  100.140619] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  100.140629] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1353500 out of range (950000..2150)
[  105.361166] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  105.492972] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  105.492977] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
Quoted 4 lines

frequency 1944750 out of range (950000..2150)

Which is, I guess the info you need?

Yes, partially. Clearly, the problem is coming from the tuner, with is not reporting the frequency in Hz, but I was hoping to see another message from the tuner driver, in order for me to be sure about what's happening there.

Didn't you get any message that starts with "dvb_pll_attach"?

The thing with Flexcop is that there are several variations, each one with a different tuner driver.

Anyway, I guess I found the trouble: it is trying to use the DVB cache to check the delivery system too early (at attach time).

I suspect that the enclosed patch will fix the issue. Could you please test it?

Thanks!
Mauro

(quoted diff) +0 -0

b/drivers/media/dvb-frontends/dvb-pll.c index 6d4b2eec67b4..390ecc915096 100644

drivers/media/dvb-frontends/dvb-pll.c +4 -4
@@ -80,8 +80,8 @@ struct dvb_pll_desc {
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
 	.name  = "Thomson dtt7579",
-	.min   = 177000000,
-	.max   = 858000000,
+	.min   = 177 * MHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xb4, 0x03 },
 	.count = 4,
@@ -102,8 +102,8 @@ static void thomson_dtt759x_bw(struct dvb_frontend *fe,
 u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
 	.name  = "Thomson dtt759x",
-	.min   = 177000000,
-	.max   = 896000000,
+	.min   = 177 * MHz,
+	.max   = 896 * MHz,
 	.set   = thomson_dtt759x_bw,
 	.iffreq= 36166667,
drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.sleepdata = (u8[]){ 2, 0x84, 0x03 },
@@ -126,8 +126,8 @@ static void thomson_dtt7520x_bw(struct dvb_frontend *fe,
 u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
 	.name  = "Thomson dtt7520x",
-	.min   = 185000000,
-	.max   = 900000000,
+	.min   = 185 * MHz,
+	.max   = 900 * MHz,
 	.set   = thomson_dtt7520x_bw,
 	.iffreq = 36166667,
drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.count = 7,
@@ -144,8 +144,8 @@ static const struct dvb_pll_desc
 dvb_pll_thomson_dtt7520x = {
 
 static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 	.name  = "LG z201",
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xbc, 0x03 },
drivers/media/dvb-frontends/dvb-pll.c +16 -16
 	.count = 5,
@@ -160,8 +160,8 @@ static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 
 static const struct dvb_pll_desc dvb_pll_unknown_1 = {
 	.name  = "unknown 1", /* used by dntv live dvb-t */
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.count = 9,
 	.entries = {
@@ -182,8 +182,8 @@ static const struct dvb_pll_desc dvb_pll_unknown_1 = {
  */
 static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 	.name  = "Infineon TUA6010XS",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 3,
 	.entries = {
@@ -196,8 +196,8 @@ static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 /* Panasonic env57h1xd5 (some Philips PLL ?) */
 static const struct dvb_pll_desc dvb_pll_env57h1xd5 = {
 	.name  = "Panasonic ENV57H1XD5",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 4,
 	.entries = {
@@ -220,8 +220,8 @@ static void tda665x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tda665x = {
 	.name  = "Philips TDA6650/TDA6651",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.set   = tda665x_bw,
 	.iffreq= 36166667,
 	.initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
@@ -254,8 +254,8 @@ static void tua6034_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tua6034 = {
 	.name  = "Infineon TUA6034",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.count = 3,
 	.set   = tua6034_bw,
@@ -278,8 +278,8 @@ static void tded4_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tded4 = {
 	.name = "ALPS TDED4",
-	.min = 47000000,
-	.max = 863000000,
+	.min =  47 * MHz,
+	.max = 863 * MHz,
 	.iffreq= 36166667,
 	.set   = tded4_bw,
 	.count = 4,
@@ -296,8 +296,8 @@ static const struct dvb_pll_desc dvb_pll_tded4 = {
  */
 static const struct dvb_pll_desc dvb_pll_tdhu2 = {
 	.name = "ALPS TDHU2",
-	.min = 54000000,
-	.max = 864000000,
+	.min =  54 * MHz,
+	.max = 864 * MHz,
 	.iffreq= 44000000,
 	.count = 4,
 	.entries = {
@@ -313,8 +313,8 @@ static const struct dvb_pll_desc dvb_pll_tdhu2 = {
  */
 static const struct dvb_pll_desc dvb_pll_samsung_tbmv = {
 	.name = "Samsung TBMV30111IN / TBMV30712IN1",
-	.min = 54000000,
-	.max = 860000000,
+	.min =  54 * MHz,
+	.max = 860 * MHz,
 	.iffreq= 44000000,
 	.count = 6,
 	.entries = {
@@ -332,8 +332,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmv =

{ */
static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {

drivers/media/dvb-frontends/dvb-pll.c +4 -4
 	.name  = "Philips SD1878",
-	.min   =  950000,
-	.max   = 2150000,
+	.min   =  950 * MHz,
+	.max   = 2150 * MHz,
 	.iffreq= 249, /* zero-IF, offset 249 is to round up */
 	.count = 4,
 	.entries = {
@@ -398,8 +398,8 @@ static void opera1_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_opera1 = {
 	.name  = "Opera Tuner",
-	.min   =  900000,
-	.max   = 2250000,
+	.min   =  900 * MHz,
+	.max   = 2250 * MHz,
 	.initdata = (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 },
 	.initdata2 = (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 },
 	.iffreq= 0,
@@ -445,8 +445,8 @@ static void samsung_dtos403ih102a_set(struct

dvb_frontend *fe, u8 *buf) /* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */
static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name   = "Samsung DTOS403IH102A",
-	.min    =  44250000,
-	.max    = 858000000,
+	.min    = 44250 * kHz,
+	.max    = 858 * MHz,
 	.iffreq =  36125000,
 	.count  = 8,
 	.set    = samsung_dtos403ih102a_set,
@@ -465,8 +465,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_dtos403ih102a = { /* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */
static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name	= "Samsung TDTC9251DH0",
-	.min	=  48000000,
-	.max	= 863000000,
+	.min	=  48 * MHz,
+	.max	= 863 * MHz,
 	.iffreq	=  36166667,
 	.count	= 3,
 	.entries = {
@@ -479,8 +479,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tdtc9251dh0 = { /* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.3 */ static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name = "Samsung TBDU18132",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -500,8 +500,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tbdu18132 = { /* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */
static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name = "Samsung TBMU24112",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -521,8 +521,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tbmu24112 = { * 822 - 862 1 * 0 0 1 0 0 0
0x88 */
static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {

drivers/media/dvb-frontends/dvb-pll.c +4 -4
 	.name = "ALPS TDEE4",
-	.min	=  47000000,
-	.max	= 862000000,
+	.min	=  47 * MHz,
+	.max	= 862 * MHz,
 	.iffreq	=  36125000,
 	.count = 4,
 	.entries = {
@@ -537,8 +537,8 @@ static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {
 /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */
 static const struct dvb_pll_desc dvb_pll_tua6034_friio = {
 	.name   = "Infineon TUA6034 ISDB-T (Friio)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 },
 	.sleepdata = (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b },
@@ -553,8 +553,8 @@ static const struct dvb_pll_desc dvb_pll_tua6034_friio =

{ /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */
static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 = {

drivers/media/dvb-frontends/dvb-pll.c +7 -14
 	.name   = "Philips TDA6651 ISDB-T (EarthSoft PT1)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 },
 	.count = 10,
@@ -845,18 +845,11 @@ struct dvb_frontend *dvb_pll_attach(struct
 dvb_frontend *fe, int pll_addr,
 
 	strncpy(fe->ops.tuner_ops.info.name, desc->name,
 		sizeof(fe->ops.tuner_ops.info.name));
-	switch (c->delivery_system) {
-	case SYS_DVBS:
-	case SYS_DVBS2:
-	case SYS_TURBO:
-	case SYS_ISDBS:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min * kHz;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max * kHz;
-		break;
-	default:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
-	}
+
+	fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
+	fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
+printk("%s: delsys: %d, frequency range: %u..%u\n",
+       __func__, c->delivery_system,
 fe->ops.tuner_ops.info.frequency_min_hz,
 fe->ops.tuner_ops.info.frequency_max_hz);
Quoted 5 lines

drivers/media/dvb-frontends/dvb-pll.c struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, · line 855

Quoted 2 lines
drivers/media/dvb-frontends/dvb-pll.c +0 -0
 	if (!desc->initdata)
 		fe->ops.tuner_ops.init = NULL;

I will as soon as it will be ready.

FWIW, a test kernel with this patch is being built in the same OBS repo, home:tiwai:bsc1116374. It'll be ready in an hour or so.

Takashi

#12 lore raw

Em Tue, 20 Nov 2018 10:54:22 +0100
Takashi Iwai <[email protected]> escreveu:

Quoted 382 lines
Quoted 380 lines · stakanov

In data martedì 20 novembre 2018 10:18:10 CET, Mauro Carvalho Chehab ha scritto:

Quoted 377 lines

Em Tue, 20 Nov 2018 09:07:57 +0100

stakanov <[email protected]> escreveu:

Quoted 80 lines

In data martedì 20 novembre 2018 00:58:41 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 40 lines

Em Tue, 20 Nov 2018 00:19:54 +0100

stakanov <[email protected]> escreveu:

Quoted 18 lines

In data martedì 20 novembre 2018 00:08:45 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 6 lines

uname -a

Quoted 4 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon
Nov 19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

uname -a

Quoted 4 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov
19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

Quoted 8 lines

from
https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/
standard/x86_64/

So I booted this one, should be the right one.
sudo dmesg | grep -i b2c2 should give these additional messages?

If Takashi is still around, he could confirm.

Well, if the patch got applied, you should now be getting messages similar

(but not identical) to:

	dvb_frontend_get_frequency_limits: frequencies: tuner:
	9150000...2150000,

frontend: 9150000...2150000 dvb_pll_attach: delsys: 5, frequency range:
9150000..2150000

Quoted 8 lines
Quoted 5 lines

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und
alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

Thanks,
Mauro

My bad.
With just dmesg:

[   89.399887] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.020149] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.152049] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.152058] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1880000 out of range (950000..2150)
[   98.356539] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   98.480372] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   98.480381] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1587500 out of range (950000..2150)
[  100.016823] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  100.140619] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  100.140629] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1353500 out of range (950000..2150)
[  105.361166] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  105.492972] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  105.492977] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
Quoted 4 lines

frequency 1944750 out of range (950000..2150)

Which is, I guess the info you need?

Yes, partially. Clearly, the problem is coming from the tuner, with is not reporting the frequency in Hz, but I was hoping to see another message from the tuner driver, in order for me to be sure about what's happening there.

Didn't you get any message that starts with "dvb_pll_attach"?

The thing with Flexcop is that there are several variations, each one with a different tuner driver.

Anyway, I guess I found the trouble: it is trying to use the DVB cache to check the delivery system too early (at attach time).

I suspect that the enclosed patch will fix the issue. Could you please test it?

Thanks!
Mauro

(quoted diff) +0 -0

b/drivers/media/dvb-frontends/dvb-pll.c index 6d4b2eec67b4..390ecc915096 100644

drivers/media/dvb-frontends/dvb-pll.c +4 -4
@@ -80,8 +80,8 @@ struct dvb_pll_desc {
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
 	.name  = "Thomson dtt7579",
-	.min   = 177000000,
-	.max   = 858000000,
+	.min   = 177 * MHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xb4, 0x03 },
 	.count = 4,
@@ -102,8 +102,8 @@ static void thomson_dtt759x_bw(struct dvb_frontend *fe,
 u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
 	.name  = "Thomson dtt759x",
-	.min   = 177000000,
-	.max   = 896000000,
+	.min   = 177 * MHz,
+	.max   = 896 * MHz,
 	.set   = thomson_dtt759x_bw,
 	.iffreq= 36166667,
drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.sleepdata = (u8[]){ 2, 0x84, 0x03 },
@@ -126,8 +126,8 @@ static void thomson_dtt7520x_bw(struct dvb_frontend *fe,
 u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
 	.name  = "Thomson dtt7520x",
-	.min   = 185000000,
-	.max   = 900000000,
+	.min   = 185 * MHz,
+	.max   = 900 * MHz,
 	.set   = thomson_dtt7520x_bw,
 	.iffreq = 36166667,
drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.count = 7,
@@ -144,8 +144,8 @@ static const struct dvb_pll_desc
 dvb_pll_thomson_dtt7520x = {
 
 static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 	.name  = "LG z201",
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xbc, 0x03 },
drivers/media/dvb-frontends/dvb-pll.c +16 -16
 	.count = 5,
@@ -160,8 +160,8 @@ static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 
 static const struct dvb_pll_desc dvb_pll_unknown_1 = {
 	.name  = "unknown 1", /* used by dntv live dvb-t */
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.count = 9,
 	.entries = {
@@ -182,8 +182,8 @@ static const struct dvb_pll_desc dvb_pll_unknown_1 = {
  */
 static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 	.name  = "Infineon TUA6010XS",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 3,
 	.entries = {
@@ -196,8 +196,8 @@ static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 /* Panasonic env57h1xd5 (some Philips PLL ?) */
 static const struct dvb_pll_desc dvb_pll_env57h1xd5 = {
 	.name  = "Panasonic ENV57H1XD5",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 4,
 	.entries = {
@@ -220,8 +220,8 @@ static void tda665x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tda665x = {
 	.name  = "Philips TDA6650/TDA6651",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.set   = tda665x_bw,
 	.iffreq= 36166667,
 	.initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
@@ -254,8 +254,8 @@ static void tua6034_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tua6034 = {
 	.name  = "Infineon TUA6034",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.count = 3,
 	.set   = tua6034_bw,
@@ -278,8 +278,8 @@ static void tded4_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tded4 = {
 	.name = "ALPS TDED4",
-	.min = 47000000,
-	.max = 863000000,
+	.min =  47 * MHz,
+	.max = 863 * MHz,
 	.iffreq= 36166667,
 	.set   = tded4_bw,
 	.count = 4,
@@ -296,8 +296,8 @@ static const struct dvb_pll_desc dvb_pll_tded4 = {
  */
 static const struct dvb_pll_desc dvb_pll_tdhu2 = {
 	.name = "ALPS TDHU2",
-	.min = 54000000,
-	.max = 864000000,
+	.min =  54 * MHz,
+	.max = 864 * MHz,
 	.iffreq= 44000000,
 	.count = 4,
 	.entries = {
@@ -313,8 +313,8 @@ static const struct dvb_pll_desc dvb_pll_tdhu2 = {
  */
 static const struct dvb_pll_desc dvb_pll_samsung_tbmv = {
 	.name = "Samsung TBMV30111IN / TBMV30712IN1",
-	.min = 54000000,
-	.max = 860000000,
+	.min =  54 * MHz,
+	.max = 860 * MHz,
 	.iffreq= 44000000,
 	.count = 6,
 	.entries = {
@@ -332,8 +332,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmv =

{ */
static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {

drivers/media/dvb-frontends/dvb-pll.c +4 -4
 	.name  = "Philips SD1878",
-	.min   =  950000,
-	.max   = 2150000,
+	.min   =  950 * MHz,
+	.max   = 2150 * MHz,
 	.iffreq= 249, /* zero-IF, offset 249 is to round up */
 	.count = 4,
 	.entries = {
@@ -398,8 +398,8 @@ static void opera1_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_opera1 = {
 	.name  = "Opera Tuner",
-	.min   =  900000,
-	.max   = 2250000,
+	.min   =  900 * MHz,
+	.max   = 2250 * MHz,
 	.initdata = (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 },
 	.initdata2 = (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 },
 	.iffreq= 0,
@@ -445,8 +445,8 @@ static void samsung_dtos403ih102a_set(struct

dvb_frontend *fe, u8 *buf) /* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */
static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name   = "Samsung DTOS403IH102A",
-	.min    =  44250000,
-	.max    = 858000000,
+	.min    = 44250 * kHz,
+	.max    = 858 * MHz,
 	.iffreq =  36125000,
 	.count  = 8,
 	.set    = samsung_dtos403ih102a_set,
@@ -465,8 +465,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_dtos403ih102a = { /* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */
static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name	= "Samsung TDTC9251DH0",
-	.min	=  48000000,
-	.max	= 863000000,
+	.min	=  48 * MHz,
+	.max	= 863 * MHz,
 	.iffreq	=  36166667,
 	.count	= 3,
 	.entries = {
@@ -479,8 +479,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tdtc9251dh0 = { /* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.3 */ static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name = "Samsung TBDU18132",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -500,8 +500,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tbdu18132 = { /* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */
static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name = "Samsung TBMU24112",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -521,8 +521,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tbmu24112 = { * 822 - 862 1 * 0 0 1 0 0 0
0x88 */
static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {

drivers/media/dvb-frontends/dvb-pll.c +4 -4
 	.name = "ALPS TDEE4",
-	.min	=  47000000,
-	.max	= 862000000,
+	.min	=  47 * MHz,
+	.max	= 862 * MHz,
 	.iffreq	=  36125000,
 	.count = 4,
 	.entries = {
@@ -537,8 +537,8 @@ static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {
 /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */
 static const struct dvb_pll_desc dvb_pll_tua6034_friio = {
 	.name   = "Infineon TUA6034 ISDB-T (Friio)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 },
 	.sleepdata = (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b },
@@ -553,8 +553,8 @@ static const struct dvb_pll_desc dvb_pll_tua6034_friio =

{ /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */
static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 = {

drivers/media/dvb-frontends/dvb-pll.c +7 -14
 	.name   = "Philips TDA6651 ISDB-T (EarthSoft PT1)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 },
 	.count = 10,
@@ -845,18 +845,11 @@ struct dvb_frontend *dvb_pll_attach(struct
 dvb_frontend *fe, int pll_addr,
 
 	strncpy(fe->ops.tuner_ops.info.name, desc->name,
 		sizeof(fe->ops.tuner_ops.info.name));
-	switch (c->delivery_system) {
-	case SYS_DVBS:
-	case SYS_DVBS2:
-	case SYS_TURBO:
-	case SYS_ISDBS:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min * kHz;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max * kHz;
-		break;
-	default:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
-	}
+
+	fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
+	fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
+printk("%s: delsys: %d, frequency range: %u..%u\n",
+       __func__, c->delivery_system,
 fe->ops.tuner_ops.info.frequency_min_hz,
 fe->ops.tuner_ops.info.frequency_max_hz);
Quoted 8 lines
Quoted 5 lines

drivers/media/dvb-frontends/dvb-pll.c struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, · line 855

Quoted 2 lines
drivers/media/dvb-frontends/dvb-pll.c +0 -0
 	if (!desc->initdata)
 		fe->ops.tuner_ops.init = NULL;  

I will as soon as it will be ready.

FWIW, a test kernel with this patch is being built in the same OBS repo, home:tiwai:bsc1116374. It'll be ready in an hour or so.

Btw, assuming that this patch will fix the issue, I just submitted a series with it (and with an additional patch fixing a minor issue with dprintk at dvb_frontend):

	https://patchwork.linuxtv.org/patch/53044/
	https://patchwork.linuxtv.org/patch/53045/
	https://patchwork.linuxtv.org/patch/53046/

We should probably migrate dprintk at dvb-pll and dvb_frontend to use dev_foo() instead of pr_fmt(), but this is out of the scope of those fixes.

Thanks,
Mauro

#13 lore raw
Quoted 399 lines · Mauro Carvalho Chehab

Em Tue, 20 Nov 2018 10:54:22 +0100
Takashi Iwai <[email protected]> escreveu:

Quoted 382 lines
Quoted 380 lines · stakanov

In data martedì 20 novembre 2018 10:18:10 CET, Mauro Carvalho Chehab ha scritto:

Quoted 377 lines

Em Tue, 20 Nov 2018 09:07:57 +0100

stakanov <[email protected]> escreveu:

Quoted 80 lines

In data martedì 20 novembre 2018 00:58:41 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 40 lines

Em Tue, 20 Nov 2018 00:19:54 +0100

stakanov <[email protected]> escreveu:

Quoted 18 lines

In data martedì 20 novembre 2018 00:08:45 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 6 lines

uname -a

Quoted 4 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon
Nov 19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

uname -a

Quoted 4 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov
19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

Quoted 8 lines

from
https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/
standard/x86_64/

So I booted this one, should be the right one.
sudo dmesg | grep -i b2c2 should give these additional messages?

If Takashi is still around, he could confirm.

Well, if the patch got applied, you should now be getting messages similar

(but not identical) to:

	dvb_frontend_get_frequency_limits: frequencies: tuner:
	9150000...2150000,

frontend: 9150000...2150000 dvb_pll_attach: delsys: 5, frequency range:
9150000..2150000

Quoted 8 lines
Quoted 5 lines

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und
alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

Thanks,
Mauro

My bad.
With just dmesg:

[   89.399887] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.020149] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.152049] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.152058] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1880000 out of range (950000..2150)
[   98.356539] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   98.480372] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   98.480381] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1587500 out of range (950000..2150)
[  100.016823] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  100.140619] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  100.140629] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1353500 out of range (950000..2150)
[  105.361166] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  105.492972] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  105.492977] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
Quoted 4 lines

frequency 1944750 out of range (950000..2150)

Which is, I guess the info you need?

Yes, partially. Clearly, the problem is coming from the tuner, with is not reporting the frequency in Hz, but I was hoping to see another message from the tuner driver, in order for me to be sure about what's happening there.

Didn't you get any message that starts with "dvb_pll_attach"?

The thing with Flexcop is that there are several variations, each one with a different tuner driver.

Anyway, I guess I found the trouble: it is trying to use the DVB cache to check the delivery system too early (at attach time).

I suspect that the enclosed patch will fix the issue. Could you please test it?

Thanks!
Mauro

(quoted diff) +0 -0

b/drivers/media/dvb-frontends/dvb-pll.c index 6d4b2eec67b4..390ecc915096 100644

drivers/media/dvb-frontends/dvb-pll.c +4 -4
@@ -80,8 +80,8 @@ struct dvb_pll_desc {
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
 	.name  = "Thomson dtt7579",
-	.min   = 177000000,
-	.max   = 858000000,
+	.min   = 177 * MHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xb4, 0x03 },
 	.count = 4,
@@ -102,8 +102,8 @@ static void thomson_dtt759x_bw(struct dvb_frontend *fe,
 u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
 	.name  = "Thomson dtt759x",
-	.min   = 177000000,
-	.max   = 896000000,
+	.min   = 177 * MHz,
+	.max   = 896 * MHz,
 	.set   = thomson_dtt759x_bw,
 	.iffreq= 36166667,
drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.sleepdata = (u8[]){ 2, 0x84, 0x03 },
@@ -126,8 +126,8 @@ static void thomson_dtt7520x_bw(struct dvb_frontend *fe,
 u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
 	.name  = "Thomson dtt7520x",
-	.min   = 185000000,
-	.max   = 900000000,
+	.min   = 185 * MHz,
+	.max   = 900 * MHz,
 	.set   = thomson_dtt7520x_bw,
 	.iffreq = 36166667,
drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.count = 7,
@@ -144,8 +144,8 @@ static const struct dvb_pll_desc
 dvb_pll_thomson_dtt7520x = {
 
 static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 	.name  = "LG z201",
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xbc, 0x03 },
drivers/media/dvb-frontends/dvb-pll.c +16 -16
 	.count = 5,
@@ -160,8 +160,8 @@ static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 
 static const struct dvb_pll_desc dvb_pll_unknown_1 = {
 	.name  = "unknown 1", /* used by dntv live dvb-t */
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.count = 9,
 	.entries = {
@@ -182,8 +182,8 @@ static const struct dvb_pll_desc dvb_pll_unknown_1 = {
  */
 static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 	.name  = "Infineon TUA6010XS",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 3,
 	.entries = {
@@ -196,8 +196,8 @@ static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 /* Panasonic env57h1xd5 (some Philips PLL ?) */
 static const struct dvb_pll_desc dvb_pll_env57h1xd5 = {
 	.name  = "Panasonic ENV57H1XD5",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 4,
 	.entries = {
@@ -220,8 +220,8 @@ static void tda665x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tda665x = {
 	.name  = "Philips TDA6650/TDA6651",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.set   = tda665x_bw,
 	.iffreq= 36166667,
 	.initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
@@ -254,8 +254,8 @@ static void tua6034_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tua6034 = {
 	.name  = "Infineon TUA6034",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.count = 3,
 	.set   = tua6034_bw,
@@ -278,8 +278,8 @@ static void tded4_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tded4 = {
 	.name = "ALPS TDED4",
-	.min = 47000000,
-	.max = 863000000,
+	.min =  47 * MHz,
+	.max = 863 * MHz,
 	.iffreq= 36166667,
 	.set   = tded4_bw,
 	.count = 4,
@@ -296,8 +296,8 @@ static const struct dvb_pll_desc dvb_pll_tded4 = {
  */
 static const struct dvb_pll_desc dvb_pll_tdhu2 = {
 	.name = "ALPS TDHU2",
-	.min = 54000000,
-	.max = 864000000,
+	.min =  54 * MHz,
+	.max = 864 * MHz,
 	.iffreq= 44000000,
 	.count = 4,
 	.entries = {
@@ -313,8 +313,8 @@ static const struct dvb_pll_desc dvb_pll_tdhu2 = {
  */
 static const struct dvb_pll_desc dvb_pll_samsung_tbmv = {
 	.name = "Samsung TBMV30111IN / TBMV30712IN1",
-	.min = 54000000,
-	.max = 860000000,
+	.min =  54 * MHz,
+	.max = 860 * MHz,
 	.iffreq= 44000000,
 	.count = 6,
 	.entries = {
@@ -332,8 +332,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmv =

{ */
static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {

drivers/media/dvb-frontends/dvb-pll.c +4 -4
 	.name  = "Philips SD1878",
-	.min   =  950000,
-	.max   = 2150000,
+	.min   =  950 * MHz,
+	.max   = 2150 * MHz,
 	.iffreq= 249, /* zero-IF, offset 249 is to round up */
 	.count = 4,
 	.entries = {
@@ -398,8 +398,8 @@ static void opera1_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_opera1 = {
 	.name  = "Opera Tuner",
-	.min   =  900000,
-	.max   = 2250000,
+	.min   =  900 * MHz,
+	.max   = 2250 * MHz,
 	.initdata = (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 },
 	.initdata2 = (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 },
 	.iffreq= 0,
@@ -445,8 +445,8 @@ static void samsung_dtos403ih102a_set(struct

dvb_frontend *fe, u8 *buf) /* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */
static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name   = "Samsung DTOS403IH102A",
-	.min    =  44250000,
-	.max    = 858000000,
+	.min    = 44250 * kHz,
+	.max    = 858 * MHz,
 	.iffreq =  36125000,
 	.count  = 8,
 	.set    = samsung_dtos403ih102a_set,
@@ -465,8 +465,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_dtos403ih102a = { /* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */
static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name	= "Samsung TDTC9251DH0",
-	.min	=  48000000,
-	.max	= 863000000,
+	.min	=  48 * MHz,
+	.max	= 863 * MHz,
 	.iffreq	=  36166667,
 	.count	= 3,
 	.entries = {
@@ -479,8 +479,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tdtc9251dh0 = { /* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.3 */ static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name = "Samsung TBDU18132",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -500,8 +500,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tbdu18132 = { /* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */
static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name = "Samsung TBMU24112",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -521,8 +521,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tbmu24112 = { * 822 - 862 1 * 0 0 1 0 0 0
0x88 */
static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {

drivers/media/dvb-frontends/dvb-pll.c +4 -4
 	.name = "ALPS TDEE4",
-	.min	=  47000000,
-	.max	= 862000000,
+	.min	=  47 * MHz,
+	.max	= 862 * MHz,
 	.iffreq	=  36125000,
 	.count = 4,
 	.entries = {
@@ -537,8 +537,8 @@ static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {
 /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */
 static const struct dvb_pll_desc dvb_pll_tua6034_friio = {
 	.name   = "Infineon TUA6034 ISDB-T (Friio)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 },
 	.sleepdata = (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b },
@@ -553,8 +553,8 @@ static const struct dvb_pll_desc dvb_pll_tua6034_friio =

{ /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */
static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 = {

drivers/media/dvb-frontends/dvb-pll.c +7 -14
 	.name   = "Philips TDA6651 ISDB-T (EarthSoft PT1)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 },
 	.count = 10,
@@ -845,18 +845,11 @@ struct dvb_frontend *dvb_pll_attach(struct
 dvb_frontend *fe, int pll_addr,
 
 	strncpy(fe->ops.tuner_ops.info.name, desc->name,
 		sizeof(fe->ops.tuner_ops.info.name));
-	switch (c->delivery_system) {
-	case SYS_DVBS:
-	case SYS_DVBS2:
-	case SYS_TURBO:
-	case SYS_ISDBS:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min * kHz;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max * kHz;
-		break;
-	default:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
-	}
+
+	fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
+	fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
+printk("%s: delsys: %d, frequency range: %u..%u\n",
+       __func__, c->delivery_system,
 fe->ops.tuner_ops.info.frequency_min_hz,
 fe->ops.tuner_ops.info.frequency_max_hz);
Quoted 8 lines
Quoted 5 lines

drivers/media/dvb-frontends/dvb-pll.c struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, · line 855

Quoted 2 lines
drivers/media/dvb-frontends/dvb-pll.c +0 -0
 	if (!desc->initdata)
 		fe->ops.tuner_ops.init = NULL;  

I will as soon as it will be ready.

FWIW, a test kernel with this patch is being built in the same OBS repo, home:tiwai:bsc1116374. It'll be ready in an hour or so.

Btw, assuming that this patch will fix the issue, I just submitted a series with it (and with an additional patch fixing a minor issue with dprintk at dvb_frontend):

Quoted 7 lines
	https://patchwork.linuxtv.org/patch/53044/
	https://patchwork.linuxtv.org/patch/53045/
	https://patchwork.linuxtv.org/patch/53046/

We should probably migrate dprintk at dvb-pll and dvb_frontend to use dev_foo() instead of pr_fmt(), but this is out of the scope of those fixes.

Could you mark the last one for stable?
And, it should have fixes tag

Fixes a3f90c75b833 ("media: dvb: convert tuner_info frequencies to Hz")

too.

Also, you can put the bugzilla link as a reference
https://bugzilla.opensuse.org/show_bug.cgi?id=1116374

thanks,

Takashi

#14 lore raw

Em Tue, 20 Nov 2018 12:11:03 +0100
Takashi Iwai <[email protected]> escreveu:

Quoted 409 lines
Quoted 399 lines · Mauro Carvalho Chehab

Em Tue, 20 Nov 2018 10:54:22 +0100
Takashi Iwai <[email protected]> escreveu:

Quoted 382 lines
Quoted 380 lines · stakanov

In data martedì 20 novembre 2018 10:18:10 CET, Mauro Carvalho Chehab ha scritto:

Quoted 377 lines

Em Tue, 20 Nov 2018 09:07:57 +0100

stakanov <[email protected]> escreveu:

Quoted 80 lines

In data martedì 20 novembre 2018 00:58:41 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 40 lines

Em Tue, 20 Nov 2018 00:19:54 +0100

stakanov <[email protected]> escreveu:

Quoted 18 lines

In data martedì 20 novembre 2018 00:08:45 CET, Mauro Carvalho Chehab ha

scritto:

Quoted 6 lines

uname -a

Quoted 4 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon
Nov 19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

uname -a

Quoted 4 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov
19
18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

Quoted 8 lines

from
https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/
standard/x86_64/

So I booted this one, should be the right one.
sudo dmesg | grep -i b2c2 should give these additional messages?

If Takashi is still around, he could confirm.

Well, if the patch got applied, you should now be getting messages similar

(but not identical) to:

	dvb_frontend_get_frequency_limits: frequencies: tuner:
	9150000...2150000,

frontend: 9150000...2150000 dvb_pll_attach: delsys: 5, frequency range:
9150000..2150000

Quoted 8 lines
Quoted 5 lines

_________________________________________________________________
________________________________________________________
Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und
alte E-Mail-Adresse mitnehmen! https://www.eclipso.de

Thanks,
Mauro

My bad.
With just dmesg:

[   89.399887] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.020149] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.152049] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   95.152058] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1880000 out of range (950000..2150)
[   98.356539] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   98.480372] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[   98.480381] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1587500 out of range (950000..2150)
[  100.016823] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  100.140619] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  100.140629] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
frequency 1353500 out of range (950000..2150)
[  105.361166] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  105.492972] dvb_frontend_get_frequency_limits: frequencies: tuner:
950000...2150000, frontend: 950000000...2150000000
[  105.492977] b2c2_flexcop_pci 0000:06:06.0: DVB: adapter 0 frontend 0
Quoted 4 lines

frequency 1944750 out of range (950000..2150)

Which is, I guess the info you need?

Yes, partially. Clearly, the problem is coming from the tuner, with is not reporting the frequency in Hz, but I was hoping to see another message from the tuner driver, in order for me to be sure about what's happening there.

Didn't you get any message that starts with "dvb_pll_attach"?

The thing with Flexcop is that there are several variations, each one with a different tuner driver.

Anyway, I guess I found the trouble: it is trying to use the DVB cache to check the delivery system too early (at attach time).

I suspect that the enclosed patch will fix the issue. Could you please test it?

Thanks!
Mauro

(quoted diff) +0 -0

b/drivers/media/dvb-frontends/dvb-pll.c index 6d4b2eec67b4..390ecc915096 100644

drivers/media/dvb-frontends/dvb-pll.c +4 -4
@@ -80,8 +80,8 @@ struct dvb_pll_desc {
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
 	.name  = "Thomson dtt7579",
-	.min   = 177000000,
-	.max   = 858000000,
+	.min   = 177 * MHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xb4, 0x03 },
 	.count = 4,
@@ -102,8 +102,8 @@ static void thomson_dtt759x_bw(struct dvb_frontend *fe,
 u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
 	.name  = "Thomson dtt759x",
-	.min   = 177000000,
-	.max   = 896000000,
+	.min   = 177 * MHz,
+	.max   = 896 * MHz,
 	.set   = thomson_dtt759x_bw,
 	.iffreq= 36166667,
drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.sleepdata = (u8[]){ 2, 0x84, 0x03 },
@@ -126,8 +126,8 @@ static void thomson_dtt7520x_bw(struct dvb_frontend *fe,
 u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
 	.name  = "Thomson dtt7520x",
-	.min   = 185000000,
-	.max   = 900000000,
+	.min   = 185 * MHz,
+	.max   = 900 * MHz,
 	.set   = thomson_dtt7520x_bw,
 	.iffreq = 36166667,
drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.count = 7,
@@ -144,8 +144,8 @@ static const struct dvb_pll_desc
 dvb_pll_thomson_dtt7520x = {
 
 static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 	.name  = "LG z201",
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xbc, 0x03 },
drivers/media/dvb-frontends/dvb-pll.c +16 -16
 	.count = 5,
@@ -160,8 +160,8 @@ static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 
 static const struct dvb_pll_desc dvb_pll_unknown_1 = {
 	.name  = "unknown 1", /* used by dntv live dvb-t */
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.count = 9,
 	.entries = {
@@ -182,8 +182,8 @@ static const struct dvb_pll_desc dvb_pll_unknown_1 = {
  */
 static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 	.name  = "Infineon TUA6010XS",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 3,
 	.entries = {
@@ -196,8 +196,8 @@ static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 /* Panasonic env57h1xd5 (some Philips PLL ?) */
 static const struct dvb_pll_desc dvb_pll_env57h1xd5 = {
 	.name  = "Panasonic ENV57H1XD5",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 4,
 	.entries = {
@@ -220,8 +220,8 @@ static void tda665x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tda665x = {
 	.name  = "Philips TDA6650/TDA6651",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.set   = tda665x_bw,
 	.iffreq= 36166667,
 	.initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
@@ -254,8 +254,8 @@ static void tua6034_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tua6034 = {
 	.name  = "Infineon TUA6034",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.count = 3,
 	.set   = tua6034_bw,
@@ -278,8 +278,8 @@ static void tded4_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tded4 = {
 	.name = "ALPS TDED4",
-	.min = 47000000,
-	.max = 863000000,
+	.min =  47 * MHz,
+	.max = 863 * MHz,
 	.iffreq= 36166667,
 	.set   = tded4_bw,
 	.count = 4,
@@ -296,8 +296,8 @@ static const struct dvb_pll_desc dvb_pll_tded4 = {
  */
 static const struct dvb_pll_desc dvb_pll_tdhu2 = {
 	.name = "ALPS TDHU2",
-	.min = 54000000,
-	.max = 864000000,
+	.min =  54 * MHz,
+	.max = 864 * MHz,
 	.iffreq= 44000000,
 	.count = 4,
 	.entries = {
@@ -313,8 +313,8 @@ static const struct dvb_pll_desc dvb_pll_tdhu2 = {
  */
 static const struct dvb_pll_desc dvb_pll_samsung_tbmv = {
 	.name = "Samsung TBMV30111IN / TBMV30712IN1",
-	.min = 54000000,
-	.max = 860000000,
+	.min =  54 * MHz,
+	.max = 860 * MHz,
 	.iffreq= 44000000,
 	.count = 6,
 	.entries = {
@@ -332,8 +332,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmv =

{ */
static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {

drivers/media/dvb-frontends/dvb-pll.c +4 -4
 	.name  = "Philips SD1878",
-	.min   =  950000,
-	.max   = 2150000,
+	.min   =  950 * MHz,
+	.max   = 2150 * MHz,
 	.iffreq= 249, /* zero-IF, offset 249 is to round up */
 	.count = 4,
 	.entries = {
@@ -398,8 +398,8 @@ static void opera1_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_opera1 = {
 	.name  = "Opera Tuner",
-	.min   =  900000,
-	.max   = 2250000,
+	.min   =  900 * MHz,
+	.max   = 2250 * MHz,
 	.initdata = (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 },
 	.initdata2 = (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 },
 	.iffreq= 0,
@@ -445,8 +445,8 @@ static void samsung_dtos403ih102a_set(struct

dvb_frontend *fe, u8 *buf) /* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */
static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name   = "Samsung DTOS403IH102A",
-	.min    =  44250000,
-	.max    = 858000000,
+	.min    = 44250 * kHz,
+	.max    = 858 * MHz,
 	.iffreq =  36125000,
 	.count  = 8,
 	.set    = samsung_dtos403ih102a_set,
@@ -465,8 +465,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_dtos403ih102a = { /* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */
static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name	= "Samsung TDTC9251DH0",
-	.min	=  48000000,
-	.max	= 863000000,
+	.min	=  48 * MHz,
+	.max	= 863 * MHz,
 	.iffreq	=  36166667,
 	.count	= 3,
 	.entries = {
@@ -479,8 +479,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tdtc9251dh0 = { /* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.3 */ static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name = "Samsung TBDU18132",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -500,8 +500,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tbdu18132 = { /* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */
static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {

drivers/media/dvb-frontends/dvb-pll.c +2 -2
 	.name = "Samsung TBMU24112",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -521,8 +521,8 @@ static const struct dvb_pll_desc

dvb_pll_samsung_tbmu24112 = { * 822 - 862 1 * 0 0 1 0 0 0
0x88 */
static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {

drivers/media/dvb-frontends/dvb-pll.c +4 -4
 	.name = "ALPS TDEE4",
-	.min	=  47000000,
-	.max	= 862000000,
+	.min	=  47 * MHz,
+	.max	= 862 * MHz,
 	.iffreq	=  36125000,
 	.count = 4,
 	.entries = {
@@ -537,8 +537,8 @@ static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {
 /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */
 static const struct dvb_pll_desc dvb_pll_tua6034_friio = {
 	.name   = "Infineon TUA6034 ISDB-T (Friio)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 },
 	.sleepdata = (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b },
@@ -553,8 +553,8 @@ static const struct dvb_pll_desc dvb_pll_tua6034_friio =

{ /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */
static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 = {

drivers/media/dvb-frontends/dvb-pll.c +7 -14
 	.name   = "Philips TDA6651 ISDB-T (EarthSoft PT1)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 },
 	.count = 10,
@@ -845,18 +845,11 @@ struct dvb_frontend *dvb_pll_attach(struct
 dvb_frontend *fe, int pll_addr,
 
 	strncpy(fe->ops.tuner_ops.info.name, desc->name,
 		sizeof(fe->ops.tuner_ops.info.name));
-	switch (c->delivery_system) {
-	case SYS_DVBS:
-	case SYS_DVBS2:
-	case SYS_TURBO:
-	case SYS_ISDBS:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min * kHz;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max * kHz;
-		break;
-	default:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
-	}
+
+	fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
+	fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
+printk("%s: delsys: %d, frequency range: %u..%u\n",
+       __func__, c->delivery_system,
 fe->ops.tuner_ops.info.frequency_min_hz,
 fe->ops.tuner_ops.info.frequency_max_hz);
Quoted 8 lines
Quoted 5 lines

drivers/media/dvb-frontends/dvb-pll.c

Quoted 2 lines
drivers/media/dvb-frontends/dvb-pll.c +0 -0
 	if (!desc->initdata)
 		fe->ops.tuner_ops.init = NULL;    

I will as soon as it will be ready.

FWIW, a test kernel with this patch is being built in the same OBS repo, home:tiwai:bsc1116374. It'll be ready in an hour or so.

Btw, assuming that this patch will fix the issue, I just submitted a series with it (and with an additional patch fixing a minor issue with dprintk at dvb_frontend):

Quoted 7 lines
	https://patchwork.linuxtv.org/patch/53044/
	https://patchwork.linuxtv.org/patch/53045/
	https://patchwork.linuxtv.org/patch/53046/

We should probably migrate dprintk at dvb-pll and dvb_frontend to use dev_foo() instead of pr_fmt(), but this is out of the scope of those fixes.

Quoted 7 lines

Could you mark the last one for stable?
And, it should have fixes tag

Fixes a3f90c75b833 ("media: dvb: convert tuner_info frequencies to Hz")

too.

Also, you can put the bugzilla link as a reference
https://bugzilla.opensuse.org/show_bug.cgi?id=1116374

Sure. I'll wait for Stakanov to test, in order to add his tested-by.

For now, I'm enclosing the patch with the current tags added to it.

Thanks,
Mauro

[PATCH] media: dvb-pll: fix tuner frequency ranges

Tuners should report frequencies in Hz. That works fine on most drivers, but, in the case of dvb-pll, some settings are for satellite tuners, while others are for terrestrial/cable ones.

The code was trying to solve it at probing time, but that doesn't work, as, when _attach is called, the delivery system may be wrong.

Fix it by ensuring that all frequencies are in Hz at the per-tuner max/min values.

While here, add a debug message, as this would help to debug any issues there.

It fixes the following bug:
https://bugzilla.opensuse.org/show_bug.cgi?id=1116374

Fixes a3f90c75b833 ("media: dvb: convert tuner_info frequencies to Hz")
Cc [email protected] # For 4.19
drivers/media/dvb-frontends/dvb-pll.c +48 -55
index 6d4b2eec67b4..fff5816f6ec4 100644
@@ -80,8 +80,8 @@ struct dvb_pll_desc {
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7579 = {
 	.name  = "Thomson dtt7579",
-	.min   = 177000000,
-	.max   = 858000000,
+	.min   = 177 * MHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xb4, 0x03 },
 	.count = 4,
@@ -102,8 +102,8 @@ static void thomson_dtt759x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt759x = {
 	.name  = "Thomson dtt759x",
-	.min   = 177000000,
-	.max   = 896000000,
+	.min   = 177 * MHz,
+	.max   = 896 * MHz,
 	.set   = thomson_dtt759x_bw,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0x84, 0x03 },
@@ -126,8 +126,8 @@ static void thomson_dtt7520x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
 	.name  = "Thomson dtt7520x",
-	.min   = 185000000,
-	.max   = 900000000,
+	.min   = 185 * MHz,
+	.max   = 900 * MHz,
 	.set   = thomson_dtt7520x_bw,
 	.iffreq = 36166667,
 	.count = 7,
@@ -144,8 +144,8 @@ static const struct dvb_pll_desc dvb_pll_thomson_dtt7520x = {
 
 static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 	.name  = "LG z201",
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.sleepdata = (u8[]){ 2, 0xbc, 0x03 },
 	.count = 5,
@@ -160,8 +160,8 @@ static const struct dvb_pll_desc dvb_pll_lg_z201 = {
 
 static const struct dvb_pll_desc dvb_pll_unknown_1 = {
 	.name  = "unknown 1", /* used by dntv live dvb-t */
-	.min   = 174000000,
-	.max   = 862000000,
+	.min   = 174 * MHz,
+	.max   = 862 * MHz,
 	.iffreq= 36166667,
 	.count = 9,
 	.entries = {
@@ -182,8 +182,8 @@ static const struct dvb_pll_desc dvb_pll_unknown_1 = {
  */
 static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 	.name  = "Infineon TUA6010XS",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 3,
 	.entries = {
@@ -196,8 +196,8 @@ static const struct dvb_pll_desc dvb_pll_tua6010xs = {
 /* Panasonic env57h1xd5 (some Philips PLL ?) */
 static const struct dvb_pll_desc dvb_pll_env57h1xd5 = {
 	.name  = "Panasonic ENV57H1XD5",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36125000,
 	.count = 4,
 	.entries = {
@@ -220,8 +220,8 @@ static void tda665x_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tda665x = {
 	.name  = "Philips TDA6650/TDA6651",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.set   = tda665x_bw,
 	.iffreq= 36166667,
 	.initdata = (u8[]){ 4, 0x0b, 0xf5, 0x85, 0xab },
@@ -254,8 +254,8 @@ static void tua6034_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tua6034 = {
 	.name  = "Infineon TUA6034",
-	.min   =  44250000,
-	.max   = 858000000,
+	.min   = 44250 * kHz,
+	.max   = 858 * MHz,
 	.iffreq= 36166667,
 	.count = 3,
 	.set   = tua6034_bw,
@@ -278,8 +278,8 @@ static void tded4_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_tded4 = {
 	.name = "ALPS TDED4",
-	.min = 47000000,
-	.max = 863000000,
+	.min =  47 * MHz,
+	.max = 863 * MHz,
 	.iffreq= 36166667,
 	.set   = tded4_bw,
 	.count = 4,
@@ -296,8 +296,8 @@ static const struct dvb_pll_desc dvb_pll_tded4 = {
  */
 static const struct dvb_pll_desc dvb_pll_tdhu2 = {
 	.name = "ALPS TDHU2",
-	.min = 54000000,
-	.max = 864000000,
+	.min =  54 * MHz,
+	.max = 864 * MHz,
 	.iffreq= 44000000,
 	.count = 4,
 	.entries = {
@@ -313,8 +313,8 @@ static const struct dvb_pll_desc dvb_pll_tdhu2 = {
  */
 static const struct dvb_pll_desc dvb_pll_samsung_tbmv = {
 	.name = "Samsung TBMV30111IN / TBMV30712IN1",
-	.min = 54000000,
-	.max = 860000000,
+	.min =  54 * MHz,
+	.max = 860 * MHz,
 	.iffreq= 44000000,
 	.count = 6,
 	.entries = {
@@ -332,8 +332,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmv = {
  */
 static const struct dvb_pll_desc dvb_pll_philips_sd1878_tda8261 = {
 	.name  = "Philips SD1878",
-	.min   =  950000,
-	.max   = 2150000,
+	.min   =  950 * MHz,
+	.max   = 2150 * MHz,
 	.iffreq= 249, /* zero-IF, offset 249 is to round up */
 	.count = 4,
 	.entries = {
@@ -398,8 +398,8 @@ static void opera1_bw(struct dvb_frontend *fe, u8 *buf)
 
 static const struct dvb_pll_desc dvb_pll_opera1 = {
 	.name  = "Opera Tuner",
-	.min   =  900000,
-	.max   = 2250000,
+	.min   =  900 * MHz,
+	.max   = 2250 * MHz,
 	.initdata = (u8[]){ 4, 0x08, 0xe5, 0xe1, 0x00 },
 	.initdata2 = (u8[]){ 4, 0x08, 0xe5, 0xe5, 0x00 },
 	.iffreq= 0,
@@ -445,8 +445,8 @@ static void samsung_dtos403ih102a_set(struct dvb_frontend *fe, u8 *buf)
 /* unknown pll used in Samsung DTOS403IH102A DVB-C tuner */
 static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {
 	.name   = "Samsung DTOS403IH102A",
-	.min    =  44250000,
-	.max    = 858000000,
+	.min    = 44250 * kHz,
+	.max    = 858 * MHz,
 	.iffreq =  36125000,
 	.count  = 8,
 	.set    = samsung_dtos403ih102a_set,
@@ -465,8 +465,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_dtos403ih102a = {
 /* Samsung TDTC9251DH0 DVB-T NIM, as used on AirStar 2 */
 static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {
 	.name	= "Samsung TDTC9251DH0",
-	.min	=  48000000,
-	.max	= 863000000,
+	.min	=  48 * MHz,
+	.max	= 863 * MHz,
 	.iffreq	=  36166667,
 	.count	= 3,
 	.entries = {
@@ -479,8 +479,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tdtc9251dh0 = {
 /* Samsung TBDU18132 DVB-S NIM with TSA5059 PLL, used in SkyStar2 DVB-S 2.3 */
 static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {
 	.name = "Samsung TBDU18132",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -500,8 +500,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbdu18132 = {
 /* Samsung TBMU24112 DVB-S NIM with SL1935 zero-IF tuner */
 static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {
 	.name = "Samsung TBMU24112",
-	.min	=  950000,
-	.max	= 2150000, /* guesses */
+	.min	=  950 * MHz,
+	.max	= 2150 * MHz, /* guesses */
 	.iffreq = 0,
 	.count = 2,
 	.entries = {
@@ -521,8 +521,8 @@ static const struct dvb_pll_desc dvb_pll_samsung_tbmu24112 = {
  * 822 - 862   1  *  0   0   1   0   0   0   0x88 */
 static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {
 	.name = "ALPS TDEE4",
-	.min	=  47000000,
-	.max	= 862000000,
+	.min	=  47 * MHz,
+	.max	= 862 * MHz,
 	.iffreq	=  36125000,
 	.count = 4,
 	.entries = {
@@ -537,8 +537,8 @@ static const struct dvb_pll_desc dvb_pll_alps_tdee4 = {
 /* CP cur. 50uA, AGC takeover: 103dBuV, PORT3 on */
 static const struct dvb_pll_desc dvb_pll_tua6034_friio = {
 	.name   = "Infineon TUA6034 ISDB-T (Friio)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 4, 0x9a, 0x50, 0xb2, 0x08 },
 	.sleepdata = (u8[]){ 4, 0x9a, 0x70, 0xb3, 0x0b },
@@ -553,8 +553,8 @@ static const struct dvb_pll_desc dvb_pll_tua6034_friio = {
 /* Philips TDA6651 ISDB-T, used in Earthsoft PT1 */
 static const struct dvb_pll_desc dvb_pll_tda665x_earth_pt1 = {
 	.name   = "Philips TDA6651 ISDB-T (EarthSoft PT1)",
-	.min    =  90000000,
-	.max    = 770000000,
+	.min    =  90 * MHz,
+	.max    = 770 * MHz,
 	.iffreq =  57000000,
 	.initdata = (u8[]){ 5, 0x0e, 0x7f, 0xc1, 0x80, 0x80 },
 	.count = 10,
@@ -799,7 +799,6 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
 	struct dvb_pll_priv *priv = NULL;
 	int ret;
 	const struct dvb_pll_desc *desc;
-	struct dtv_frontend_properties *c = &fe->dtv_property_cache;
 
 	b1 = kmalloc(1, GFP_KERNEL);
 	if (!b1)
@@ -845,18 +844,12 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
 
 	strncpy(fe->ops.tuner_ops.info.name, desc->name,
 		sizeof(fe->ops.tuner_ops.info.name));
-	switch (c->delivery_system) {
-	case SYS_DVBS:
-	case SYS_DVBS2:
-	case SYS_TURBO:
-	case SYS_ISDBS:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min * kHz;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max * kHz;
-		break;
-	default:
-		fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
-		fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
-	}
+
+	fe->ops.tuner_ops.info.frequency_min_hz = desc->min;
+	fe->ops.tuner_ops.info.frequency_max_hz = desc->max;
+
+	dprintk("%s tuner, frequency range: %u...%u\n",
+		desc->name, desc->min, desc->max);
 
 	if (!desc->initdata)
 		fe->ops.tuner_ops.init = NULL;
#15 lore raw
In reply to stakanov
Quoted 8 lines · stakanov

In data martedì 20 novembre 2018 00:08:45 CET, Mauro Carvalho Chehab ha scritto:

Quoted 4 lines

uname -a

Quoted 2 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19 18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

Quoted 6 lines

uname -a

Quoted 2 lines

Linux silversurfer 4.20.0-rc3-1.g7e16618-default #1 SMP PREEMPT Mon Nov 19 18:54:15 UTC 2018 (7e16618) x86_64 x86_64 x86_64 GNU/Linux

from https://download.opensuse.org/repositories/home:/tiwai:/bsc1116374/
standard/x86_64/

The kernel must be correct (7e16618 contains the patch, I confirmed).

Quoted 2 lines

So I booted this one, should be the right one.
sudo dmesg | grep -i b2c2 should give these additional messages?

Avoid grep but look around the whole lines. The added debug print is no dev_info() or such but just a plain printk(), hence it won't give any prefix.

thanks,

Takashi