Lines Matching +full:0 +full:x33c

57 module_param(io, int, 0);
58 MODULE_PARM_DESC(io, "I/O address of Cadet card (0x330,0x332,0x334,0x336,0x338,0x33a,0x33c,0x33e)");
59 module_param(radio_nr, int, 0);
96 .index = 0,
123 if ((inb(dev->io + 1) & 0x40) == 0) in cadet_getstereo()
131 unsigned fifo = 0; in cadet_gettune()
139 outb(0x00, dev->io + 1); /* Ensure WRITE-ENABLE is LOW */ in cadet_gettune()
140 dev->tunestat = 0xffff; in cadet_gettune()
145 for (i = 0; i < 25; i++) { in cadet_gettune()
146 fifo = (fifo << 1) | ((inb(dev->io + 1) >> 7) & 0x01); in cadet_gettune()
148 outb(0x01, dev->io + 1); in cadet_gettune()
150 outb(0x00, dev->io + 1); in cadet_gettune()
164 unsigned freq = 0, test, fifo = 0; in cadet_getfreq()
175 return ((fifo & 0x7fff) - 450) * 16; in cadet_getfreq()
178 for (i = 0; i < 14; i++) { in cadet_getfreq()
179 if ((fifo & 0x01) != 0) in cadet_getfreq()
198 test = 0; in cadet_settune()
199 test = (fifo >> 23) & 0x02; /* Align data for SDO */ in cadet_settune()
200 test |= 0x1c; /* SDM=1, SWE=1, SEN=1, SCK=0 */ in cadet_settune()
203 for (i = 0; i < 25; i++) { in cadet_settune()
204 test |= 0x01; /* Toggle SCK High */ in cadet_settune()
206 test &= 0xfe; /* Toggle SCK Low */ in cadet_settune()
209 test = 0x1c | ((fifo >> 23) & 0x02); in cadet_settune()
226 fifo = 0; in cadet_setfreq()
231 for (i = 0; i < 14; i++) { in cadet_setfreq()
234 fifo |= 0x01; in cadet_setfreq()
241 fifo |= 0x100000; /* Select AM Band */ in cadet_setfreq()
263 if ((dev->tunestat & 0x40) == 0) { /* Tuned */ in cadet_setfreq()
268 dev->sigstrength = 0; in cadet_setfreq()
271 outb(inb(dev->io + 1) & 0x7f, dev->io + 1); in cadet_setfreq()
291 outb(0x3, dev->io); /* Select RDS Decoder Control */ in cadet_handler()
292 if ((inb(dev->io + 1) & 0x20) != 0) in cadet_handler()
294 outb(0x80, dev->io); /* Select RDS fifo */ in cadet_handler()
296 while ((inb(dev->io) & 0x80) != 0) { in cadet_handler()
320 outb(0x80, dev->io); /* Select RDS fifo */ in cadet_start_rds()
321 timer_setup(&dev->readtimer, cadet_handler, 0); in cadet_start_rds()
330 int i = 0; in cadet_read()
333 if (dev->rdsstat == 0) in cadet_read()
360 return 0; in vidioc_querycap()
372 v->capability = bands[0].capability | bands[1].capability; in vidioc_g_tuner()
373 v->rangelow = bands[0].rangelow; /* 520 kHz (start of AM band) */ in vidioc_g_tuner()
378 outb(inb(dev->io + 1) & 0x7f, dev->io + 1); in vidioc_g_tuner()
381 if (inb(dev->io + 1) & 0x80) in vidioc_g_tuner()
390 return 0; in vidioc_g_tuner()
396 return v->index ? -EINVAL : 0; in vidioc_s_tuner()
407 return 0; in vidioc_enum_freq_bands()
419 return 0; in vidioc_g_frequency()
431 f->frequency >= (bands[0].rangehigh + bands[1].rangelow) / 2; in vidioc_s_frequency()
433 return 0; in vidioc_s_frequency()
444 outb(0x00, dev->io + 1); in cadet_s_ctrl()
446 outb(0x20, dev->io + 1); in cadet_s_ctrl()
447 return 0; in cadet_s_ctrl()
475 dev->rdsstat = 0; in cadet_release()
479 return 0; in cadet_release()
489 if (dev->rdsstat == 0 && (req_events & (EPOLLIN | EPOLLRDNORM))) { in cadet_poll()
491 if (dev->rdsstat == 0) in cadet_poll()
530 {.id = "MSM0c24", .driver_data = 0},
541 if (io > 0) in cadet_pnp_probe()
544 if (!pnp_port_valid(dev, 0)) in cadet_pnp_probe()
547 io = pnp_port_start(dev, 0); in cadet_pnp_probe()
567 static int iovals[8] = { 0x330, 0x332, 0x334, 0x336, 0x338, 0x33a, 0x33c, 0x33e }; in cadet_probe()
570 for (i = 0; i < 8; i++) { in cadet_probe()
600 if (io < 0) in cadet_init()
605 if (dev->io < 0) in cadet_init()
609 if (dev->io < 0) { in cadet_init()
611 v4l2_err(v4l2_dev, "you must set an I/O address with io=0x330, 0x332, 0x334,\n"); in cadet_init()
612 v4l2_err(v4l2_dev, "0x336, 0x338, 0x33a, 0x33c or 0x33e\n"); in cadet_init()
620 if (res < 0) { in cadet_init()
629 V4L2_CID_AUDIO_MUTE, 0, 1, 1, 1); in cadet_init()
651 if (res < 0) in cadet_init()
653 v4l2_info(v4l2_dev, "ADS Cadet Radio Card at 0x%x\n", dev->io); in cadet_init()
654 return 0; in cadet_init()
672 outb(0x00, dev->io + 1); in cadet_exit()