3 * @brief Digital TV module common header
5 /*****************************************************************************
6 * Copyright © 2011 Rémi Denis-Courmont
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
45 typedef struct dvb_device dvb_device_t;
47 dvb_device_t *dvb_open (vlc_object_t *obj);
48 void dvb_close (dvb_device_t *);
49 ssize_t dvb_read (dvb_device_t *, void *, size_t);
51 int dvb_add_pid (dvb_device_t *, uint16_t);
52 void dvb_remove_pid (dvb_device_t *, uint16_t);
54 unsigned dvb_enum_systems (dvb_device_t *);
55 float dvb_get_signal_strength (dvb_device_t *);
56 float dvb_get_snr (dvb_device_t *);
60 void dvb_set_ca_pmt (dvb_device_t *, struct dvbpsi_pmt_s *);
63 int dvb_set_inversion (dvb_device_t *, int);
64 int dvb_tune (dvb_device_t *);
66 #define VLC_FEC(a,b) (((a) << 16u) | (b))
67 #define VLC_FEC_AUTO 0xFFFFFFFF
68 #define VLC_GUARD(a,b) (((a) << 16u) | (b))
69 #define VLC_GUARD_AUTO 0xFFFFFFFF
72 int dvb_set_dvbc (dvb_device_t *, uint32_t freq, const char *mod,
73 uint32_t srate, uint32_t fec);
76 int dvb_set_dvbs (dvb_device_t *, uint64_t freq, uint32_t srate, uint32_t fec);
77 int dvb_set_dvbs2 (dvb_device_t *, uint64_t freq, const char *mod,
78 uint32_t srate, uint32_t fec, int pilot, int rolloff);
79 int dvb_set_sec (dvb_device_t *, uint64_t freq, char pol,
80 uint32_t lowf, uint32_t highf, uint32_t switchf);
83 int dvb_set_dvbt (dvb_device_t *, uint32_t freq, const char *mod,
84 uint32_t fec_hp, uint32_t fec_lp, uint32_t bandwidth,
85 int transmission, uint32_t guard, int hierarchy);
86 int dvb_set_dvbt2 (dvb_device_t *, uint32_t freq, const char *mod,
87 uint32_t fec, uint32_t bandwidth,
88 int transmission, uint32_t guard, uint32_t plp);
91 int dvb_set_atsc (dvb_device_t *, uint32_t freq, const char *mod);
92 int dvb_set_cqam (dvb_device_t *, uint32_t freq, const char *mod);
95 int dvb_set_isdbc (dvb_device_t *, uint32_t freq, const char *mod,
96 uint32_t srate, uint32_t fec);
99 /* TODO: modulation? */
100 int dvb_set_isdbs (dvb_device_t *, uint64_t freq, uint16_t ts_id);
103 typedef struct isdbt_layer
105 const char *modulation;
107 uint8_t segment_count;
108 uint8_t time_interleaving;
111 int dvb_set_isdbt (dvb_device_t *, uint32_t freq, uint32_t bandwidth,
112 int transmission, uint32_t guard, const isdbt_layer_t[3]);
114 typedef struct isdbt_sound
116 uint8_t subchannel_id;
117 uint8_t segment_index;
118 uint8_t segment_count;