RADIO(4)                  OpenBSD Programmer's Manual                 RADIO(4)

NAME
     radio - device-independent radio driver layer

SYNOPSIS
     #include <sys/types.h>
     #include <sys/ioctl.h>
     #include <sys/radioio.h>

DESCRIPTION
     The radio driver provides support for various FM radio cards.  It pro-
     vides an uniform programming interface layer above different underlying
     radio hardware drivers.

     For radio tuner controlling there is a single device file available:
     /dev/radio.

     The following ioctl(2) commands are supported:

     RIOCSMUTE (u_long)
             This command mutes or unmutes the device.  This operation does
             not affect volume value of the device.
     RIOCGMUTE (u_long)
             This command returns current mute state of the device.
     RIOCSMONO (u_long)
             This command sets the device output to mono even if the device
             receive a stereo signal (forced mono).
     RIOCGMONO (u_long)
             This command returns current forced mono state of the device.
     RIOCGVOLU (u_long)
             This command returns current volume of the device.
     RIOCSVOLU (u_long)
             This command sets current volume of the device.
     RIOCGFREQ (u_long)
             This command returns frequency the device is tuned to.
     RIOCSFREQ (u_long)
             This command sets working frequency of the device.
     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.
     RIOCGCAPS (u_long)
             This command returns the device capabilities.  The capabilities
             can have following values:
             RADIO_CAPS_DETECT_STEREO
                     The device can determine is it tuned to a stereo signal.
             RADIO_CAPS_DETECT_SIGNAL
                     The device can determine is it tuned or not.
             RADIO_CAPS_SET_MONO
                     The device capable to forcible set its output to mono.
             RADIO_CAPS_HW_SEARCH
                     The device can do hardware search.
             RADIO_CAPS_HW_AFC
                     The device has an internal hardware automatic frequency
                     control.
             RADIO_CAPS_REFERENCE_FREQ
                     The device allow to change the reference frequency of a
                     received signal.
             RADIO_CAPS_LOCK_SENSITIVITY
                     The device allow to change the station lock sensitivity
                     used during search operation.
             RADIO_CAPS_CARD_TYPE
                     Some cards have several different incarnations.  This al-
                     low to determine the variant of the card.  Currently not
                     used.
     RIOCGINFO (u_long)
             This commands returns current state of the device.
             RADIO_INFO_SIGNAL
                     Informs whether the device receives a valid signal or
                     noise.
             RADIO_INFO_STEREO
                     Informs whether the device receives a stereo or mono sig-
                     nal.
     RIOCGREFF (u_long)
             This command returns current value of the device's reference fre-
             quency.
     RIOCSREFF (u_long)
             This command sets reference frequency of the device.
     RIOCGLOCK (u_long)
             This command returns current value of the device's station lock
             sensitivity.
     RIOCSLOCK (u_long)
             This command sets station lock sensitivity of the device.

FILES
     /dev/radio

SEE ALSO
     ioctl(2), az(4), sf2r(4), sf4r(4)

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 ker-
     nel, that is) either with port 0x350 or 0x358.  Don't even try to compile
     support for the second card into the kernel.

OpenBSD 3.0                   September 21, 2001                             2
