aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/miropcm20-radio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/radio/miropcm20-radio.c')
-rw-r--r--drivers/media/radio/miropcm20-radio.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/media/radio/miropcm20-radio.c b/drivers/media/radio/miropcm20-radio.c
index dc292da2605f..c4312fa0e2f5 100644
--- a/drivers/media/radio/miropcm20-radio.c
+++ b/drivers/media/radio/miropcm20-radio.c
@@ -16,13 +16,14 @@
16 16
17/* What ever you think about the ACI, version 0x07 is not very well! 17/* What ever you think about the ACI, version 0x07 is not very well!
18 * I can't get frequency, 'tuner status', 'tuner flags' or mute/mono 18 * I can't get frequency, 'tuner status', 'tuner flags' or mute/mono
19 * conditions... Robert 19 * conditions... Robert
20 */ 20 */
21 21
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/videodev.h> 24#include <linux/videodev.h>
25#include "../../../sound/oss/aci.h" 25#include <media/v4l2-common.h>
26#include "oss/aci.h"
26#include "miropcm20-rds-core.h" 27#include "miropcm20-rds-core.h"
27 28
28static int radio_nr = -1; 29static int radio_nr = -1;
@@ -123,7 +124,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
123 struct video_device *dev = video_devdata(file); 124 struct video_device *dev = video_devdata(file);
124 struct pcm20_device *pcm20 = dev->priv; 125 struct pcm20_device *pcm20 = dev->priv;
125 int i; 126 int i;
126 127
127 switch(cmd) 128 switch(cmd)
128 { 129 {
129 case VIDIOCGCAP: 130 case VIDIOCGCAP:
@@ -139,7 +140,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
139 case VIDIOCGTUNER: 140 case VIDIOCGTUNER:
140 { 141 {
141 struct video_tuner *v = arg; 142 struct video_tuner *v = arg;
142 if(v->tuner) /* Only 1 tuner */ 143 if(v->tuner) /* Only 1 tuner */
143 return -EINVAL; 144 return -EINVAL;
144 v->rangelow=87*16000; 145 v->rangelow=87*16000;
145 v->rangehigh=108*16000; 146 v->rangehigh=108*16000;
@@ -172,7 +173,7 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
172 return i; 173 return i;
173 } 174 }
174 case VIDIOCGAUDIO: 175 case VIDIOCGAUDIO:
175 { 176 {
176 struct video_audio *v = arg; 177 struct video_audio *v = arg;
177 memset(v,0, sizeof(*v)); 178 memset(v,0, sizeof(*v));
178 v->flags=VIDEO_AUDIO_MUTABLE; 179 v->flags=VIDEO_AUDIO_MUTABLE;
@@ -183,12 +184,12 @@ static int pcm20_do_ioctl(struct inode *inode, struct file *file,
183 v->mode|=VIDEO_SOUND_MONO; 184 v->mode|=VIDEO_SOUND_MONO;
184 /* v->step=2048; */ 185 /* v->step=2048; */
185 strcpy(v->name, "Radio"); 186 strcpy(v->name, "Radio");
186 return 0; 187 return 0;
187 } 188 }
188 case VIDIOCSAUDIO: 189 case VIDIOCSAUDIO:
189 { 190 {
190 struct video_audio *v = arg; 191 struct video_audio *v = arg;
191 if(v->audio) 192 if(v->audio)
192 return -EINVAL; 193 return -EINVAL;
193 194
194 pcm20_mute(pcm20, !!(v->flags&VIDEO_AUDIO_MUTE)); 195 pcm20_mute(pcm20, !!(v->flags&VIDEO_AUDIO_MUTE));
@@ -237,7 +238,7 @@ static int __init pcm20_init(void)
237{ 238{
238 if(video_register_device(&pcm20_radio, VFL_TYPE_RADIO, radio_nr)==-1) 239 if(video_register_device(&pcm20_radio, VFL_TYPE_RADIO, radio_nr)==-1)
239 goto video_register_device; 240 goto video_register_device;
240 241
241 if(attach_aci_rds()<0) 242 if(attach_aci_rds()<0)
242 goto attach_aci_rds; 243 goto attach_aci_rds;
243 244