fmio(1)

NAME
fmio - small utility to manipulate fm radio card

SYNOPSIS
fmio [-d driver] [-f freq] [-v volume] [-x volume] [-X volume] [-s] [-m]
fmio [-d driver] -S [-l begin] [-h end] [-c count]
fmio [-d driver] -W frequency
fmio -D [-l begin] [-h end] [-c count]

DESCRIPTION
The fmio is a small program to set and change fm radio card parameters.

It sets frequency, volume of the card, reports signal strength on the working frequency and can set the radio card output to mono (if the card driver supports it).

The fmio has two additional modes - scanning and detection. In the scan mode fmio scans frequency range with step 10 kHz and outputs measured signal strength. The frequency range and number of probes for each frequency are configurable. In the detection mode fmio detects any supported radio card. Use this mode if you are not sure which card you have or do not know which port your card uses.

Also, it can control the output volume of a sound card thru /dev/mixer.

The options are as follows:

-d driver
    Use driver driver. See list of currently known drivers in section DRIVERS. If no driver was specified, default one will be used.

-f freq
    Set fm card frequency (in MHz).

-v volume
    Set volume of the card. Option -v 0 will mute the card. Each driver has its own maximal volume.

-x volume
    Set volume of an arbitrary mixer line of the sound card thru /dev/mixer. The volume has following format:
        <line name>=[+-]<left channel>,[+-]<right channel>.
    For line names see:
        /usr/include/sys/audioio.h under OpenBSD and NetBSD
        /usr/include/machine/soundcard.h under FreeBSD
        /usr/include/sys/soundcard.h under Linux

-X volume
    Set volume of the sound card master output thru /dev/mixer. Format of this option is similar to option -x, except there is no need to specify <line name>.

-m  Set output of the card to mono. Works only in conjunction with option -f. Note, that not all drivers support this option.

-s  Show current signal status of the radio card. It can be stereo, mono and none, if there's no signal on a given frequency.

-D  Detection mode. All known cards will be probed and results will be printed to standard output. The probe time can be reduced by specifying a frequency probe range (see options -l and -h ). Default is [103.00...105.00]. Note, this procedure is very slow - with the default range it can take some 40 minutes.

-S  Scan mode. If some of the listed below parameters were not specified the driver's maximal and minimal allowed frequencies are used. Measured data dumped to standard output.

-l begin
    Lower border of scan range (in MHz). If it is less than the minimal allowed for this card frequency, it is set to the minimal allowed frequency.

-h end
    Upper border of scan range (in MHz). If it is greater than the maximal allowed for this card frequency, it is set to the maximal allowed frequency.

-c count
    Number of probes for each frequency. The higher this number is the more precise will be results. Since stereo signal has weight 3, none - weight 0 and mono is in between, the strongest signal will have value 3 * count. If not set, each frequency will be probed only once. In detection mode this value is recommended to be 1.

-W frequency
    Search mode. Nearest to frequency station is searched and, if found, tuned to. The search direction is determined by frequency sign. If frequency has negative value, the station is searched downward. If frequency is positive the search is performed upward.

DRIVERS

Aztech/PackardBell FM Radio Card (ISA) ‘az’
    port 0x350 - az1
    port 0x358 - az2
    Volume - 0 .. 3
    Can set mono - yes
    Software search

Zoltrix RadioPlus 108 FM Radio Card (ISA) ‘zx’
    port 0x20c - zx1
    port 0x30c - zx2
    Volume - 0 .. 16
    Can set mono - yes
    Software search

AIMS Lab RadioTrack/RadioReveal RA300 FM Radio Card (ISA) ‘rt’
    port 0x20c - rt1
    port 0x30c - rt2
    Volume - 0 .. 10
    Can set mono - yes
    Software search

AIMS Lab RadioTrack II FM Radio Card (ISA) ‘rtII’
    port 0x20c - rtII1
    port 0x30c - rtII2
    Volume - 0 .. 1
    Can set mono - yes
    Hardware search

Gemtek FM Radio Card (ISA) ‘gti’
    port 0x20c - gt1
    port 0x30c - gt2
    port 0x24c - gt3
    port 0x34c - gt4
    port 0x248 - gt5
    Volume - 0 .. 1
    Can set mono - no
    Software search

Gemtek FM Radio Card (PCI) ‘gtp’
    Volume - 0 .. 1
    Can set mono - yes
    Hardware search

SoundForte Legacy 128 SF16-FMD2 Driver (ISA) ‘sf2d’
    port 0x284 - sf2d1
    port 0x384 - sf2d2
    Volume - 0 .. 1
    Can set mono - yes
    Search not implemented yet

SoundForte RadioLink SF16-FMR FM Radio Card (ISA) ‘sfr’
    port 0x284 - sfr1
    port 0x384 - sfr2
    Volume - 0 .. 15
    Can set mono - no
    Use with fmrinit
    Search not implemented yet

SoundForte RadioLink SF16-FMR2 FM Radio Card (ISA) ‘sf2r’
    Volume - 0 .. 1
    Can set mono - yes
    Hardware search

SoundForte RadioX SF16-FMI Sound Card with FM Radio (ISA) ‘sfi’
    Also known as Creative ViBRA 16c PnP
    port 0x284 - sfi1
    port 0x384 - sfi2
    Volume - 0 .. 1
    Can set mono - yes
    Software search

SoundForte RadioLink SF64-PCR Radio Card (PCI) ‘sf4r’
    Volume - 0 .. 1
    Can set mono - yes
    Software search

Guillemot Maxi Radio FM 2000 Radio Card (PCI) ‘mr’
    Volume - 0 .. 1
    Can set mono - no
    Software search

Brooktree Bt848 Driver ‘bktr’
    Volume - 0 .. 1
    Can set mono - yes
    Software search
    Use with bktrctl

Video4Linux Driver ‘v4l’
    Volume - 0 .. 10
    Can set mono - yes
    Software search

AIMS Lab Highway Xtreme TV card with FM tuner Driver ‘hx’
    Volume - 0 .. 1
    Can set mono - yes
    Software search
    Use with bktrctl
    Needs `option BT848_GPIO_ACCESS' in the kernel

BSD Radio Driver ‘br’
    Volume - 0 .. 255
    Can set mono - yes
    Software search

EXAMPLES

fmio
    Show version, default driver and short help.

fmio -f 104.5
    Set frequency to 104.5 MHz.

fmio -f 104.5 -s
    Set frequency to 104.5 MHz and show signal state on this frequency.

fmio -v 4 -f 104.5
    Set frequency to 104.5 MHz, hardware volume to 4.

fmio -x line=9
    Set volume of both channels of line input to 9.

fmio -x line1=+2,10
    For line1, increase volume of left channel by 2, set volume of right channel to 10.

fmio -X +2,-1
    Increase volume of left channel by 2, decrease volume of right channel by 1.

fmio -X -2
    Decrease volume of both channels by 2.

fmio -d bktr -S -l 100.0 -h 107.6
    Scan range [100.0...107.6] using driver bktr.

fmio -d sf2r -W -104.3
    Search station below 104.3 MHz using driver sf2r.

fmio -D -l 104.39 -h 104.41 -c 1
    Detect cards using range [104.39...104.41]. Detection is done by probing each frequency only once.

FILES

/dev/mixer
    mixer audio device

/dev/tuner
    radio tuner device used by ‘bktr’ driver (BSD)

/dev/radio
    radio tuner device used by ‘v4l’ driver (Linux) and ‘br’ driver (OpenBSD and NetBSD)

ENVIROMENT
The following environment variables affect the execution of fmio:

FMTUNER
    The driver that should be used as default.

RADIODEVICE
    The radio tuner device (OpenBSD and NetBSD).

MIXERDEVICE
    The audio mixer device to use.

BUGS

Frequency and hardware volume should be absolute. They cannot be increased or decreased relatively to the current value.

The Gemtek PCI card implementation has some flaw. Namely, when turning the card off, don't use option -f.

The SF16-FMR card has 16 volume levels. Thus, ‘fmio -f 104.5’ can be easily taken in as ‘fmio -v 0’. Use some volume level when setting up a frequency. Also, this card has to be initialized during bootup. Launch fmrinit from some start script (most likely rc.local).

There's a flaw in the FreeBSD, OpenBSD and NetBSD bktr driver - after closing /dev/tuner a card is turned off too. Thus, you cannot use fmio alone to manage bktr cards ( fmio opens /dev/tuner, tunes a card to some frequency and closes /dev/tuner - and a card is turned off ). Since fmio cannot hold /dev/tuner open all the time, use it with bktrctl.

For OpenBSD ( NetBSD? ) users - in order to use PCI cards you have to use either the ‘br’ driver or compile your kernel with ‘option INSECURE’. This is because the kernel without this option allows access to ports above 0x3FF only with securelevel = 0 which you can not set once you reach multiuser.

AUTHOR
Vladimir Popov <jumbo@narod.ru>