diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-09-30 05:53:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-10-03 14:10:54 -0400 |
commit | 4d43e13f723e12734257277cc38497fab1efc605 (patch) | |
tree | 7debc4f9b7997f7d768dcf387210436b532198f4 /drivers/media/dvb/dvb-usb/a800.c | |
parent | 8ccb3dcd1f8e80e8702642e1de26541b52f6bb7c (diff) |
V4L/DVB (4643): Multi-input patch for DVB-USB device
This patch is the first commit of the Multiple Input Patch for the DVB-USB frame
work.
It changes the DVB-USB-device to be able to have more than one streaming input
(e.g. multiple DVB-T sources) on one device. This is a necessary feature for
the upcoming DiB7700 driven devices.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/a800.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/a800.c | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c index df0c384bd4ca..2ed3eb62d787 100644 --- a/drivers/media/dvb/dvb-usb/a800.c +++ b/drivers/media/dvb/dvb-usb/a800.c | |||
@@ -27,7 +27,8 @@ static int a800_power_ctrl(struct dvb_usb_device *d, int onoff) | |||
27 | } | 27 | } |
28 | 28 | ||
29 | /* assure to put cold to 0 for iManufacturer == 1 */ | 29 | /* assure to put cold to 0 for iManufacturer == 1 */ |
30 | static int a800_identify_state(struct usb_device *udev, struct dvb_usb_properties *props,struct dvb_usb_device_description **desc, int *cold) | 30 | static int a800_identify_state(struct usb_device *udev, struct dvb_usb_device_properties *props, |
31 | struct dvb_usb_device_description **desc, int *cold) | ||
31 | { | 32 | { |
32 | *cold = udev->descriptor.iManufacturer != 1; | 33 | *cold = udev->descriptor.iManufacturer != 1; |
33 | return 0; | 34 | return 0; |
@@ -88,7 +89,7 @@ static int a800_rc_query(struct dvb_usb_device *d, u32 *event, int *state) | |||
88 | } | 89 | } |
89 | 90 | ||
90 | /* USB Driver stuff */ | 91 | /* USB Driver stuff */ |
91 | static struct dvb_usb_properties a800_properties; | 92 | static struct dvb_usb_device_properties a800_properties; |
92 | 93 | ||
93 | static int a800_probe(struct usb_interface *intf, | 94 | static int a800_probe(struct usb_interface *intf, |
94 | const struct usb_device_id *id) | 95 | const struct usb_device_id *id) |
@@ -104,35 +105,27 @@ static struct usb_device_id a800_table [] = { | |||
104 | }; | 105 | }; |
105 | MODULE_DEVICE_TABLE (usb, a800_table); | 106 | MODULE_DEVICE_TABLE (usb, a800_table); |
106 | 107 | ||
107 | static struct dvb_usb_properties a800_properties = { | 108 | static struct dvb_usb_device_properties a800_properties = { |
108 | .caps = DVB_USB_HAS_PID_FILTER | DVB_USB_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_IS_AN_I2C_ADAPTER, | 109 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
109 | .pid_filter_count = 32, | ||
110 | 110 | ||
111 | .usb_ctrl = CYPRESS_FX2, | 111 | .usb_ctrl = CYPRESS_FX2, |
112 | |||
113 | .firmware = "dvb-usb-avertv-a800-02.fw", | 112 | .firmware = "dvb-usb-avertv-a800-02.fw", |
114 | 113 | ||
115 | .size_of_priv = sizeof(struct dibusb_state), | 114 | .num_adapters = 1, |
116 | 115 | .adapter = { | |
116 | { | ||
117 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | ||
118 | .pid_filter_count = 32, | ||
117 | .streaming_ctrl = dibusb2_0_streaming_ctrl, | 119 | .streaming_ctrl = dibusb2_0_streaming_ctrl, |
118 | .pid_filter = dibusb_pid_filter, | 120 | .pid_filter = dibusb_pid_filter, |
119 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, | 121 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
120 | .power_ctrl = a800_power_ctrl, | 122 | |
121 | .frontend_attach = dibusb_dib3000mc_frontend_attach, | 123 | .frontend_attach = dibusb_dib3000mc_frontend_attach, |
122 | .tuner_attach = dibusb_dib3000mc_tuner_attach, | 124 | .tuner_attach = dibusb_dib3000mc_tuner_attach, |
123 | .identify_state = a800_identify_state, | ||
124 | |||
125 | .rc_interval = DEFAULT_RC_INTERVAL, | ||
126 | .rc_key_map = a800_rc_keys, | ||
127 | .rc_key_map_size = ARRAY_SIZE(a800_rc_keys), | ||
128 | .rc_query = a800_rc_query, | ||
129 | 125 | ||
130 | .i2c_algo = &dibusb_i2c_algo, | ||
131 | |||
132 | .generic_bulk_ctrl_endpoint = 0x01, | ||
133 | /* parameter for the MPEG2-data transfer */ | 126 | /* parameter for the MPEG2-data transfer */ |
134 | .urb = { | 127 | .stream = { |
135 | .type = DVB_USB_BULK, | 128 | .type = USB_BULK, |
136 | .count = 7, | 129 | .count = 7, |
137 | .endpoint = 0x06, | 130 | .endpoint = 0x06, |
138 | .u = { | 131 | .u = { |
@@ -142,6 +135,21 @@ static struct dvb_usb_properties a800_properties = { | |||
142 | } | 135 | } |
143 | }, | 136 | }, |
144 | 137 | ||
138 | .size_of_priv = sizeof(struct dibusb_state), | ||
139 | }, | ||
140 | }, | ||
141 | |||
142 | .power_ctrl = a800_power_ctrl, | ||
143 | .identify_state = a800_identify_state, | ||
144 | |||
145 | .rc_interval = DEFAULT_RC_INTERVAL, | ||
146 | .rc_key_map = a800_rc_keys, | ||
147 | .rc_key_map_size = ARRAY_SIZE(a800_rc_keys), | ||
148 | .rc_query = a800_rc_query, | ||
149 | |||
150 | .i2c_algo = &dibusb_i2c_algo, | ||
151 | |||
152 | .generic_bulk_ctrl_endpoint = 0x01, | ||
145 | .num_device_descs = 1, | 153 | .num_device_descs = 1, |
146 | .devices = { | 154 | .devices = { |
147 | { "AVerMedia AverTV DVB-T USB 2.0 (A800)", | 155 | { "AVerMedia AverTV DVB-T USB 2.0 (A800)", |