Lines Matching defs:fmr2
53 struct fmr2
66 static struct fmr2 fmr2_card;
120 static int fmr2_product_info(struct fmr2 *dev)
135 static inline int fmr2_getsigstr(struct fmr2 *dev)
149 static int fmr2_setfreq(struct fmr2 *dev)
174 static int fmr2_setvolume(struct fmr2 *dev)
223 struct fmr2 *fmr2 = video_drvdata(file);
233 v->rxsubchans = fmr2->stereo ? V4L2_TUNER_SUB_STEREO :
237 mutex_lock(&fmr2->lock);
238 v->signal = fmr2_getsigstr(fmr2);
239 mutex_unlock(&fmr2->lock);
252 struct fmr2 *fmr2 = video_drvdata(file);
261 fmr2->curfreq = (f->frequency / 200) * 200;
264 if (fmr2->curvol && !fmr2->mute) {
265 mutex_lock(&fmr2->lock);
266 fmr2_setfreq(fmr2);
267 mutex_unlock(&fmr2->lock);
275 struct fmr2 *fmr2 = video_drvdata(file);
280 f->frequency = fmr2->curfreq;
287 struct fmr2 *fmr2 = video_drvdata(file);
294 if (fmr2->card_type == 11)
304 struct fmr2 *fmr2 = video_drvdata(file);
308 ctrl->value = fmr2->mute;
311 ctrl->value = fmr2->curvol;
320 struct fmr2 *fmr2 = video_drvdata(file);
324 fmr2->mute = ctrl->value;
327 fmr2->curvol = ctrl->value;
334 if (fmr2->curvol && !fmr2->mute)
340 mutex_lock(&fmr2->lock);
341 if (fmr2->curvol && !fmr2->mute) {
342 fmr2_setvolume(fmr2);
344 fmr2_setfreq(fmr2);
346 fmr2_mute(fmr2->io);
347 mutex_unlock(&fmr2->lock);
399 struct fmr2 *fmr2 = &fmr2_card;
400 struct v4l2_device *v4l2_dev = &fmr2->v4l2_dev;
404 fmr2->io = io;
405 fmr2->stereo = 1;
406 mutex_init(&fmr2->lock);
408 if (!request_region(fmr2->io, 2, "sf16fmr2")) {
415 release_region(fmr2->io, 2);
420 strlcpy(fmr2->vdev.name, v4l2_dev->name, sizeof(fmr2->vdev.name));
421 fmr2->vdev.v4l2_dev = v4l2_dev;
422 fmr2->vdev.fops = &fmr2_fops;
423 fmr2->vdev.ioctl_ops = &fmr2_ioctl_ops;
424 fmr2->vdev.release = video_device_release_empty;
425 video_set_drvdata(&fmr2->vdev, fmr2);
427 if (video_register_device(&fmr2->vdev, VFL_TYPE_RADIO, radio_nr) < 0) {
429 release_region(fmr2->io, 2);
433 v4l2_info(v4l2_dev, "SF16FMR2 radio card driver at 0x%x.\n", fmr2->io);
435 mutex_lock(&fmr2->lock);
436 fmr2_mute(fmr2->io);
437 fmr2_product_info(fmr2);
438 mutex_unlock(&fmr2->lock);
439 debug_print((KERN_DEBUG "card_type %d\n", fmr2->card_type));
445 struct fmr2 *fmr2 = &fmr2_card;
447 video_unregister_device(&fmr2->vdev);
448 v4l2_device_unregister(&fmr2->v4l2_dev);
449 release_region(fmr2->io, 2);