bas-t / ffdecsawrapper

FFdecsa empowered softcam for MythTV
GNU General Public License v3.0
17 stars 9 forks source link

ffdecsawrapper doesn't start when using more then 8 loopbacks. #23

Closed Drazgor closed 10 years ago

Drazgor commented 10 years ago

As documented it is not possible to use more than 8 adapter without modifying your drivers. I did this since I want to use 12 cards. I set the maximum of cards in the driver to 64 cards. All cards are detected so that part works. The problem is now that I would like to use a loopback on every card, hower the default maximum for the loopback is set at 8. Changing this in the module will allow for more loopbacks to be present. The total number of adapter recognized by the kernel is now indeed 24.

The problem is that when ffdecsawrapper is started using multiple joins between card and loopback the process will stop with the error "Could not connect to loopback device 20"

Using less than 9 joins will run fine and will also descramble the streams so it looks like somewhere there is some check somewhere for the max number of adapter.

Could you tell me what might be wrong?

Kind regards,

Simon Wamelink

Logging info:

3.14-0.bpo.1-amd64 #1 SMP Debian 3.14.4-1~bpo70+1 (2014-05-14) x86_64 GNU/Linux
  /usr/src/ffdecsawrapper# ffdecsawrapper -d 0xFFFFFFFF -j 0:12 -j 1:13 -j 2:14 -j 3:15 -j 4:16 -j 5:17 -j 6:18 -j 7:19 -j 8:20 -j 9:21 -j 10:22 -j 11:23
May 28 23:32:15.252 : Version: 2.0.1-Stable
May 28 23:32:15.253 CAM: initializing plugin: SoftCam (2.0.1-Stable): A software emulated CAM
*snip*
May 28 23:30:12.149 : Could not connect to loopback device 20
May 28 23:30:12.149 : Are you sure you have loaded the dvbloopback module
May 28 23:30:12.149 : properly and/or used the correct values to the '-j' switch
/usr/src/ffdecsawrapper# ffdecsawrapper -i
0: STV0367 DVB-C DVB-T
1: STV0367 DVB-C DVB-T
10: CXD2837 DVB-C DVB-T/T2
11: CXD2837 DVB-C DVB-T/T2
2: STV0367 DVB-C DVB-T
3: STV0367 DVB-C DVB-T
4: CXD2843 DVB-C/C2 DVB-T/T2
5: CXD2843 DVB-C/C2 DVB-T/T2
6: CXD2843 DVB-C/C2 DVB-T/T2
7: CXD2843 DVB-C/C2 DVB-T/T2
8: CXD2843 DVB-C/C2 DVB-T/T2
9: CXD2843 DVB-C/C2 DVB-T/T2
/usr/src/ffdecsawrapper# mumudvb -l
MuMuDVB Version 1.7.2_20130525_master
 --- Build information ---
Built without CAM support.
Built with SCAM support.
Built without transcoding support.
Built with ATSC support.
Built with support for DVB API Version 5.4.
Built with support for DVB-T2.
---------
Originally based on dvbstream 0.6 by (C) Dave Chapman 2001-2004
Released under the GPL.
Latest version available from http://mumudvb.braice.net/
Project from the cr@ns (http://www.crans.org)
by Brice DUBOST (mumudvb@braice.net)

Info:  DVB:  ==================================
Info:  DVB:          DVB CARDS LISTING
Info:  DVB:  ==================================
Info:  DVB:  =========== Card 0 - Tuner 0 ===========
Info:  DVB:   Frontend : STV0367 DVB-C DVB-T
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 1 - Tuner 0 ===========
Info:  DVB:   Frontend : STV0367 DVB-C DVB-T
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 2 - Tuner 0 ===========
Info:  DVB:   Frontend : STV0367 DVB-C DVB-T
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 3 - Tuner 0 ===========
Info:  DVB:   Frontend : STV0367 DVB-C DVB-T
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 4 - Tuner 0 ===========
Info:  DVB:   Frontend : CXD2843 DVB-C/C2 DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 5 - Tuner 0 ===========
Info:  DVB:   Frontend : CXD2843 DVB-C/C2 DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 6 - Tuner 0 ===========
Info:  DVB:   Frontend : CXD2843 DVB-C/C2 DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 7 - Tuner 0 ===========
Info:  DVB:   Frontend : CXD2843 DVB-C/C2 DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 8 - Tuner 0 ===========
Info:  DVB:   Frontend : CXD2843 DVB-C/C2 DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 9 - Tuner 0 ===========
Info:  DVB:   Frontend : CXD2843 DVB-C/C2 DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 10 - Tuner 0 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 11 - Tuner 0 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
Info:  DVB:  =========== Card 12 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter12/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 13 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter13/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 14 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter14/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 15 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter15/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 16 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter16/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 17 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter17/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 18 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter18/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 19 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter19/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 20 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter20/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 21 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter21/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 22 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter22/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor 
Info:  DVB:  =========== Card 23 - Tuner 1 ===========
Info:  DVB:   Frontend : CXD2837 DVB-C DVB-T/T2
Info:  DVB:   Cable (DVB-C) card
Info:  DVB:   Frequency: 47125 kHz to 865000 kHz
Info:  DVB:   Symbol rate: 870 k symbols/s to 11700 k symbols/s 
Info:  DVB:  
ERRO:  DVB:  FRONTEND DEVICE: /dev/dvb/adapter23/frontend0 : Bad address
ERRO:  DVB:  FE_GET_INFO: Bad file descriptor
bas-t commented 10 years ago

Nothing is wrong with FFdecsawrapper, you don't need to change anything in it. But you have to recompile your kernel with CONFIG_DVB_MAX_ADAPTERS=24 One way of doing it is described here:

https://github.com/bas-t/tbs-intree/wiki/HOW-TO--%28Debian-Wheezy,-backports-kernel%29

You can omit adding the TBS drivers to the build system

Oh, forgot to mention: "make -C debian/build/build_amd64_none_amd64 menuconfig " is ment to change the amount of adapters.

If you use v4l (based) drivers, make sure you compile them with CONFIG_DVB_MAX_ADAPTERS=24 too.

I'm sure that FFdecsawrapper will run fine after this.

bas-t commented 10 years ago

I did a quick check. Probably solved your issue in commit e298840fed5f417bb51f67fe1ab34ef07543fa66

bas-t commented 10 years ago

Hm, still not done. I'll investigate when I have more time.

Drazgor commented 10 years ago

I did find the initial DVBLB_MAX_ADAPTERS setting, maybe you could use that in the rest of you code as well to make scaling to more adapters possible as well. I can confirm that the commits did resolve the issue, thanks for the quick reply.

bas-t commented 10 years ago

I've set it to the max (32 adapters) 64, as you suggested is, wrong. Using 32 loopback devices means you use 32 real adapters as well. Together they add up to the maximum of 64.