.\" $OpenBSD: radio.4,v 1.2 2001/10/08 08:52:50 mpech Exp $ .\" .\" Copyright (c) 2001 Vladimir Popov .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON .\" ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .Dd September 21, 2001 .Dt RADIO 4 .Os .Sh NAME .Nm radio .Nd device-independent radio driver layer .Sh SYNOPSIS .Fd #include .Fd #include .Fd #include .Sh DESCRIPTION The .Nm driver provides support for various FM radio cards. It provides an uniform programming interface layer above different underlying radio hardware drivers. .Pp For radio tuner controlling there is a single device file available: .Pa /dev/radio . .Pp The following .Xr ioctl 2 commands are supported: .Pp .Bl -tag -width indent -compact .It Dv RIOCSMUTE (u_long) This command mutes or unmutes the device. This operation does not affect volume value of the device. .It Dv RIOCGMUTE (u_long) This command returns current mute state of the device. .It Dv RIOCSMONO (u_long) This command sets the device output to mono even if the device receive a stereo signal (forced mono). .It Dv RIOCGMONO (u_long) This command returns current forced mono state of the device. .It Dv RIOCGVOLU (u_long) This command returns current volume of the device. .It Dv RIOCSVOLU (u_long) This command sets current volume of the device. .It Dv RIOCGFREQ (u_long) This command returns frequency the device is tuned to. .It Dv RIOCSFREQ (u_long) This command sets working frequency of the device. .It Dv RIOCSSRCH (u_long) This command assumes that a signal search is required and gives direction of search to the driver - 0 to search down and any non-zero value to search up. .It Dv RIOCGCAPS (u_long) This command returns the device capabilities. The capabilities can have following values: .Bl -tag -width indent -compact .It Dv RADIO_CAPS_DETECT_STEREO The device can determine is it tuned to a stereo signal. .It Dv RADIO_CAPS_DETECT_SIGNAL The device can determine is it tuned or not. .It Dv RADIO_CAPS_SET_MONO The device capable to forcible set its output to mono. .It Dv RADIO_CAPS_HW_SEARCH The device can do hardware search. .It Dv RADIO_CAPS_HW_AFC The device has an internal hardware automatic frequency control. .It Dv RADIO_CAPS_REFERENCE_FREQ The device allow to change the reference frequency of a received signal. .It Dv RADIO_CAPS_LOCK_SENSITIVITY The device allow to change the station lock sensitivity used during search operation. .It Dv RADIO_CAPS_CARD_TYPE Some cards have several different incarnations. This allow to determine the variant of the card. Currently not used. .El .It Dv RIOCGINFO (u_long) This commands returns current state of the device. .Bl -tag -width indent -compact .It Dv RADIO_INFO_SIGNAL Informs whether the device receives a valid signal or noise. .It Dv RADIO_INFO_STEREO Informs whether the device receives a stereo or mono signal. .El .It Dv RIOCGREFF (u_long) This command returns current value of the device's reference frequency. .It Dv RIOCSREFF (u_long) This command sets reference frequency of the device. .It Dv RIOCGLOCK (u_long) This command returns current value of the device's station lock sensitivity. .It Dv RIOCSLOCK (u_long) This command sets station lock sensitivity of the device. .El .Sh FILES .Bl -tag -width /dev/radio -compact .It Pa /dev/radio .El .Sh SEE ALSO .Xr ioctl 2 , .Xr az 4 , .Xr sf2r 4 , .Xr sf4r 4 .Sh BUGS You can have only one card of the same type. For example, if you have two aztech FM tuners, the first card with jumper set to port 0x358 and the second one - to 0x350, you can use only one aztech card (in the kernel, that is) either with port 0x350 or 0x358. Don't even try to compile support for the second card into the kernel.