Opened 4 years ago
Last modified 3 years ago
#4744 assigned defect
Please add to trunk: New patch to fix ticket #4737 (Incorrect count of descramblers)
Reported by: | knzsys | Owned by: | nautilus7 |
---|---|---|---|
Priority: | major | Component: | DVBApi |
Severity: | high | Keywords: | descrambler |
Cc: | knzsys@… | Sensitive: | no |
Description
Revision
11539
Issue Description
Incorrect count of descramblers in module dvbapi
When the issue occurs
look here: http://www.streamboard.tv/oscam/ticket/4737
How the issue is reproducable
look here: http://www.streamboard.tv/oscam/ticket/4737
Fixed the descrambler counter by calculating it from scratch using the active streampid list.
Avoids dark channels during decoding of multiple channels under some conditions.
Patch file attached here....
Attachments (1)
Change History (13)
by , 4 years ago
Attachment: | descramblers_used.patch added |
---|
comment:2 by , 4 years ago
I am not sure why you opened another ticket for the same issue...
As I told you in ticket 4737, the descrambler detection and counting logic is going to be revised. I haven't done it yet because I am waiting some clarifications from various manufacturers.
It seems that each manufacturer does its own handling of the descramblers in their drivers. For example, some have a constant number of descramblers allocated to each ca device, while others allocate the total descramlbers in the stb, dynamically in each ca (based on the demand).
Also, when using the iotcl CA_GET_DESCR_INFO in a ca device (oscam asks ca0), some boxes/drivers return the total number of descramblers from all ca devices, while some return the descramblers available in that specific ca device.
This is very a different approach, so there is quite some thinking to be done in designing the counting code... So, your code/patch might not be of any use.
I haven't still find a clever way to solve this problem. I had various thoughts, but none was really good and universal. I have even think to drop the descrambler counting completely. But this also won't be optimum for some boxes...
So, for now I will wait before I make any change in the related code. I hope you understand.
P.S. Do you have an account in the forum? Can you send me a pm with your email in case I need any help in the future?
follow-up: 11 comment:3 by , 4 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 4 years ago
@nautilus7:
I opened a new ticket because the patch adresses only a part of the issue described in the first ticket: wrong descrambler counting.
If oscam wouldn't try to decrypt already decrypted recordings, the first issue would not be so harmful. How this happen in detail, I can describe you if you will need it later during code optimising.
I can also test your new code of dvbapi module during rewriting.
I will send you my email per pm
comment:5 by , 4 years ago
Some observations of my VU+ Duo 4K with latest Blackhole Image:
Each ca device reports 16 descramblers. There are ca0 ...... ca20
I raised the limit for descramblers in oscam to test if the box could
give more than 16. No luck.
But strange is that the box has 20 + 1 ca devices (last is used for playing recordings=> strange)
Perhaps limit in driver, but not in hardware?
Every transponder or cable freq needs exactly one ca device.
Multiple channels on 1 transponder = more than one index in that ca device.
So if there are 20 ca devices there must be minimam 20 descramblers available, but we have only 16. Strange
follow-up: 7 comment:6 by , 4 years ago
and with the descramblers_used.patch (VUDUO4k)
sorry
can't tell the difference
or am I doing something wrong?
(dvbapi) Detected /dev/dvb/adapter0/ca0 device, total available descramblers: 16
comment:7 by , 4 years ago
No, you looked at the wrong place (total count, but we need count of used)
You cannot see the difference at loglevel 0.
You need to switch to loglevel 128, start a recording
and look for
(dvbapi) Using 1 of 16 total descramblers
or
(dvbapi) Using 2 of 16 total descramblers
etc......during zapping.
This patch should work with all enigma2 boxes.
Replying to Opti:
and with the descramblers_used.patch (VUDUO4k)
sorry
can't tell the difference
or am I doing something wrong?
(dvbapi) Detected /dev/dvb/adapter0/ca0 device, total available descramblers: 16
comment:8 by , 4 years ago
okay
is that just an ad or management?
i had assumed that the actually available decrablers are displayed, that would be more than 16
so here only the used ones are shown and so there are no more than 16
all enigma2 ? i will test it on dreambox
comment:9 by , 4 years ago
Yes, oscam descrambles at maximum 16 Channels with dvbapi.The ca devices driver seems to give that limitation. By the way I think that's enough.
comment:10 by , 4 years ago
I think the detection is wrong.(Problem known and in work thx @nautilus7)
(dvbapi) Detected /dev/dvb/adapter0/ca0 device, total available descramblers: 8 root@gbx1:~# cd /dev/dvb/adapter0/ root@gbx1:/dev/dvb/adapter0# ls |grep ca ca0 ca1 ca2 ca3 root@gbx1:/dev/dvb/adapter0# (dvbapi) Detected /dev/dvb/adapter0/ca0 device, total available descramblers: 16 root@vuultimo4k:~# cd /dev/dvb/adapter0/ root@vuultimo4k:/dev/dvb/adapter0# ls |grep ca ca0 ca1 ca3 ca4 ca5 ca6 ca7 ca8 ca9 ca10 ca11 ca12 ca13 ca14 ca15 ca16 ca17 ca18 ca19 ca2 ca20 ca21 ca22 root@vuultimo4k:/dev/dvb/adapter0# (dvbapi) Detected /dev/dvb/adapter0/ca0 device, total available descramblers: 16 root@vuduo4k:~# cd /dev/dvb/adapter0/ root@vuduo4k:/dev/dvb/adapter0# ls |grep ca ca0 ca1 ca2 ca3 ca4 ca5 ca6 ca7 ca8 ca9 ca10 ca11 ca12 ca13 ca14 ca15 ca16 ca17 ca18 ca19 ca20 root@vuduo4k:/dev/dvb/adapter0# (dvbapi) Detected /dev/dvb/adapter0/ca0 device, total available descramblers: 8 root@dm920:~# cd /dev/dvb/adapter0/ root@dm920:/dev/dvb/adapter0# ls |grep ca ca0 ca1 ca2 ca3 ca4 ca5 ca6 ca7 ca8 ca9 ca10 ca11 ca12 ca13 ca14 ca15 ca16 root@dm920:/dev/dvb/adapter0#
comment:11 by , 3 years ago
Replying to nautilus7:
Any news?
Did you added my fix to the trunk, or did you managed to devolop your own fix after getting information from the manufacturers?
comment:12 by , 3 years ago
Not all have implemented CA_GET_DESCR_INFO and even it not count it right. This should work in all cases -> https://pastebin.com/XD6YUB8s
Now my dm920 getting right count of the total 17 descramblers
2020/11/09 17:07:02 4B768C02 c (dvbapi) Detected /dev/dvb/adapter0/demux0 Api: 0, userconfig boxtype: 1 maximum number of filters is 64 (oscam limit is 64)
2020/11/09 17:07:02 4B768C02 c (dvbapi) Detected /dev/dvb/adapter0/ca0 device, total available descramblers: 17
Unfortunately I have no access rights to checkin it to trunk myself.