Bug 372667 - Crash with virtual adapter
Summary: Crash with virtual adapter
Status: RESOLVED FIXED
Alias: None
Product: kaffeine
Classification: Applications
Component: general (show other bugs)
Version: 2.0.5
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Mauro Carvalho Chehab
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-19 14:58 UTC by knossos456
Modified: 2017-12-02 09:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-24242-0.html (4.16 KB, text/html)
2016-12-03 10:21 UTC, knossos456
Details
attachment-6544-0.html (2.08 KB, text/html)
2016-12-28 10:06 UTC, knossos456
Details
attachment-32081-0.html (2.50 KB, text/html)
2016-12-30 14:51 UTC, knossos456
Details
attachment-29318-0.html (1.27 KB, text/html)
2017-10-06 17:53 UTC, knossos456
Details
attachment-4086-0.html (3.09 KB, text/html)
2017-10-28 15:11 UTC, knossos456
Details

Note You need to log in before you can comment on or make changes to this bug.
Description knossos456 2016-11-19 14:58:15 UTC
Thanks for your effort to made this project still active.
I'm a Kaffeine user since many years.
Recently, I've upgaded to Ubuntu 16 LTS because big progresses on VDPAU
subject, wasen't working before on my ATI 5450 card..
On actual version of Kaffeine 1.22 , I have ony 1 bug: Diseqc from
position 2.
I can scan Diseqc position 2 ( Astra 28), but when channel is memorized
, the corresponding Diseqc attribute seems not in database ...
All is OK for Diseqc 0 ( Astra 19) and Diseqc 1 ( hotbird 13 )

So i have removed Kaffeine and try new version 2.05
list of bugs:
1) Virtual cards ( like dvbloopback that is needed for descrambling )
causes Kaffeine + Ubuntu crash . On Kaffeine V1.3 no crask but no DVB card
detect
2 ) Without Virtual card, still Diseqc above position 1 problem
3) for My DVB-T card all is OK but on my Skystard HD card, seem a AGC
problem, low C/N signals can't be scanned... VLC can and Kaffeine 1.22
can
Comment 1 Mauro Carvalho Chehab 2016-12-02 09:17:53 UTC
(In reply to knossos456 from comment #0)
> Thanks for your effort to made this project still active.

Thanks for the report.

> I'm a Kaffeine user since many years.
> Recently, I've upgaded to Ubuntu 16 LTS because big progresses on VDPAU
> subject, wasen't working before on my ATI 5450 card..
> On actual version of Kaffeine 1.22 , I have ony 1 bug: Diseqc from
> position 2.
> I can scan Diseqc position 2 ( Astra 28), but when channel is memorized
> , the corresponding Diseqc attribute seems not in database ...
> All is OK for Diseqc 0 ( Astra 19) and Diseqc 1 ( hotbird 13 )
> 
> So i have removed Kaffeine and try new version 2.05
> list of bugs:
> 1) Virtual cards ( like dvbloopback that is needed for descrambling )
> causes Kaffeine + Ubuntu crash . On Kaffeine V1.3 no crask but no DVB card
> detect

Last time I reviewed its code, dvbloopback has some troubles at Kernel level: it does things that the DVB core doesn't expect, adding contention where it is not supposed to happen. It is probably easier to add something at libdvbv5 to support external modules to do descrambling than to fix support for it, but someone else need to submit such patches upstream.

> 2 ) Without Virtual card, still Diseqc above position 1 problem

There are a few different DiSEqC arrangements for satellite selection select. On Kaffeine 2.0.x, it is up to libdvbv5 to select the satellite. Right now, it supports only DiSEqC version 1.x. and use this logic:

	cmd->command = 0x38;	/* Write to Port group 0 (Committed switches) */
	cmd->len = 4;

	/* Fill the 4 bits for the "input" select */
	cmd->data0 = 0xf0;
	cmd->data0 |= high_band;
	cmd->data0 |= pol_v ? 0 : 2;
	/* Instead of using position/option, use a number from 0 to 3 */
	cmd->data0 |= (sat_number % 0x3) << 2;

	return dvb_fe_diseqc_cmd(&parms->p, cmd->len, cmd->msg);

Maybe your DiSEqC switch expects something different.

> 3) for My DVB-T card all is OK but on my Skystard HD card, seem a AGC
> problem, low C/N signals can't be scanned... VLC can and Kaffeine 1.22
> can

Kaffeine has a logic that rejects low C/N channels, at src/dvb/dvbdevice.cpp:

                        if ((signal != -1) && (signal < 15)) {
                                // signal too weak
                                Log("DvbDevice::frontendEvent: tuning failed");
                                setDeviceState(DeviceIdle);
                                return;
                        }

Perhaps it is time to get rid of that for good.
Comment 2 knossos456 2016-12-03 10:21:57 UTC
Created attachment 102588 [details]
attachment-24242-0.html

Thanks for the answers.
For point 1 :
Yes you'r right, actual kernel path request for dvbloopback is not a clean
solution.
For point 2 , ok i will look more in new lib
For point 3 : yes 1 have low c/n but is working very good under windows .
So i need to patch this section.

2016-12-02 10:17 GMT+01:00 Mauro Carvalho Chehab <bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=372667
>
> --- Comment #1 from Mauro Carvalho Chehab <mchehab+kde@kernel.org> ---
> (In reply to knossos456 from comment #0)
> > Thanks for your effort to made this project still active.
>
> Thanks for the report.
>
> > I'm a Kaffeine user since many years.
> > Recently, I've upgaded to Ubuntu 16 LTS because big progresses on VDPAU
> > subject, wasen't working before on my ATI 5450 card..
> > On actual version of Kaffeine 1.22 , I have ony 1 bug: Diseqc from
> > position 2.
> > I can scan Diseqc position 2 ( Astra 28), but when channel is memorized
> > , the corresponding Diseqc attribute seems not in database ...
> > All is OK for Diseqc 0 ( Astra 19) and Diseqc 1 ( hotbird 13 )
> >
> > So i have removed Kaffeine and try new version 2.05
> > list of bugs:
> > 1) Virtual cards ( like dvbloopback that is needed for descrambling )
> > causes Kaffeine + Ubuntu crash . On Kaffeine V1.3 no crask but no DVB
> card
> > detect
>
> Last time I reviewed its code, dvbloopback has some troubles at Kernel
> level:
> it does things that the DVB core doesn't expect, adding contention where
> it is
> not supposed to happen. It is probably easier to add something at libdvbv5
> to
> support external modules to do descrambling than to fix support for it, but
> someone else need to submit such patches upstream.
>
> > 2 ) Without Virtual card, still Diseqc above position 1 problem
>
> There are a few different DiSEqC arrangements for satellite selection
> select.
> On Kaffeine 2.0.x, it is up to libdvbv5 to select the satellite. Right
> now, it
> supports only DiSEqC version 1.x. and use this logic:
>
>         cmd->command = 0x38;    /* Write to Port group 0 (Committed
> switches)
> */
>         cmd->len = 4;
>
>         /* Fill the 4 bits for the "input" select */
>         cmd->data0 = 0xf0;
>         cmd->data0 |= high_band;
>         cmd->data0 |= pol_v ? 0 : 2;
>         /* Instead of using position/option, use a number from 0 to 3 */
>         cmd->data0 |= (sat_number % 0x3) << 2;
>
>         return dvb_fe_diseqc_cmd(&parms->p, cmd->len, cmd->msg);
>
> Maybe your DiSEqC switch expects something different.
>
> > 3) for My DVB-T card all is OK but on my Skystard HD card, seem a AGC
> > problem, low C/N signals can't be scanned... VLC can and Kaffeine 1.22
> > can
>
> Kaffeine has a logic that rejects low C/N channels, at
> src/dvb/dvbdevice.cpp:
>
>                         if ((signal != -1) && (signal < 15)) {
>                                 // signal too weak
>                                 Log("DvbDevice::frontendEvent: tuning
> failed");
>                                 setDeviceState(DeviceIdle);
>                                 return;
>                         }
>
> Perhaps it is time to get rid of that for good.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 knossos456 2016-12-03 17:59:38 UTC
I can add for point 3 that I have 60 % signal under windows + Dvbviewer  and only 0,1 or 2 % signal under ubuntu for that dvbs2 card.
Semms a driver problem
Comment 4 knossos456 2016-12-18 16:22:46 UTC
my diseqc propblem is solved, I've changed the switch.

I have now problems on some DVB-S2 - 8PSK transponder.
DVB-S2 QPSK seem to be OK in all cases.
For example, i can't scan :
http://fr.kingofsat.net/tp.php?tp=259
my parameters for this transponder in scanfile.dvb are :
S2 11681000 H 27500000 3/4 25 8PSK
What is wrong ?
Comment 5 Mauro Carvalho Chehab 2016-12-27 18:55:29 UTC
(In reply to knossos456 from comment #3)
> I can add for point 3 that I have 60 % signal under windows + Dvbviewer  and
> only 0,1 or 2 % signal under ubuntu for that dvbs2 card.
> Semms a driver problem

Well, the problem is that, with DVBv3 API, there were no standard to report the signal scale. This is now fixed at the DVB Kernel core, but several drivers still need to be updated and this is not an easy task, as an experienced developer, with a signal generator, should do lots of experimental measurements to adjust the scale.

On the drivers that still use percentages, the signal value returned by the Kernel is divided by the maximum possible value (65535). However, on several drivers, the signal is actually a value in dB x 100, with is divided by 65535, providing very low values for signal.
Comment 6 Mauro Carvalho Chehab 2016-12-27 18:57:56 UTC
(In reply to knossos456 from comment #4)
> my diseqc propblem is solved, I've changed the switch.
> 
> I have now problems on some DVB-S2 - 8PSK transponder.
> DVB-S2 QPSK seem to be OK in all cases.
> For example, i can't scan :
> http://fr.kingofsat.net/tp.php?tp=259
> my parameters for this transponder in scanfile.dvb are :
> S2 11681000 H 27500000 3/4 25 8PSK
> What is wrong ?

Maybe it is using m-PLP. On transponders with m-PLP, there's an extra parameter that it is used to split the transponder on multiple physical channels. If this is wrong, some DVB drivers may not tune. Another possibility is that the card you have either doesn' t have support for 8PSK or the driver is missing implementation for it.
Comment 7 knossos456 2016-12-28 10:06:28 UTC
Created attachment 103035 [details]
attachment-6544-0.html

This transponder is a normal one, no multistream TP.
And some TPs are ok in 8PSK on same Satellite, ex : all radio channels are
ok on Swiss TP 11526 H 29700 8PSK + diseqc 2

S2 11681000 H 27500000 3/4 25 8PSK is working very well under Windows +
Dvbviewer..
Something is going wrong on Kaffeine forthis TP, havent found.
Shame you can't try by yourself...

2016-12-27 19:57 GMT+01:00 Mauro Carvalho Chehab <bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=372667
>
> --- Comment #6 from Mauro Carvalho Chehab <mchehab+kde@kernel.org> ---
> (In reply to knossos456 from comment #4)
> > my diseqc propblem is solved, I've changed the switch.
> >
> > I have now problems on some DVB-S2 - 8PSK transponder.
> > DVB-S2 QPSK seem to be OK in all cases.
> > For example, i can't scan :
> > http://fr.kingofsat.net/tp.php?tp=259
> > my parameters for this transponder in scanfile.dvb are :
> > S2 11681000 H 27500000 3/4 25 8PSK
> > What is wrong ?
>
> Maybe it is using m-PLP. On transponders with m-PLP, there's an extra
> parameter
> that it is used to split the transponder on multiple physical channels. If
> this
> is wrong, some DVB drivers may not tune. Another possibility is that the
> card
> you have either doesn' t have support for 8PSK or the driver is missing
> implementation for it.
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 8 Mauro Carvalho Chehab 2016-12-28 20:15:59 UTC
(In reply to knossos456 from comment #7)
> Created attachment 103035 [details]
> attachment-6544-0.html
> 
> This transponder is a normal one, no multistream TP.
> And some TPs are ok in 8PSK on same Satellite, ex : all radio channels are
> ok on Swiss TP 11526 H 29700 8PSK + diseqc 2

DiSEqC v2.0 currently is not supported. The problem here starts with the Kernel drivers, as very few ones support DiSEqC read operations, with would be required for v2.0 auto-discovery. They may work using v1.3, though, depending on the type of DiSEqC switch you're using (e. g. if it is compatible with the "standard"  v1.3 way to select the satellite/LO).

> 
> S2 11681000 H 27500000 3/4 25 8PSK is working very well under Windows +
> Dvbviewer..
> Something is going wrong on Kaffeine forthis TP, havent found.
> Shame you can't try by yourself...

If you record something like 60 seconds of the *full* MPEG-TS using "dvbv5-zap -P", I can use a signal generator to try to reproduce the issue.
Comment 9 knossos456 2016-12-30 13:02:44 UTC
I wanted write Diseqc position 2 and not Diseqc 2 norm, sorry .

Concerning the transponder i can't scan , unfortunally i can't use linux (because it can't scan)
But i can record the transponder under windows .
Where to post the 60 sec recorded TS ?
(it is 450 Mbytes big)
Comment 10 knossos456 2016-12-30 14:51:02 UTC
Created attachment 103094 [details]
attachment-32081-0.html

I've uploaded the recorded stream to :
https://we.tl/1n4HLbEErH
recorded under windows, linux diden't work
Diseqc 2 means Diseqc position 2 not Diseqc 2 norm

2016-12-28 21:15 GMT+01:00 Mauro Carvalho Chehab <bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=372667
>
> --- Comment #8 from Mauro Carvalho Chehab <mchehab+kde@kernel.org> ---
> (In reply to knossos456 from comment #7)
> > Created attachment 103035 [details]
> > attachment-6544-0.html
> >
> > This transponder is a normal one, no multistream TP.
> > And some TPs are ok in 8PSK on same Satellite, ex : all radio channels
> are
> > ok on Swiss TP 11526 H 29700 8PSK + diseqc 2
>
> DiSEqC v2.0 currently is not supported. The problem here starts with the
> Kernel
> drivers, as very few ones support DiSEqC read operations, with would be
> required for v2.0 auto-discovery. They may work using v1.3, though,
> depending
> on the type of DiSEqC switch you're using (e. g. if it is compatible with
> the
> "standard"  v1.3 way to select the satellite/LO).
>
> >
> > S2 11681000 H 27500000 3/4 25 8PSK is working very well under Windows +
> > Dvbviewer..
> > Something is going wrong on Kaffeine forthis TP, havent found.
> > Shame you can't try by yourself...
>
> If you record something like 60 seconds of the *full* MPEG-TS using
> "dvbv5-zap
> -P", I can use a signal generator to try to reproduce the issue.
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 11 Mauro Carvalho Chehab 2017-02-15 13:02:43 UTC
(In reply to knossos456 from comment #10)
> Created attachment 103094 [details]
> attachment-32081-0.html
> 
> I've uploaded the recorded stream to :
> https://we.tl/1n4HLbEErH
> recorded under windows, linux diden't work

Sorry, I was in vacations when you posted it there. Tried to download today, but it tells that the file is not available anymore. Could you please re-post?

Be sure to record the *full* MPEG-TS stream, and not only a single channel, as I'll need all program IDs there, in order to see what's happening.

> I wanted write Diseqc position 2 and not Diseqc 2 norm, sorry.

Ah! There was a bug at libdvbv5 preventing it to select the right DiSEqC switch position. It was fixed this Monday. You'll need to compile libdvbv5 by hand, as the changes there were not backported to any distros yet (AFAIKT).

Could you please test again, compiling v4l-utils from its source? You can get its source from its master repository with:

   git clone git://linuxtv.org/v4l-utils.git

and build/install it with:

   ./bootstrap.sh && configure && make && sudo make install

Btw, if it doesn't work with dvbv5 utils, it won't work with Kaffeine, as both use libdvbv5 in order to use with the device.
Comment 12 Mauro Carvalho Chehab 2017-10-04 12:16:11 UTC
Is this bug still occurring, or newer versions of libdvbv5 Kaffine solved it?
Comment 13 knossos456 2017-10-06 17:52:59 UTC
Created attachment 108210 [details]
attachment-29318-0.html

I will try on new disk partition, and will report to you soon.

2017-10-04 14:16 GMT+02:00 Mauro Carvalho Chehab <bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=372667
>
> Mauro Carvalho Chehab <mchehab+kde@kernel.org> changed:
>
>            What    |Removed                     |Added
> ------------------------------------------------------------
> ----------------
>             Version|2.0.1                       |2.0.5
>
> --- Comment #12 from Mauro Carvalho Chehab <mchehab+kde@kernel.org> ---
> Is this bug still occurring, or newer versions of libdvbv5 Kaffine solved
> it?
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 14 knossos456 2017-10-28 15:11:56 UTC
Created attachment 108605 [details]
attachment-4086-0.html

I have installed Kaffeine 2.013  on the new disk.
It crashes also with virtual adapter (ffecsawrapper) ....

On the first disk, i have found the bug related to disecq3 problem.
On that disk , i have Kaffeine 1.22 .
With this version, it sends tone burst command AFTER diseqc command.
This is not compatible with diseqc numbers >=2... because tone burst works
only with positions A/B.
In this situation the tone burst overwrites disecq command 3 with command 1
...

I have put a dummy routine in my card module driver (stb0899_drv.c) and now
diseq 3 position works fine .
I don't know if this is corrected on latest Kaffeine versions

I have found also the problem with low C/N values on reception.
The problem comes from card modules drivers.
I have patched a lot on stb0899, stb6100 ,lnbp21 and budget-ci sources to
have clean .ko's

Now card is working as fine as under windows.

I've try to reach Manu Abraham on his gmail, but he diden't respond to me.

Where is the best place to put my enhancments , to make this usfull for
next Ubuntu releases ??
I can give you my skype if you want.



2017-10-06 19:52 GMT+02:00 Thebes Knossos <knossos456@gmail.com>:

> I will try on new disk partition, and will report to you soon.
>
> 2017-10-04 14:16 GMT+02:00 Mauro Carvalho Chehab <bugzilla_noreply@kde.org
> >:
>
>> https://bugs.kde.org/show_bug.cgi?id=372667
>>
>> Mauro Carvalho Chehab <mchehab+kde@kernel.org> changed:
>>
>>            What    |Removed                     |Added
>> ------------------------------------------------------------
>> ----------------
>>             Version|2.0.1                       |2.0.5
>>
>> --- Comment #12 from Mauro Carvalho Chehab <mchehab+kde@kernel.org> ---
>> Is this bug still occurring, or newer versions of libdvbv5 Kaffine solved
>> it?
>>
>> --
>> You are receiving this mail because:
>> You reported the bug.
>>
>
>
Comment 15 Mauro Carvalho Chehab 2017-12-02 09:02:17 UTC
(In reply to knossos456 from comment #14)
> Created attachment 108605 [details]
> attachment-4086-0.html
> 
> I have installed Kaffeine 2.013  on the new disk.
> It crashes also with virtual adapter (ffecsawrapper) ....

Support for dvbloopback was added at libdvbv5:

https://git.linuxtv.org/v4l-utils.git/commit/?id=0d34c5545f1f3e959a26820ba33d7bf3497d076f
https://git.linuxtv.org/v4l-utils.git/commit/?id=85f8e5a99fe2a3097964b69f34dceaa6702d071a

A fix at dvbloopback is also needed:

https://github.com/bas-t/dvbloopback/commit/f47e792df669b47c4574e213dfee16b38f382e73

With those patches, Kaffeine should work with virtual adapter.