• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/media/radio/

Lines Matching refs:tt

96 static void tt_write_vol(struct terratec *tt, int volume)
101 mutex_lock(&tt->lock);
104 outb(0x80, tt->io + 1);
106 outb(0x00, tt->io + 1);
108 mutex_unlock(&tt->lock);
113 static void tt_mute(struct terratec *tt)
115 tt->muted = 1;
116 tt_write_vol(tt, 0);
119 static int tt_setvol(struct terratec *tt, int vol)
121 if (vol == tt->curvol) { /* requested volume = current */
122 if (tt->muted) { /* user is unmuting the card */
123 tt->muted = 0;
124 tt_write_vol(tt, vol); /* enable card */
130 tt_write_vol(tt, 0); /* "turn off card" by setting vol to 0 */
131 tt->curvol = vol; /* track the volume state! */
135 tt->muted = 0;
136 tt_write_vol(tt, vol);
137 tt->curvol = vol;
145 static int tt_setfreq(struct terratec *tt, unsigned long freq1)
154 mutex_lock(&tt->lock);
156 tt->curfreq = freq1;
180 outb(WRT_EN | DATA, tt->io);
181 outb(WRT_EN | DATA | CLK_ON, tt->io);
182 outb(WRT_EN | DATA, tt->io);
184 outb(WRT_EN | 0x00, tt->io);
185 outb(WRT_EN | 0x00 | CLK_ON, tt->io);
188 outb(0x00, tt->io);
190 mutex_unlock(&tt->lock);
195 static int tt_getsigstr(struct terratec *tt)
197 if (inb(tt->io) & 2) /* bit set = no signal present */
216 struct terratec *tt = video_drvdata(file);
228 v->signal = 0xFFFF * tt_getsigstr(tt);
241 struct terratec *tt = video_drvdata(file);
245 tt_setfreq(tt, f->frequency);
252 struct terratec *tt = video_drvdata(file);
257 f->frequency = tt->curfreq;
278 struct terratec *tt = video_drvdata(file);
282 if (tt->muted)
288 ctrl->value = tt->curvol * 6554;
297 struct terratec *tt = video_drvdata(file);
302 tt_mute(tt);
304 tt_setvol(tt,tt->curvol);
307 tt_setvol(tt,ctrl->value);
361 struct terratec *tt = &terratec_card;
362 struct v4l2_device *v4l2_dev = &tt->v4l2_dev;
366 tt->io = io;
367 if (tt->io == -1) {
371 if (!request_region(tt->io, 2, "terratec")) {
378 release_region(tt->io, 2);
383 strlcpy(tt->vdev.name, v4l2_dev->name, sizeof(tt->vdev.name));
384 tt->vdev.v4l2_dev = v4l2_dev;
385 tt->vdev.fops = &terratec_fops;
386 tt->vdev.ioctl_ops = &terratec_ioctl_ops;
387 tt->vdev.release = video_device_release_empty;
388 video_set_drvdata(&tt->vdev, tt);
390 mutex_init(&tt->lock);
392 if (video_register_device(&tt->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
393 v4l2_device_unregister(&tt->v4l2_dev);
394 release_region(tt->io, 2);
401 tt_write_vol(tt, 0);
407 struct terratec *tt = &terratec_card;
408 struct v4l2_device *v4l2_dev = &tt->v4l2_dev;
410 video_unregister_device(&tt->vdev);
411 v4l2_device_unregister(&tt->v4l2_dev);
412 release_region(tt->io, 2);