Commit 144ac6b6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Linux DVB: drop support for API version 5.0

That corresponds to kernel versions 2.6.28-2.6.31 inclusive, none of
which are supported upstream anymore.
parent 80f1a853
...@@ -1962,17 +1962,21 @@ fi ...@@ -1962,17 +1962,21 @@ fi
dnl dnl
dnl Linux DVB dnl Linux DVB
dnl dnl
AC_CACHE_CHECK([for Linux DVB version 5], [ac_cv_linux_s2api], [ AC_CACHE_CHECK([for Linux DVB version 5.1], [ac_cv_linux_dvb_5_1], [
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
[#include <linux/dvb/version.h> [#include <linux/dvb/version.h>
#if (DVB_API_VERSION < 5) #if (DVB_API_VERSION < 5)
EXPLODE # error Linux DVB API v3.2 and older are not supported.
#endif]])], [ #endif
ac_cv_linux_s2api=yes #if (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR < 1)
# error Linux DVB API v5.0 is unsupported. Please update.
#endif
]])], [
ac_cv_linux_dvb_5_1=yes
], [ ], [
ac_cv_linux_s2api=no ac_cv_linux_dvb_5_1=no
])]) ])])
AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_s2api" = "yes"]) AM_CONDITIONAL([HAVE_LINUX_DVB], [test "$ac_cv_linux_dvb_5_1" = "yes"])
dnl dnl
dnl Screen capture module dnl Screen capture module
......
...@@ -49,9 +49,6 @@ ...@@ -49,9 +49,6 @@
#define DVBv5(minor) \ #define DVBv5(minor) \
(DVB_API_VERSION > 5 \ (DVB_API_VERSION > 5 \
|| (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= (minor))) || (DVB_API_VERSION == 5 && DVB_API_VERSION_MINOR >= (minor)))
#if !DVBv5(0)
# error Linux DVB kernel headers version 2.6.28 or later required.
#endif
/** Opens the device directory for the specified DVB adapter */ /** Opens the device directory for the specified DVB adapter */
static int dvb_open_adapter (uint8_t adapter) static int dvb_open_adapter (uint8_t adapter)
...@@ -914,9 +911,7 @@ static int dvb_parse_transmit_mode (int i) ...@@ -914,9 +911,7 @@ static int dvb_parse_transmit_mode (int i)
{ 1, TRANSMISSION_MODE_1K }, { 1, TRANSMISSION_MODE_1K },
#endif #endif
{ 2, TRANSMISSION_MODE_2K }, { 2, TRANSMISSION_MODE_2K },
#if DVBv5(1)
{ 4, TRANSMISSION_MODE_4K }, { 4, TRANSMISSION_MODE_4K },
#endif
{ 8, TRANSMISSION_MODE_8K }, { 8, TRANSMISSION_MODE_8K },
#if DVBv5(3) #if DVBv5(3)
{ 16, TRANSMISSION_MODE_16K }, { 16, TRANSMISSION_MODE_16K },
...@@ -1033,7 +1028,6 @@ int dvb_set_isdbc (dvb_device_t *d, uint32_t freq, const char *modstr, ...@@ -1033,7 +1028,6 @@ int dvb_set_isdbc (dvb_device_t *d, uint32_t freq, const char *modstr,
/*** ISDB-S ***/ /*** ISDB-S ***/
int dvb_set_isdbs (dvb_device_t *d, uint64_t freq_Hz, uint16_t ts_id) int dvb_set_isdbs (dvb_device_t *d, uint64_t freq_Hz, uint16_t ts_id)
{ {
#if DVBv5(1)
uint32_t freq = freq_Hz / 1000; uint32_t freq = freq_Hz / 1000;
if (dvb_find_frontend (d, ISDB_S)) if (dvb_find_frontend (d, ISDB_S))
...@@ -1041,17 +1035,10 @@ int dvb_set_isdbs (dvb_device_t *d, uint64_t freq_Hz, uint16_t ts_id) ...@@ -1041,17 +1035,10 @@ int dvb_set_isdbs (dvb_device_t *d, uint64_t freq_Hz, uint16_t ts_id)
return dvb_set_props (d, 5, DTV_CLEAR, 0, DTV_DELIVERY_SYSTEM, SYS_ISDBS, return dvb_set_props (d, 5, DTV_CLEAR, 0, DTV_DELIVERY_SYSTEM, SYS_ISDBS,
DTV_FREQUENCY, freq, DTV_FREQUENCY, freq,
DTV_ISDBS_TS_ID, (uint32_t)ts_id); DTV_ISDBS_TS_ID, (uint32_t)ts_id);
#else
# warning ISDB-S needs Linux DVB version 5.1 or later.
msg_Err (d->obj, "ISDB-S support not compiled-in");
(void) freq_Hz; (void) ts_id;
return -1;
#endif
} }
/*** ISDB-T ***/ /*** ISDB-T ***/
#if DVBv5(1)
static int dvb_set_isdbt_layer (dvb_device_t *d, unsigned num, static int dvb_set_isdbt_layer (dvb_device_t *d, unsigned num,
const isdbt_layer_t *l) const isdbt_layer_t *l)
{ {
...@@ -1068,13 +1055,11 @@ static int dvb_set_isdbt_layer (dvb_device_t *d, unsigned num, ...@@ -1068,13 +1055,11 @@ static int dvb_set_isdbt_layer (dvb_device_t *d, unsigned num,
DTV_ISDBT_LAYERA_SEGMENT_COUNT + num, count, DTV_ISDBT_LAYERA_SEGMENT_COUNT + num, count,
DTV_ISDBT_LAYERA_TIME_INTERLEAVING + num, ti); DTV_ISDBT_LAYERA_TIME_INTERLEAVING + num, ti);
} }
#endif
int dvb_set_isdbt (dvb_device_t *d, uint32_t freq, uint32_t bandwidth, int dvb_set_isdbt (dvb_device_t *d, uint32_t freq, uint32_t bandwidth,
int transmit_mode, uint32_t guard, int transmit_mode, uint32_t guard,
const isdbt_layer_t layers[3]) const isdbt_layer_t layers[3])
{ {
#if DVBv5(1)
bandwidth = dvb_parse_bandwidth (bandwidth); bandwidth = dvb_parse_bandwidth (bandwidth);
transmit_mode = dvb_parse_transmit_mode (transmit_mode); transmit_mode = dvb_parse_transmit_mode (transmit_mode);
guard = dvb_parse_guard (guard); guard = dvb_parse_guard (guard);
...@@ -1089,13 +1074,6 @@ int dvb_set_isdbt (dvb_device_t *d, uint32_t freq, uint32_t bandwidth, ...@@ -1089,13 +1074,6 @@ int dvb_set_isdbt (dvb_device_t *d, uint32_t freq, uint32_t bandwidth,
if (dvb_set_isdbt_layer (d, i, layers + i)) if (dvb_set_isdbt_layer (d, i, layers + i))
return -1; return -1;
return 0; return 0;
#else
# warning ISDB-T needs Linux DVB version 5.1 or later.
msg_Err (d->obj, "ISDB-T support not compiled-in");
(void) freq; (void) bandwidth; (void) transmit_mode; (void) guard;
(void) layers;
return -1;
#endif
} }
......
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