1
2
3
4
5
6
7
8
9
10 #ifndef _RADIO_ISA_H_
11 #define _RADIO_ISA_H_
12
13 #include <linux/isa.h>
14 #include <linux/pnp.h>
15 #include <linux/videodev2.h>
16 #include <media/v4l2-device.h>
17 #include <media/v4l2-ctrls.h>
18
19 struct radio_isa_driver;
20 struct radio_isa_ops;
21
22
23 struct radio_isa_card {
24 const struct radio_isa_driver *drv;
25 struct v4l2_device v4l2_dev;
26 struct v4l2_ctrl_handler hdl;
27 struct video_device vdev;
28 struct mutex lock;
29 const struct radio_isa_ops *ops;
30 struct {
31 struct v4l2_ctrl *mute;
32 struct v4l2_ctrl *volume;
33 };
34
35 int io;
36
37
38 bool stereo;
39
40 u32 freq;
41 };
42
43 struct radio_isa_ops {
44
45 struct radio_isa_card *(*alloc)(void);
46
47 bool (*probe)(struct radio_isa_card *isa, int io);
48
49
50
51 int (*init)(struct radio_isa_card *isa);
52
53 int (*s_mute_volume)(struct radio_isa_card *isa, bool mute, int volume);
54
55 int (*s_frequency)(struct radio_isa_card *isa, u32 freq);
56
57 int (*s_stereo)(struct radio_isa_card *isa, bool stereo);
58
59 u32 (*g_rxsubchans)(struct radio_isa_card *isa);
60
61 u32 (*g_signal)(struct radio_isa_card *isa);
62 };
63
64
65 struct radio_isa_driver {
66 struct isa_driver driver;
67 #ifdef CONFIG_PNP
68 struct pnp_driver pnp_driver;
69 #endif
70 const struct radio_isa_ops *ops;
71
72 int *io_params;
73
74 int *radio_nr_params;
75
76 bool probe;
77
78 const int *io_ports;
79
80 int num_of_io_ports;
81
82 unsigned region_size;
83
84 const char *card;
85
86 bool has_stereo;
87
88
89 int max_volume;
90 };
91
92 int radio_isa_match(struct device *pdev, unsigned int dev);
93 int radio_isa_probe(struct device *pdev, unsigned int dev);
94 int radio_isa_remove(struct device *pdev, unsigned int dev);
95 #ifdef CONFIG_PNP
96 int radio_isa_pnp_probe(struct pnp_dev *dev,
97 const struct pnp_device_id *dev_id);
98 void radio_isa_pnp_remove(struct pnp_dev *dev);
99 #endif
100
101 #endif