Commit 5ccbe67f authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

DTV: add 10 and 1.712 MHz bandwidth (from DVB-T2)

parent 5cadaf87
......@@ -111,10 +111,11 @@ static const char *const transmission_user[] = { N_("Automatic"),
#define BANDWIDTH_TEXT N_("Bandwidth (MHz)")
const int bandwidth_vlc[] = { 0,
8, 7, 6, 5,
10, 8, 7, 6, 5, 2
};
static const char *const bandwidth_user[] = { N_("Automatic"),
N_("8 MHz"), N_("7 MHz"), N_("6 MHz"), N_("5 MHz"),
N_("10 MHz"), N_("8 MHz"), N_("7 MHz"), N_("6 MHz"),
N_("5 MHz"), N_("1.712 MHz"),
};
#define GUARD_TEXT N_("Guard interval")
......
......@@ -798,6 +798,16 @@ int dvb_set_dvbs2 (dvb_device_t *d, uint64_t freq_Hz, const char *modstr,
/*** DVB-T ***/
static uint32_t dvb_parse_bandwidth (uint32_t i)
{
switch (i)
{
//case 0: return 0;
case 2: return 1712000;
default: return i * 1000000;
}
}
static int dvb_parse_transmit_mode (int i)
{
static const dvb_int_map_t tab[] = {
......@@ -857,7 +867,7 @@ int dvb_set_dvbt (dvb_device_t *d, uint32_t freq, const char *modstr,
uint32_t mod = dvb_parse_modulation (modstr, QAM_AUTO);
fec_hp = dvb_parse_fec (fec_hp);
fec_lp = dvb_parse_fec (fec_lp);
bandwidth *= 1000000;
bandwidth = dvb_parse_bandwidth (bandwidth);
transmit_mode = dvb_parse_transmit_mode (transmit_mode);
guard = dvb_parse_guard (guard);
hierarchy = dvb_parse_hierarchy (hierarchy);
......@@ -880,7 +890,7 @@ int dvb_set_dvbt2 (dvb_device_t *d, uint32_t freq, const char *modstr,
#if DVBv5(3)
uint32_t mod = dvb_parse_modulation (modstr, QAM_AUTO);
fec = dvb_parse_fec (fec);
bandwidth *= 1000000;
bandwidth = dvb_parse_bandwidth (bandwidth);
transmit_mode = dvb_parse_transmit_mode (transmit_mode);
guard = dvb_parse_guard (guard);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment