-
Notifications
You must be signed in to change notification settings - Fork 6
/
tuner.h
70 lines (57 loc) · 1.61 KB
/
tuner.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef __TUNER_H__
#define __TUNER_H__
#include <stdio.h>
#include <errno.h>
#include <time.h>
#include "extended_frontend.h"
#include <sys/types.h>
#include <stdint.h>
#include "list.h"
/******************************************************************************
* internal definitions.
*****************************************************************************/
struct w_scan_flags {
uint32_t version;
fe_type_t fe_type;
//uint8_t atsc_type;
uint8_t need_2g_fe;
uint32_t list_id;
uint8_t tuning_timeout;
uint8_t filter_timeout;
uint8_t get_other_nits;
uint8_t add_frequencies;
uint8_t dump_provider;
uint8_t vdr_version;
uint8_t qam_no_auto;
uint8_t ca_select;
int rotor_position;
uint16_t api_version;
};
#define AUDIO_CHAN_MAX (32)
#define CA_SYSTEM_ID_MAX (16)
struct transponder_ids {
int network_id;
int original_network_id; /* onid patch by Hartmut Birr */
int transport_stream_id;
};
struct transponder {
struct list_head list;
struct list_head services;
struct transponder_ids pids;
enum fe_type type;
struct extended_dvb_frontend_parameters param;
unsigned int scan_done:1;
unsigned int last_tuning_failed:1;
unsigned int other_frequency_flag:1; /* DVB-T */
int n_other_f;
int updated_by_nit;
uint32_t *other_f; /* DVB-T frequency-list descriptor */
char *network_name;
};
struct transponder *alloc_transponder(uint32_t frequency);
/* write transponder data to dest. no memory allocating,
* so dest has to be big enough - think about before use!
*/
void print_transponder(char * dest, struct transponder * t);
bool tune(int freq, int adapter, int frontend);
#endif