V4L/DVB (13410): firedtv: remove an unnecessary function argument
[linux-2.6-block.git] / drivers / media / dvb / firewire / firedtv.h
CommitLineData
df4846c3 1/*
612262a5 2 * FireDTV driver (formerly known as FireSAT)
df4846c3 3 *
612262a5
SR
4 * Copyright (C) 2004 Andreas Monitzer <andy@monitzer.com>
5 * Copyright (C) 2008 Henrik Kurelid <henrik@kurelid.se>
df4846c3
HK
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
11 */
12
612262a5
SR
13#ifndef _FIREDTV_H
14#define _FIREDTV_H
c81c8b68 15
c81c8b68 16#include <linux/dvb/dmx.h>
612262a5
SR
17#include <linux/dvb/frontend.h>
18#include <linux/list.h>
87918334 19#include <linux/mod_devicetable.h>
612262a5
SR
20#include <linux/mutex.h>
21#include <linux/spinlock_types.h>
22#include <linux/types.h>
23#include <linux/wait.h>
24#include <linux/workqueue.h>
612262a5
SR
25
26#include <demux.h>
27#include <dmxdev.h>
28#include <dvb_demux.h>
8ae83cdf 29#include <dvb_frontend.h>
612262a5
SR
30#include <dvb_net.h>
31#include <dvbdev.h>
df4846c3 32
15490795
SR
33struct firedtv_tuner_status {
34 unsigned active_system:8;
35 unsigned searching:1;
36 unsigned moving:1;
37 unsigned no_rf:1;
38 unsigned input:1;
39 unsigned selected_antenna:7;
40 unsigned ber:32;
41 unsigned signal_strength:8;
42 unsigned raster_frequency:2;
43 unsigned rf_frequency:22;
44 unsigned man_dep_info_length:8;
45 unsigned front_end_error:1;
46 unsigned antenna_error:1;
47 unsigned front_end_power_status:1;
48 unsigned power_supply:1;
49 unsigned carrier_noise_ratio:16;
50 unsigned power_supply_voltage:8;
51 unsigned antenna_voltage:8;
52 unsigned firewire_bus_voltage:8;
53 unsigned ca_mmi:1;
54 unsigned ca_pmt_reply:1;
55 unsigned ca_date_time_request:1;
56 unsigned ca_application_info:1;
57 unsigned ca_module_present_status:1;
58 unsigned ca_dvb_flag:1;
59 unsigned ca_error_flag:1;
60 unsigned ca_initialization_status:1;
61};
c81c8b68
GKH
62
63enum model_type {
a70f81c1
R
64 FIREDTV_UNKNOWN = 0,
65 FIREDTV_DVB_S = 1,
66 FIREDTV_DVB_C = 2,
67 FIREDTV_DVB_T = 3,
68 FIREDTV_DVB_S2 = 4,
c81c8b68
GKH
69};
70
15490795 71struct device;
8ae83cdf 72struct input_dev;
15490795
SR
73struct firedtv;
74
75struct firedtv_backend {
054286b1 76 int (*lock)(struct firedtv *fdtv, u64 addr, __be32 data[]);
5375659a 77 int (*read)(struct firedtv *fdtv, u64 addr, void *data);
15490795
SR
78 int (*write)(struct firedtv *fdtv, u64 addr, void *data, size_t len);
79 int (*start_iso)(struct firedtv *fdtv);
80 void (*stop_iso)(struct firedtv *fdtv);
81};
612262a5 82
a70f81c1 83struct firedtv {
15490795
SR
84 struct device *device;
85 struct list_head list;
86
8ae83cdf
SR
87 struct dvb_adapter adapter;
88 struct dmxdev dmxdev;
89 struct dvb_demux demux;
90 struct dmx_frontend frontend;
91 struct dvb_net dvbnet;
92 struct dvb_frontend fe;
93
94 struct dvb_device *cadev;
95 int ca_last_command;
96 int ca_time_interval;
97
98 struct mutex avc_mutex;
99 wait_queue_head_t avc_wait;
100 bool avc_reply_received;
101 struct work_struct remote_ctrl_work;
102 struct input_dev *remote_ctrl_dev;
c81c8b68 103
15490795
SR
104 enum model_type type;
105 char subunit;
106 char isochannel;
107 fe_sec_voltage_t voltage;
108 fe_sec_tone_mode_t tone;
c81c8b68 109
15490795
SR
110 const struct firedtv_backend *backend;
111 void *backend_data;
c81c8b68 112
15490795
SR
113 struct mutex demux_mutex;
114 unsigned long channel_active;
115 u16 channel_pid[16];
8ae83cdf 116
15490795
SR
117 size_t response_length;
118 u8 response[512];
df4846c3
HK
119};
120
15490795
SR
121/* firedtv-1394.c */
122#ifdef CONFIG_DVB_FIREDTV_IEEE1394
87918334 123int fdtv_1394_init(void);
15490795
SR
124void fdtv_1394_exit(void);
125#else
87918334 126static inline int fdtv_1394_init(void) { return 0; }
15490795
SR
127static inline void fdtv_1394_exit(void) {}
128#endif
c81c8b68 129
15490795
SR
130/* firedtv-avc.c */
131int avc_recv(struct firedtv *fdtv, void *data, size_t length);
132int avc_tuner_status(struct firedtv *fdtv, struct firedtv_tuner_status *stat);
133struct dvb_frontend_parameters;
134int avc_tuner_dsd(struct firedtv *fdtv, struct dvb_frontend_parameters *params);
135int avc_tuner_set_pids(struct firedtv *fdtv, unsigned char pidc, u16 pid[]);
136int avc_tuner_get_ts(struct firedtv *fdtv);
137int avc_identify_subunit(struct firedtv *fdtv);
138struct dvb_diseqc_master_cmd;
139int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst,
140 char conttone, char nrdiseq,
141 struct dvb_diseqc_master_cmd *diseqcmd);
142void avc_remote_ctrl_work(struct work_struct *work);
143int avc_register_remote_control(struct firedtv *fdtv);
144int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len);
145int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len);
146int avc_ca_reset(struct firedtv *fdtv);
147int avc_ca_pmt(struct firedtv *fdtv, char *app_info, int length);
148int avc_ca_get_time_date(struct firedtv *fdtv, int *interval);
149int avc_ca_enter_menu(struct firedtv *fdtv);
150int avc_ca_get_mmi(struct firedtv *fdtv, char *mmi_object, unsigned int *len);
151int cmp_establish_pp_connection(struct firedtv *fdtv, int plug, int channel);
152void cmp_break_pp_connection(struct firedtv *fdtv, int plug, int channel);
153
154/* firedtv-ci.c */
155int fdtv_ca_register(struct firedtv *fdtv);
156void fdtv_ca_release(struct firedtv *fdtv);
612262a5 157
a70f81c1
R
158/* firedtv-dvb.c */
159int fdtv_start_feed(struct dvb_demux_feed *dvbdmxfeed);
160int fdtv_stop_feed(struct dvb_demux_feed *dvbdmxfeed);
15490795
SR
161int fdtv_dvb_register(struct firedtv *fdtv);
162void fdtv_dvb_unregister(struct firedtv *fdtv);
163struct firedtv *fdtv_alloc(struct device *dev,
164 const struct firedtv_backend *backend,
165 const char *name, size_t name_len);
166extern const char *fdtv_model_names[];
87918334 167extern const struct ieee1394_device_id fdtv_id_table[];
c81c8b68 168
a70f81c1
R
169/* firedtv-fe.c */
170void fdtv_frontend_init(struct firedtv *fdtv);
c81c8b68 171
87918334
SR
172/* firedtv-fw.c */
173#ifdef CONFIG_DVB_FIREDTV_FIREWIRE
174int fdtv_fw_init(void);
175void fdtv_fw_exit(void);
176#else
177static inline int fdtv_fw_init(void) { return 0; }
178static inline void fdtv_fw_exit(void) {}
179#endif
180
15490795
SR
181/* firedtv-rc.c */
182#ifdef CONFIG_DVB_FIREDTV_INPUT
183int fdtv_register_rc(struct firedtv *fdtv, struct device *dev);
184void fdtv_unregister_rc(struct firedtv *fdtv);
185void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code);
186#else
187static inline int fdtv_register_rc(struct firedtv *fdtv,
188 struct device *dev) { return 0; }
189static inline void fdtv_unregister_rc(struct firedtv *fdtv) {}
190static inline void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code) {}
191#endif
c81c8b68 192
612262a5 193#endif /* _FIREDTV_H */