aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/dsbr100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/dsbr100.c')
-rw-r--r--drivers/media/video/dsbr100.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/media/video/dsbr100.c b/drivers/media/video/dsbr100.c
index 25646804d5be..3b4e9985c3d7 100644
--- a/drivers/media/video/dsbr100.c
+++ b/drivers/media/video/dsbr100.c
@@ -37,28 +37,28 @@
37 Markus: Updates for 2.6.x kernels, code layout changes, name sanitizing 37 Markus: Updates for 2.6.x kernels, code layout changes, name sanitizing
38 38
39 Version 0.30: 39 Version 0.30:
40 Markus: Updates for 2.5.x kernel and more ISO compliant source 40 Markus: Updates for 2.5.x kernel and more ISO compliant source
41 41
42 Version 0.25: 42 Version 0.25:
43 PSL and Markus: Cleanup, radio now doesn't stop on device close 43 PSL and Markus: Cleanup, radio now doesn't stop on device close
44 44
45 Version 0.24: 45 Version 0.24:
46 Markus: Hope I got these silly VIDEO_TUNER_LOW issues finally 46 Markus: Hope I got these silly VIDEO_TUNER_LOW issues finally
47 right. Some minor cleanup, improved standalone compilation 47 right. Some minor cleanup, improved standalone compilation
48 48
49 Version 0.23: 49 Version 0.23:
50 Markus: Sign extension bug fixed by declaring transfer_buffer unsigned 50 Markus: Sign extension bug fixed by declaring transfer_buffer unsigned
51 51
52 Version 0.22: 52 Version 0.22:
53 Markus: Some (brown bag) cleanup in what VIDIOCSTUNER returns, 53 Markus: Some (brown bag) cleanup in what VIDIOCSTUNER returns,
54 thanks to Mike Cox for pointing the problem out. 54 thanks to Mike Cox for pointing the problem out.
55 55
56 Version 0.21: 56 Version 0.21:
57 Markus: Minor cleanup, warnings if something goes wrong, lame attempt 57 Markus: Minor cleanup, warnings if something goes wrong, lame attempt
58 to adhere to Documentation/CodingStyle 58 to adhere to Documentation/CodingStyle
59 59
60 Version 0.2: 60 Version 0.2:
61 Brad Hards <bradh@dynamite.com.au>: Fixes to make it work as non-module 61 Brad Hards <bradh@dynamite.com.au>: Fixes to make it work as non-module
62 Markus: Copyright clarification 62 Markus: Copyright clarification
63 63
64 Version 0.01: Markus: initial release 64 Version 0.01: Markus: initial release
@@ -163,11 +163,11 @@ static struct usb_driver usb_dsbr100_driver = {
163static int dsbr100_start(dsbr100_device *radio) 163static int dsbr100_start(dsbr100_device *radio)
164{ 164{
165 if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), 165 if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
166 USB_REQ_GET_STATUS, 166 USB_REQ_GET_STATUS,
167 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 167 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
168 0x00, 0xC7, radio->transfer_buffer, 8, 300)<0 || 168 0x00, 0xC7, radio->transfer_buffer, 8, 300)<0 ||
169 usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), 169 usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
170 DSB100_ONOFF, 170 DSB100_ONOFF,
171 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 171 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
172 0x01, 0x00, radio->transfer_buffer, 8, 300)<0) 172 0x01, 0x00, radio->transfer_buffer, 8, 300)<0)
173 return -1; 173 return -1;
@@ -179,11 +179,11 @@ static int dsbr100_start(dsbr100_device *radio)
179static int dsbr100_stop(dsbr100_device *radio) 179static int dsbr100_stop(dsbr100_device *radio)
180{ 180{
181 if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), 181 if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
182 USB_REQ_GET_STATUS, 182 USB_REQ_GET_STATUS,
183 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 183 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
184 0x16, 0x1C, radio->transfer_buffer, 8, 300)<0 || 184 0x16, 0x1C, radio->transfer_buffer, 8, 300)<0 ||
185 usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), 185 usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
186 DSB100_ONOFF, 186 DSB100_ONOFF,
187 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 187 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
188 0x00, 0x00, radio->transfer_buffer, 8, 300)<0) 188 0x00, 0x00, radio->transfer_buffer, 8, 300)<0)
189 return -1; 189 return -1;
@@ -195,16 +195,16 @@ static int dsbr100_setfreq(dsbr100_device *radio, int freq)
195{ 195{
196 freq = (freq/16*80)/1000+856; 196 freq = (freq/16*80)/1000+856;
197 if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), 197 if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
198 DSB100_TUNE, 198 DSB100_TUNE,
199 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 199 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
200 (freq>>8)&0x00ff, freq&0xff, 200 (freq>>8)&0x00ff, freq&0xff,
201 radio->transfer_buffer, 8, 300)<0 || 201 radio->transfer_buffer, 8, 300)<0 ||
202 usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), 202 usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
203 USB_REQ_GET_STATUS, 203 USB_REQ_GET_STATUS,
204 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 204 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
205 0x96, 0xB7, radio->transfer_buffer, 8, 300)<0 || 205 0x96, 0xB7, radio->transfer_buffer, 8, 300)<0 ||
206 usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), 206 usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
207 USB_REQ_GET_STATUS, 207 USB_REQ_GET_STATUS,
208 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 208 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
209 0x00, 0x24, radio->transfer_buffer, 8, 300)<0) { 209 0x00, 0x24, radio->transfer_buffer, 8, 300)<0) {
210 radio->stereo = -1; 210 radio->stereo = -1;
@@ -219,7 +219,7 @@ sees a stereo signal or not. Pity. */
219static void dsbr100_getstat(dsbr100_device *radio) 219static void dsbr100_getstat(dsbr100_device *radio)
220{ 220{
221 if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0), 221 if (usb_control_msg(radio->usbdev, usb_rcvctrlpipe(radio->usbdev, 0),
222 USB_REQ_GET_STATUS, 222 USB_REQ_GET_STATUS,
223 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, 223 USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
224 0x00 , 0x24, radio->transfer_buffer, 8, 300)<0) 224 0x00 , 0x24, radio->transfer_buffer, 8, 300)<0)
225 radio->stereo = -1; 225 radio->stereo = -1;
@@ -232,7 +232,7 @@ static void dsbr100_getstat(dsbr100_device *radio)
232 232
233/* check if the device is present and register with v4l and 233/* check if the device is present and register with v4l and
234usb if it is */ 234usb if it is */
235static int usb_dsbr100_probe(struct usb_interface *intf, 235static int usb_dsbr100_probe(struct usb_interface *intf,
236 const struct usb_device_id *id) 236 const struct usb_device_id *id)
237{ 237{
238 dsbr100_device *radio; 238 dsbr100_device *radio;
@@ -243,7 +243,7 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
243 kfree(radio); 243 kfree(radio);
244 return -ENOMEM; 244 return -ENOMEM;
245 } 245 }
246 memcpy(radio->videodev, &dsbr100_videodev_template, 246 memcpy(radio->videodev, &dsbr100_videodev_template,
247 sizeof(dsbr100_videodev_template)); 247 sizeof(dsbr100_videodev_template));
248 radio->removed = 0; 248 radio->removed = 0;
249 radio->users = 0; 249 radio->users = 0;
@@ -310,7 +310,7 @@ static int usb_dsbr100_do_ioctl(struct inode *inode, struct file *file,
310 struct video_tuner *v = arg; 310 struct video_tuner *v = arg;
311 311
312 dsbr100_getstat(radio); 312 dsbr100_getstat(radio);
313 if(v->tuner) /* Only 1 tuner */ 313 if(v->tuner) /* Only 1 tuner */
314 return -EINVAL; 314 return -EINVAL;
315 v->rangelow = FREQ_MIN*FREQ_MUL; 315 v->rangelow = FREQ_MIN*FREQ_MUL;
316 v->rangehigh = FREQ_MAX*FREQ_MUL; 316 v->rangehigh = FREQ_MAX*FREQ_MUL;
@@ -355,12 +355,12 @@ static int usb_dsbr100_do_ioctl(struct inode *inode, struct file *file,
355 v->volume = 1; 355 v->volume = 1;
356 v->step = 1; 356 v->step = 1;
357 strcpy(v->name, "Radio"); 357 strcpy(v->name, "Radio");
358 return 0; 358 return 0;
359 } 359 }
360 case VIDIOCSAUDIO: { 360 case VIDIOCSAUDIO: {
361 struct video_audio *v = arg; 361 struct video_audio *v = arg;
362 362
363 if (v->audio) 363 if (v->audio)
364 return -EINVAL; 364 return -EINVAL;
365 if (v->flags&VIDEO_AUDIO_MUTE) { 365 if (v->flags&VIDEO_AUDIO_MUTE) {
366 if (dsbr100_stop(radio)==-1) 366 if (dsbr100_stop(radio)==-1)