wscan: improved frontend autodetection
PATCH 1/1 wscan: improved frontend autodetection
Currently wscan will not autodetect frontends which which have frontend != 0, i.e. it only detects /dev/dvb/adapterN/frontend0 where N=0-3.
Since multiple frontends per adapter are supported in 2.6.28, this means the correct frontend may not be found. For example with the HVR4000, DVB-T is always at frontend1.
The attached patch fixes this, searching for frontend 0-3 for each adapter 0-3.
Signature · 4 lines
Release early, release often. GMX Download-Spiele: Preizsturz! Alle Puzzle-Spiele Deluxe über 60% billiger. http://games.entertainment.gmx.net/de/entertainment/games/download/puzzle/index.html
scan.c +11 -8
@@ -2579,7 +2579,7 @@ {char frontend_devname [80 ];int adapter =999 , frontend =0 , demux =0 ; -int opt, i; +int opt, i, j;int frontend_fd;int fe_open_mode;int frontend_type =FE_OFDM ;
@@ -2716,18 +2716,19 @@info ("Info: using DVB adapter auto detection.\n" ); fe_open_mode =O_RDWR |O_NONBLOCK ;for (i=0 ; i <4 ; i++) { -snprintf (frontend_devname,sizeof (frontend_devname),"/dev/dvb/adapter%i/frontend0" , i); -if ((frontend_fd =open (frontend_devname, fe_open_mode)) <0 ) { +for (j=0 ; j <4 ; j++) { +snprintf (frontend_devname,sizeof (frontend_devname),"/dev/dvb/adapter%i/frontend%i" , i, j); +if ((frontend_fd =open (frontend_devname, fe_open_mode)) <0 ) {info ("Info: unable to open frontend %s'\n" , frontend_devname);continue ; } -/* determine FE type and caps */ -if (ioctl (frontend_fd,FE_GET_INFO , &fe_info) ==-1 ) { +/* determine FE type and caps */ +if (ioctl (frontend_fd,FE_GET_INFO , &fe_info) ==-1 ) {info (" ERROR: unable to determine frontend type\n" );close (frontend_fd);continue ; - } -if (fe_info.type==frontend_type) { + } +if (fe_info.type == frontend_type) {if (fe_info.type ==FE_OFDM )info (" Found DVB-T frontend. Using adapter %s\n" ,frontend_devname);else if (fe_info.type ==FE_ATSC )
@@ -2736,9 +2737,11 @@info (" Found DVB-C frontend. Using adapter %s\n" ,frontend_devname);close (frontend_fd); adapter=i; + frontend=j;break ; - } + } + } } } snprintf (frontend_devname, sizeof(frontend_devname),
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 9 lines
Currently wscan will not autodetect frontends which which have frontend != 0,
i.e. it only detects/dev/dvb/adapterN/frontend0where N=0-3.Since multiple frontends per adapter are supported in 2.6.28, this means the correct
frontend may not be found. For example with the HVR4000, DVB-T is always at frontend1.
Quoted 4 lines
The attached patch fixes this, searching for frontend 0-3 for each adapter 0-3.
Signed-off-by Hans Werner <[email protected]>.
Of course it's called w_scan, not wscan, sorry.
Suggestion: how about setting -t 3 (long tuning timeout) and -O 1 (search other services) as the *default* options to give the program the best chance of finding all channels without having to play with the options? They do make a difference.
Signature · 9 lines
Release early, release often. "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail _______________________________________________ linux-dvb mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 7 lines · Hans Werner
Of course it's called
w_scan, not wscan, sorry.Suggestion: how about setting -t 3 (long tuning timeout) and -O 1 (search other services) as the *default* options to give the program the best chance of finding all channels without having to play with the options? They do make a difference.
Long timeout prolonges scan time without guarantee for any improvement - i don't like that idea.
This option is more or less only useful for frontends with really bad reception or problematic drivers.
Other services should effect output after scan only, but not scan itself. Otherwise a lot of useless services will put into channels.conf.
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Re: [linux-dvb] [PATCH] stb0899: Set min symbol rate to 1000000
Приветствую, Manu
Quoted 7 lines · Igor M. Liplianin
Quoted 2 lines
I can receive 3 mSym/s streams. So why do you limit frontend capabilities to 5?
Lower than 5MSPS goes below the Half Power bandwidth characteristics. Usually we have limits defined within the characteristic region, rather than absolute limits at which tuning fails
that is strange limitation , there's a lot of dvb channels with streams less than 3 mSym/s for example on cx24116 & HellasSat 39E we have follow results with xmlscan from Darron
http://hg.kewl.org/xmldvb/
1=ARM 1;FT GLOBECAST:11109:VC23M2O35S0:0:3418:1235:1335:1 10170=AL-IRAQIA ATYAF;IMN BAGHDAD:11642:VC34M2O35S0:0:2175:33:36:10170 10180=ALFORqan;IMN BAGHDAD:11645:VC34M2O35S0:0:2180:308:256:10180 10180=AL-IRAQIA SPORT;IMN BAGHDAD:11652:VC34M2O35S0:0:2535:2007:36:10180 1=LIDER TV AZERBAIJAN;TANDBERG:12520:HC12M2O35S0:0:4340:513:256:1 66=EMOTION ART;EMOTION ART:12543:VC23M2O35S0:0:3333:48:49:66 1=Medi1SAT;TandbergTV:12545:HC56M2O35S0:0:2734:308:256:1 1709=EURONEWS-FRANCE;GLOBECAST:12558:VC23M2O35S0:0:8138:920:930:1709 4201=EURONEWS-AFRICA;SESAT:12558:VC23M2O35S0:0:8138:4221:4231:4201 1=Tandberg Service;TandbergTV:12591:VC34M2O35S0:0:2170:308:256:1 1=VIDEOLINA SAT;Tadiran Scopus:12596:VC23M2O35S0:0:2500:4194:4195:1 1=JSC Contribution;Service Provider:12610:VC34M2O35S0:0:2894:200:201:1 1=Al Jazeera;Arqiva:12614:VC34M2O35S0:0:2894:311:256:1 2=ZAGROS;Unnamed:12625:VC34M2O35S0:0:2668:33:36:2
will be nice if stb0899 cards also can LOCK low symbol rate channels
Goga
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] [PATCH] stb0899: Set min symbol rate to 1000000
Quoted 6 lines
Quoted 3 lines
Lower than 5MSPS goes below the Half Power bandwidth characteristics. Usually we have limits defined within the characteristic region, rather than absolute limits at which tuning fails
that is strange limitation , there's a lot of dvb channels with streams less than 3 mSym/s
Second that. There are lots and lots of muxes with low bandwidth, and the satellite feeds used by many providers are usually 6111 MS or something similar. Some people enjoy watching those, as they sometimes contain football feeds or other such stuff.
C band usually use small bandwidth "muxes" with only one channel in them also. Why put a limit on it? If it works, it works. I can understand a limit on frequency, but not on symbolrate.
-Morgan-
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] [PATCH] stb0899: Set min symbol rate to 1000000
In reply to Goga777Quoted 28 lines · Goga777 wrote:
Приветствую, Manu
Quoted 6 lines · Igor M. Liplianin
Quoted 2 lines
I can receive 3 mSym/s streams. So why do you limit frontend capabilities to 5?
Lower than 5MSPS goes below the Half Power bandwidth characteristics. Usually we have limits defined within the characteristic region, rather than absolute limits at which tuning fails
that is strange limitation , there's a lot of dvb channels with streams less than 3 mSym/s for example on cx24116 & HellasSat 39E we have follow results with xmlscan from Darron
http://hg.kewl.org/xmldvb/1=ARM 1;FT GLOBECAST:11109:VC23M2O35S0:0:3418:1235:1335:1 10170=AL-IRAQIA ATYAF;IMN BAGHDAD:11642:VC34M2O35S0:0:2175:33:36:10170 10180=ALFORqan;IMN BAGHDAD:11645:VC34M2O35S0:0:2180:308:256:10180 10180=AL-IRAQIA SPORT;IMN BAGHDAD:11652:VC34M2O35S0:0:2535:2007:36:10180 1=LIDER TV AZERBAIJAN;TANDBERG:12520:HC12M2O35S0:0:4340:513:256:1 66=EMOTION ART;EMOTION ART:12543:VC23M2O35S0:0:3333:48:49:66 1=Medi1SAT;TandbergTV:12545:HC56M2O35S0:0:2734:308:256:1 1709=EURONEWS-FRANCE;GLOBECAST:12558:VC23M2O35S0:0:8138:920:930:1709 4201=EURONEWS-AFRICA;SESAT:12558:VC23M2O35S0:0:8138:4221:4231:4201 1=Tandberg Service;TandbergTV:12591:VC34M2O35S0:0:2170:308:256:1 1=VIDEOLINA SAT;Tadiran Scopus:12596:VC23M2O35S0:0:2500:4194:4195:1 1=JSC Contribution;Service Provider:12610:VC34M2O35S0:0:2894:200:201:1 1=Al Jazeera;Arqiva:12614:VC34M2O35S0:0:2894:311:256:1 2=ZAGROS;Unnamed:12625:VC34M2O35S0:0:2668:33:36:2
Quoted 1 line
will be nice if stb0899 cards also can LOCK low symbol rate channels
The STB0899 and family do use the tuning algorithm completely in software, rather than a hardware implementation. The algorithm is based on many parameters based within the driver parameters.
Currently the STB0899 driver doesn't use a tuning algorithm which does work at low symbol rates. There is an algorithm specified by STM for the demodulator to go down as far as 2MSPS at Half power, but this needs some more changes in the tuning algorithm. There wasn't any significant interest on this by any of the users and this low bitrate algorithm was never deployed. If there is significant interest, the low bitrate algorithm can be deployed.
Regards,
Manu
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Hi,
Quoted 9 lines · Hans Werner
Currently wscan will not autodetect frontends which which have frontend != 0, i.e. it only detects
/dev/dvb/adapterN/frontend0where N=0-3.Since multiple frontends per adapter are supported in 2.6.28, this means the correct frontend may not be found. For example with the HVR4000, DVB-T is always at frontend1.
The attached patch fixes this, searching for frontend 0-3 for each adapter 0-3.
Signed-off-by Hans Werner <[email protected]>
Good idea. :)
But while testing your patch it seems that it doesn't work as expected. Here some example:
w_scan version 20081106
Info: using DVB adapter auto detection.
Found DVB-C frontend. Using adapter /dev/dvb/adapter0/frontend0 Found DVB-C frontend. Using adapter /dev/dvb/adapter1/frontend0 Found DVB-C frontend. Using adapter /dev/dvb/adapter2/frontend0
Info: unable to open frontend /dev/dvb/adapter3/frontend1'
Info: unable to open frontend /dev/dvb/adapter3/frontend2'
Info: unable to open frontend /dev/dvb/adapter3/frontend3' -_-_-_-_ Getting frontend capabilities-_-_-_-_
I'm using three dvb-c frontends.
The detection doesnt stop anymore with your patch if a matching frontend was found, because it doesnt leave the outer loop. Normally this search has to stop at /dev/dvb/adapter0/frontend0.
That means we have to change your patch a little. I also increased the number of adapters to 8, since i use more than 4.
Can you please test the attached patch and give some feedback? If it works fine for you, i would apply to w_scan.
-Winfried
PS: What is actually the maximum number of adapters and frontends per adapter? Can anybody give some hint?
scan.c +16 -11
@@ -77,7 +77,7 @@ .type = -1 }; -uint version =20080815 ; +uint version =20081106 ;int verbosity =2 ;#define ATSC_VSB 0x01
@@ -2579,7 +2579,7 @@ {char frontend_devname [80 ];int adapter =999 , frontend =0 , demux =0 ; -int opt, i; +int opt, i, j;int frontend_fd;int fe_open_mode;int frontend_type =FE_OFDM ;
@@ -2715,19 +2715,19 @@if ( adapter ==999 ) {info ("Info: using DVB adapter auto detection.\n" ); fe_open_mode =O_RDWR |O_NONBLOCK ; -for (i=0 ; i <4 ; i++) { -snprintf (frontend_devname,sizeof (frontend_devname),"/dev/dvb/adapter%i/frontend0" , i); -if ((frontend_fd =open (frontend_devname, fe_open_mode)) <0 ) { -info ("Info: unable to open frontend %s'\n" , frontend_devname); +for (i=0 ; i <8 ; i++) { +for (j=0 ; j <4 ; j++) { +snprintf (frontend_devname,sizeof (frontend_devname),"/dev/dvb/adapter%i/frontend%i" , i, j); +if ((frontend_fd =open (frontend_devname, fe_open_mode)) <0 ) {continue ; } -/* determine FE type and caps */ -if (ioctl (frontend_fd,FE_GET_INFO , &fe_info) ==-1 ) { +/* determine FE type and caps */ +if (ioctl (frontend_fd,FE_GET_INFO , &fe_info) ==-1 ) {info (" ERROR: unable to determine frontend type\n" );close (frontend_fd);continue ; - } -if (fe_info.type==frontend_type) { + } +if (fe_info.type == frontend_type) {if (fe_info.type ==FE_OFDM )info (" Found DVB-T frontend. Using adapter %s\n" ,frontend_devname);else if (fe_info.type ==FE_ATSC )
@@ -2736,9 +2736,14 @@info (" Found DVB-C frontend. Using adapter %s\n" ,frontend_devname);close (frontend_fd); adapter=i; + frontend=j; + i=999 ;break ; - } + } +else +info (" Wrong type, ignoring frontend %s\n" ,frontend_devname); + } } } snprintf (frontend_devname, sizeof(frontend_devname),
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 30 lines
Hi,
Quoted 1 line · Hans Werner
Currently wscan will not autodetect frontends which which have frontend
!= 0,
Quoted 3 lines
i.e. it only detects
/dev/dvb/adapterN/frontend0where N=0-3.Since multiple frontends per adapter are supported in 2.6.28, this means
the correct
Quoted 1 line
frontend may not be found. For example with the HVR4000, DVB-T is always
at frontend1.
Quoted 2 lines
The attached patch fixes this, searching for frontend 0-3 for each
adapter 0-3.
Quoted 2 lines
Signed-off-by Hans Werner <[email protected]>Good idea. :)
But while testing your patch it seems that it doesn't work as expected. Here some example:
w_scanversion 20081106
Info: using DVB adapter auto detection.
Found DVB-C frontend. Using adapter/dev/dvb/adapter0/frontend0Found DVB-C frontend. Using adapter/dev/dvb/adapter1/frontend0Found DVB-C frontend. Using adapter/dev/dvb/adapter2/frontend0
Info: unable to open frontend/dev/dvb/adapter3/frontend1'
Info: unable to open frontend/dev/dvb/adapter3/frontend2'
Info: unable to open frontend/dev/dvb/adapter3/frontend3' -_-_-_-_ Getting frontend capabilities-_-_-_-_
Quoted 4 lines
I'm using three dvb-c frontends.
The detection doesnt stop anymore with your patch if a matching frontend was found, because it doesnt leave the outer loop.
Normally this search has to stop at/dev/dvb/adapter0/frontend0.
OK I see, you want to use the first usable card found, not the last as in my patch.
Quoted 10 lines
That means we have to change your patch a little. I also increased the number of adapters to 8, since i use more than 4.
Can you please test the attached patch and give some feedback? If it works fine for you, i would apply to
w_scan.-Winfried
PS: What is actually the maximum number of adapters and frontends per adapter? Can anybody give some hint?
Your patch works fine for me. I would add one thing though: close the frontend if it is the wrong type. I have attached a new patch.
Thanks,
Hans
Signature · 4 lines
Release early, release often. "Feel free" - 5 GB Mailbox, 50 FreeSMS/Monat ... Jetzt GMX ProMail testen: http://www.gmx.net/de/go/promail
scan.c +19 -11
@@ -77,7 +77,7 @@ .type = -1 }; -uint version =20080815 ; +uint version =20081106 ;int verbosity =2 ;#define ATSC_VSB 0x01
@@ -2579,7 +2579,7 @@ {char frontend_devname [80 ];int adapter =999 , frontend =0 , demux =0 ; -int opt, i; +int opt, i, j;int frontend_fd;int fe_open_mode;int frontend_type =FE_OFDM ;
@@ -2715,19 +2715,20 @@if ( adapter ==999 ) {info ("Info: using DVB adapter auto detection.\n" ); fe_open_mode =O_RDWR |O_NONBLOCK ; -for (i=0 ; i <4 ; i++) { -snprintf (frontend_devname,sizeof (frontend_devname),"/dev/dvb/adapter%i/frontend0" , i); -if ((frontend_fd =open (frontend_devname, fe_open_mode)) <0 ) { -info ("Info: unable to open frontend %s'\n" , frontend_devname); + +for (i=0 ; i <8 ; i++) { +for (j=0 ; j <4 ; j++) { +snprintf (frontend_devname,sizeof (frontend_devname),"/dev/dvb/adapter%i/frontend%i" , i, j); +if ((frontend_fd =open (frontend_devname, fe_open_mode)) <0 ) {continue ; } -/* determine FE type and caps */ -if (ioctl (frontend_fd,FE_GET_INFO , &fe_info) ==-1 ) { +/* determine FE type and caps */ +if (ioctl (frontend_fd,FE_GET_INFO , &fe_info) ==-1 ) {info (" ERROR: unable to determine frontend type\n" );close (frontend_fd);continue ; - } -if (fe_info.type==frontend_type) { + } +if (fe_info.type == frontend_type) {if (fe_info.type ==FE_OFDM )info (" Found DVB-T frontend. Using adapter %s\n" ,frontend_devname);else if (fe_info.type ==FE_ATSC )
@@ -2736,9 +2737,16 @@info (" Found DVB-C frontend. Using adapter %s\n" ,frontend_devname);close (frontend_fd); adapter=i; + frontend=j; + i=999 ;break ; - } + } +else { +info (" Wrong type, ignoring frontend %s\n" ,frontend_devname); +close (frontend_fd); + } + } } } snprintf (frontend_devname, sizeof(frontend_devname),
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 7 lines
Your patch works fine for me. I would add one thing though: close the frontend if it is the wrong type. I have attached a new patch.
Thanks,
Hans
Yes, i forgot close.
ok, i will apply that patch.
Winfried
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Quoted 2 lines · wk
Hi,
LO
Quoted 31 lines
Quoted 9 lines · Hans Werner
Currently wscan will not autodetect frontends which which have frontend != 0, i.e. it only detects
/dev/dvb/adapterN/frontend0where N=0-3.Since multiple frontends per adapter are supported in 2.6.28, this means the correct frontend may not be found. For example with the HVR4000, DVB-T is always at frontend1.
The attached patch fixes this, searching for frontend 0-3 for each adapter 0-3.
Signed-off-by Hans Werner <[email protected]>Good idea. :)
But while testing your patch it seems that it doesn't work as expected. Here some example:
w_scanversion 20081106
Info: using DVB adapter auto detection.
Found DVB-C frontend. Using adapter/dev/dvb/adapter0/frontend0Found DVB-C frontend. Using adapter/dev/dvb/adapter1/frontend0Found DVB-C frontend. Using adapter/dev/dvb/adapter2/frontend0
Info: unable to open frontend/dev/dvb/adapter3/frontend1'
Info: unable to open frontend/dev/dvb/adapter3/frontend2'
Info: unable to open frontend/dev/dvb/adapter3/frontend3' -_-_-_-_ Getting frontend capabilities-_-_-_-_I'm using three dvb-c frontends.
The detection doesnt stop anymore with your patch if a matching frontend was found, because it doesnt leave the outer loop.
Normally this search has to stop at/dev/dvb/adapter0/frontend0. That means we have to change your patch a little. I also increased the number of adapters to 8, since i use more than 4.
Quoted 7 lines
Can you please test the attached patch and give some feedback? If it works fine for you, i would apply to
w_scan.-Winfried
PS: What is actually the maximum number of adapters and frontends per adapter? Can anybody give some hint?
In relation to what Hans is addressing (Mutually exclusive frontends on a single adapter AKA multi-frontend AKA MFE) then in theory the core code is is not limited yet in practice there is a fixed provision for two as that's the most that has been seen as yet.
Cya!
--
// /
{:)==={ Darron Broad <[email protected]>
\\ \
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb