diff options
Diffstat (limited to 'drivers/media/radio/radio-trust.c')
-rw-r--r-- | drivers/media/radio/radio-trust.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/radio/radio-trust.c b/drivers/media/radio/radio-trust.c index 5a099a50d4d0..efcec0181c2c 100644 --- a/drivers/media/radio/radio-trust.c +++ b/drivers/media/radio/radio-trust.c | |||
@@ -1,14 +1,14 @@ | |||
1 | /* radio-trust.c - Trust FM Radio card driver for Linux 2.2 | 1 | /* radio-trust.c - Trust FM Radio card driver for Linux 2.2 |
2 | * by Eric Lammerts <eric@scintilla.utwente.nl> | 2 | * by Eric Lammerts <eric@scintilla.utwente.nl> |
3 | * | 3 | * |
4 | * Based on radio-aztech.c. Original notes: | 4 | * Based on radio-aztech.c. Original notes: |
5 | * | 5 | * |
6 | * Adapted to support the Video for Linux API by | 6 | * Adapted to support the Video for Linux API by |
7 | * Russell Kroll <rkroll@exploits.org>. Based on original tuner code by: | 7 | * Russell Kroll <rkroll@exploits.org>. Based on original tuner code by: |
8 | * | 8 | * |
9 | * Quay Ly | 9 | * Quay Ly |
10 | * Donald Song | 10 | * Donald Song |
11 | * Jason Lewis (jlewis@twilight.vtc.vsc.edu) | 11 | * Jason Lewis (jlewis@twilight.vtc.vsc.edu) |
12 | * Scott McGrath (smcgrath@twilight.vtc.vsc.edu) | 12 | * Scott McGrath (smcgrath@twilight.vtc.vsc.edu) |
13 | * William McGrath (wmcgrath@twilight.vtc.vsc.edu) | 13 | * William McGrath (wmcgrath@twilight.vtc.vsc.edu) |
14 | * | 14 | * |
@@ -30,7 +30,7 @@ | |||
30 | #define CONFIG_RADIO_TRUST_PORT -1 | 30 | #define CONFIG_RADIO_TRUST_PORT -1 |
31 | #endif | 31 | #endif |
32 | 32 | ||
33 | static int io = CONFIG_RADIO_TRUST_PORT; | 33 | static int io = CONFIG_RADIO_TRUST_PORT; |
34 | static int radio_nr = -1; | 34 | static int radio_nr = -1; |
35 | static int ioval = 0xf; | 35 | static int ioval = 0xf; |
36 | static __u16 curvol; | 36 | static __u16 curvol; |
@@ -135,7 +135,7 @@ static void tr_setmute(int mute) | |||
135 | static int tr_getsigstr(void) | 135 | static int tr_getsigstr(void) |
136 | { | 136 | { |
137 | int i, v; | 137 | int i, v; |
138 | 138 | ||
139 | for(i = 0, v = 0; i < 100; i++) v |= inb(io); | 139 | for(i = 0, v = 0; i < 100; i++) v |= inb(io); |
140 | return (v & 1)? 0 : 0xffff; | 140 | return (v & 1)? 0 : 0xffff; |
141 | } | 141 | } |
@@ -175,7 +175,7 @@ static int tr_do_ioctl(struct inode *inode, struct file *file, | |||
175 | { | 175 | { |
176 | struct video_tuner *v = arg; | 176 | struct video_tuner *v = arg; |
177 | 177 | ||
178 | if(v->tuner) /* Only 1 tuner */ | 178 | if(v->tuner) /* Only 1 tuner */ |
179 | return -EINVAL; | 179 | return -EINVAL; |
180 | 180 | ||
181 | v->rangelow = 87500 * 16; | 181 | v->rangelow = 87500 * 16; |
@@ -211,28 +211,28 @@ static int tr_do_ioctl(struct inode *inode, struct file *file, | |||
211 | return 0; | 211 | return 0; |
212 | } | 212 | } |
213 | case VIDIOCGAUDIO: | 213 | case VIDIOCGAUDIO: |
214 | { | 214 | { |
215 | struct video_audio *v = arg; | 215 | struct video_audio *v = arg; |
216 | 216 | ||
217 | memset(v,0, sizeof(*v)); | 217 | memset(v,0, sizeof(*v)); |
218 | v->flags = VIDEO_AUDIO_MUTABLE | VIDEO_AUDIO_VOLUME | | 218 | v->flags = VIDEO_AUDIO_MUTABLE | VIDEO_AUDIO_VOLUME | |
219 | VIDEO_AUDIO_BASS | VIDEO_AUDIO_TREBLE; | 219 | VIDEO_AUDIO_BASS | VIDEO_AUDIO_TREBLE; |
220 | v->mode = curstereo? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO; | 220 | v->mode = curstereo? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO; |
221 | v->volume = curvol * 2048; | 221 | v->volume = curvol * 2048; |
222 | v->step = 2048; | 222 | v->step = 2048; |
223 | v->bass = curbass * 4370; | 223 | v->bass = curbass * 4370; |
224 | v->treble = curtreble * 4370; | 224 | v->treble = curtreble * 4370; |
225 | 225 | ||
226 | strcpy(v->name, "Trust FM Radio"); | 226 | strcpy(v->name, "Trust FM Radio"); |
227 | return 0; | 227 | return 0; |
228 | } | 228 | } |
229 | case VIDIOCSAUDIO: | 229 | case VIDIOCSAUDIO: |
230 | { | 230 | { |
231 | struct video_audio *v = arg; | 231 | struct video_audio *v = arg; |
232 | 232 | ||
233 | if(v->audio) | 233 | if(v->audio) |
234 | return -EINVAL; | 234 | return -EINVAL; |
235 | tr_setvol(v->volume); | 235 | tr_setvol(v->volume); |
236 | tr_setbass(v->bass); | 236 | tr_setbass(v->bass); |
237 | tr_settreble(v->treble); | 237 | tr_settreble(v->treble); |
238 | tr_setstereo(v->mode & VIDEO_SOUND_STEREO); | 238 | tr_setstereo(v->mode & VIDEO_SOUND_STEREO); |
@@ -292,7 +292,7 @@ static int __init trust_init(void) | |||
292 | write_i2c(2, TDA7318_ADDR, 0xe0); /* speaker att. RR = 0 dB */ | 292 | write_i2c(2, TDA7318_ADDR, 0xe0); /* speaker att. RR = 0 dB */ |
293 | write_i2c(2, TDA7318_ADDR, 0x40); /* stereo 1 input, gain = 18.75 dB */ | 293 | write_i2c(2, TDA7318_ADDR, 0x40); /* stereo 1 input, gain = 18.75 dB */ |
294 | 294 | ||
295 | tr_setvol(0x8000); | 295 | tr_setvol(0x8000); |
296 | tr_setbass(0x8000); | 296 | tr_setbass(0x8000); |
297 | tr_settreble(0x8000); | 297 | tr_settreble(0x8000); |
298 | tr_setstereo(1); | 298 | tr_setstereo(1); |