p n sys/types.h n sys/ioctl.h n sys/radioio.h .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.
p For radio tuner controlling there is a single device file available:
p The following .Xr ioctl 2 commands are supported:
p l -tag -width indent -compact t Dv RIOCSSRCH (int) 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. t Dv RIOCGINFO (struct radio_info) t Dv RIOCSINFO (struct radio_info) Get or set the current hardware device information into the struct radio_info structure. d -literal struct radio_info { int mute; int volume; int stereo; int rfreq; /* reference frequency */ int lock; /* locking field strength */ uint32_t freq; /* in kHz */ uint32_t caps; /* card capabilities */ #define RADIO_CAPS_DETECT_STEREO (1<<0) #define RADIO_CAPS_DETECT_SIGNAL (1<<1) #define RADIO_CAPS_SET_MONO (1<<2) #define RADIO_CAPS_HW_SEARCH (1<<3) #define RADIO_CAPS_HW_AFC (1<<4) #define RADIO_CAPS_REFERENCE_FREQ (1<<5) #define RADIO_CAPS_LOCK_SENSITIVITY (1<<6) #define RADIO_CARD_TYPE (0xFF<<16) uint32_t info; #define RADIO_INFO_STEREO (1<<0) #define RADIO_INFO_SIGNAL (1<<1) }; .Ed
p The .Va mute field is a boolean.
p The .Va volume field holds the card volume information and can be at most 255.
p The .Va stereo field is a boolean.
p The .Va rfreq holds information about the card reference frequency (not all cards support this feature).
p The .Va lock field holds information about the card locking field strength during an automatic search for cards that support this feature.
p The .Va freq field is the frequency in kHz the card is tuned to.
p The .Va caps field is read-only and describes the card capabilities. The capabilities can have following values: l -tag -width indent -compact t Dv RADIO_CAPS_DETECT_STEREO The device can determine is it tuned to a stereo signal. t Dv RADIO_CAPS_DETECT_SIGNAL The device can determine is it tuned or not. t Dv RADIO_CAPS_SET_MONO The device capable to forcible set its output to mono. t Dv RADIO_CAPS_HW_SEARCH The device can do hardware search. t Dv RADIO_CAPS_HW_AFC The device has an internal hardware automatic frequency control. t Dv RADIO_CAPS_REFERENCE_FREQ The device allow to change the reference frequency of a received signal. t Dv RADIO_CAPS_LOCK_SENSITIVITY The device allow to change the station lock sensitivity used during search operation. t Dv RADIO_CARD_TYPE Some cards have several different incarnations. This allow to determine the variant of the card. Currently not used. .El
p The .Va info field is read-only and describes the current state of the card - tuned/not tuned, stereo signal/mono signal. l -tag -width indent -compact t Dv RADIO_INFO_STEREO Informs whether the device receives a stereo or mono signal. t Dv RADIO_INFO_SIGNAL Informs whether the device receives a valid signal or noise. .El .El .Sh FILES l -tag -width /dev/radio -compact t Pa /dev/radio .El .Sh SEE ALSO .Xr radioctl 1 , .Xr ioctl 2 , .Xr az 4 , .Xr bktr 4 , .Xr gtp 4 , .Xr rt 4 , .Xr rtii 4 , .Xr sf2r 4 , .Xr slurm 4 , .Xr udsbr 4 .Sh HISTORY The .Nm device driver appeared in .Ox 3.0 and .Nx 1.6 . .Sh AUTHORS .An -nosplit The .Nm driver was written by .An Vladimir Popov and .An Maxim Tsyplakov for .Ox and ported to .Nx by .An Lennart Augustsson . The man page was written by Vladimir Popov.