[dvblast-devel] DVBLAST and DVB-T2 support

Kompan Kolia kompan at yandex.ru
Wed Apr 4 08:31:23 CEST 2012


OK. Thanks!

I will get a DVB-T2 card for a couple of weeks and be sure to test your patch.

04.04.2012, 03:38, "Georgi Chorbadzhiyski" <gf at unixsol.org>:
> On 4/1/12 9:52 PM, Kompan Kolia wrote:
>
>>  30.03.2012, 21:20, "Christophe Massiot"<cmassiot at openheadend.tv>:
>>>  Le 26 mars 2012 à 13:11, Kompan Kolia a écrit :
>>>>    Can DVBLAST recieve DVB-T2 signal?
>>>>
>>>>    In Russia, Moscow we have DVB-T2 signal..
>>>>    I would like to receive this signal by dvblast.
>>>  It would require a few changes. First make an interface to be able to specify system "dvb-t2" (the way I used with dvb-s2 doesn't work here because option -m was also used in dvb-t). Then you may need to add the new guard interval, transmission and bandwidth settings (with #ifdef).
>>  Can i ask you to write patch for DVB-T2 support? :)
>
> Please try to apply the attached patch and see if it is working.
>
> This patch adds *untested* support for DVB-T2. The patch is made
> by reading Linux media API docs about T2 and no testing was done
> with any hardware. The way to choose T2 is a hack and should be done
> properly if this patch is working at all.
>
> So, in order to instruct kernel to use T2 you have to give dvblast
> one of the two options --guard -2 or --transmission -2 the other
> options should be set like you are setting DVB-T.
>
> PLP_ID is hard coded to 0. There is not enough documentation for
> this property so no additional command line options were added.
>
> --
> Georgi Chorbadzhiyski
> http://georgi.unixsol.org/
>
> From bba16f0ea748118e9447bc8c11ea797474822bdb Mon Sep 17 00:00:00 2001
> From: Georgi Chorbadzhiyski <gf at unixsol.org>
> Date: Wed, 4 Apr 2012 02:28:49 +0300
> Subject: [PATCH] Add untested and hacky support for DVB-T2.
>
> This patch adds *untested* support for DVB-T2. The patch is made
> by reading Linux media API docs about T2 and no testing was done
> with any hardware. The way to choose T2 is a hack and should be done
> properly if this patch is working at all.
>
> So, in order to instruct kernel to use T2 you have to give dvblast
> one of the two options --guard -2 or --transmission -2 the other
> options should be set like you are setting DVB-T.
>
> PLP_ID is hardcoded to 0. There is not enough documentation for
> this property so no aditional command line options were added.
> ---
>  dvb.c     |   37 ++++++++++++++++++++++++++++++++++++-
>  dvblast.c |    6 +++++-
>  2 files changed, 41 insertions(+), 2 deletions(-)
>
> diff --git a/dvb.c b/dvb.c
> index b0a86ce..543948a 100644
> --- a/dvb.c
> +++ b/dvb.c
> @@ -653,8 +653,12 @@ static fe_guard_interval_t GetGuard(void)
>          case 16: return GUARD_INTERVAL_1_16;
>          case  8: return GUARD_INTERVAL_1_8;
>          case  4: return GUARD_INTERVAL_1_4;
> +        case 128  : return GUARD_INTERVAL_1_128;  // DVB-T2
> +        case 19128: return GUARD_INTERVAL_19_128; // DVB-T2
> +        case 19256: return GUARD_INTERVAL_19_256; // DVB-T2
>          default:
>              msg_Warn( NULL, "invalid guard interval %d", i_guard );
> +        case -2: // DVB-T2 hint
>          case -1:
>          case  0: return GUARD_INTERVAL_AUTO;
>      }
> @@ -669,8 +673,11 @@ static fe_transmit_mode_t GetTransmission(void)
>  #ifdef TRANSMISSION_MODE_4K
>          case 4: return TRANSMISSION_MODE_4K;
>  #endif
> +        case 16: return TRANSMISSION_MODE_16K; // DVB-T2
> +        case 32: return TRANSMISSION_MODE_32K; // DVB-T2
>          default:
>              msg_Warn( NULL, "invalid tranmission mode %d", i_transmission );
> +        case -2: // DVB-T2 hint
>          case -1:
>          case 0: return TRANSMISSION_MODE_AUTO;
>      }
> @@ -819,6 +826,26 @@ static struct dtv_properties dvbt_cmdseq = {
>      .props = dvbt_cmdargs
>  };
>
> +static struct dtv_property dvbt2_cmdargs[] = {
> +    { .cmd = DTV_FREQUENCY,       .u.data = 0 },
> +    { .cmd = DTV_MODULATION,      .u.data = QAM_AUTO },
> +    { .cmd = DTV_INVERSION,       .u.data = INVERSION_AUTO },
> +    { .cmd = DTV_BANDWIDTH_HZ,    .u.data = 8000000 },
> +    { .cmd = DTV_CODE_RATE_HP,    .u.data = FEC_AUTO },
> +    { .cmd = DTV_CODE_RATE_LP,    .u.data = FEC_AUTO },
> +    { .cmd = DTV_GUARD_INTERVAL,  .u.data = GUARD_INTERVAL_AUTO },
> +    { .cmd = DTV_TRANSMISSION_MODE,.u.data = TRANSMISSION_MODE_AUTO },
> +    { .cmd = DTV_HIERARCHY,       .u.data = HIERARCHY_AUTO },
> +    { .cmd = DTV_DVBT2_PLP_ID,    .u.data = 0 },
> +    { .cmd = DTV_DELIVERY_SYSTEM, .u.data = SYS_DVBT2 },
> +    { .cmd = DTV_TUNE },
> +};
> +static struct dtv_properties dvbt2_cmdseq = {
> +    .num = sizeof(dvbt2_cmdargs)/sizeof(struct dtv_property),
> +    .props = dvbt2_cmdargs
> +};
> +
> +
>  static struct dtv_property atsc_cmdargs[] = {
>      { .cmd = DTV_FREQUENCY, .u.data = 0 },
>      { .cmd = DTV_MODULATION, .u.data = QAM_AUTO },
> @@ -843,6 +870,7 @@ static struct dtv_properties atsc_cmdseq = {
>  #define TRANSMISSION 7
>  #define ROLLOFF 7
>  #define HIERARCHY 8
> +#define PLP_ID 9
>
>  struct dtv_property pclear[] = {
>      { .cmd = DTV_CLEAR },
> @@ -877,7 +905,14 @@ static void FrontendSet( bool b_init )
>      switch ( info.type )
>      {
>      case FE_OFDM:
> -        p = &dvbt_cmdseq;
> +        if ( i_guard == -2 || i_guard >= 128 || i_transmission == -2 || i_transmission >= 16 )
> +        {
> +            p = &dvbt2_cmdseq;
> +            p->props[PLP_ID].u.data = 0;
> +        }
> +        else
> +            p = &dvbt_cmdseq;
> +
>          p->props[FREQUENCY].u.data = i_frequency;
>          p->props[INVERSION].u.data = GetInversion();
>          if ( psz_modulation != NULL )
> diff --git a/dvblast.c b/dvblast.c
> index dd25a40..9d0b711 100644
> --- a/dvblast.c
> +++ b/dvblast.c
> @@ -470,8 +470,12 @@ void usage()
>      msg_Raw( NULL, "  -K --fec-lp           DVB-T low priority FEC (default auto)" );
>      msg_Raw( NULL, "  -G --guard            DVB-T guard interval" );
>      msg_Raw( NULL, "    DVB-T  32 (1/32)|16 (1/16)|8 (1/8)|4 (1/4)|-1 (auto, default)" );
> +    msg_Raw( NULL, "    DVB-T2 32 (1/32)|16 (1/16)|8 (1/8)|4 (1/4)|-2 (auto, default)" );
> +    msg_Raw( NULL, "    DVB-T2 128 (1/128)|19128 (19/128)|19256 (19/256)|-2 (auto, default)" );
>      msg_Raw( NULL, "  -H --hierarchy        DVB-T hierarchy (0, 1, 2, 4 or -1 auto, default)" );
> -    msg_Raw( NULL, "  -X --transmission     DVB-T transmission (2, 4, 8 or -1 auto, default)" );
> +    msg_Raw( NULL, "  -X --transmission     DVB-T transmission mode" );
> +    msg_Raw( NULL, "    DVB-T  2, 4, 8 (default: -1 = auto)" );
> +    msg_Raw( NULL, "    DVB-T2 2, 4, 8, 16, 32 (default: -2 = auto)" );
>      msg_Raw( NULL, "  -s --symbol-rate" );
>      msg_Raw( NULL, "  -S --diseqc           satellite number for diseqc (0: no diseqc, 1-4, A or B)" );
>      msg_Raw( NULL, "  -u --budget-mode      turn on budget mode (no hardware PID filtering)" );
>
> --
> 1.7.5.1
>
> _______________________________________________
> dvblast-devel mailing list
> dvblast-devel at videolan.org
> http://mailman.videolan.org/listinfo/dvblast-devel


More information about the dvblast-devel mailing list