fmio

Langue: en

Version: 148352 (fedora - 04/07/09)

Section: 1 (Commandes utilisateur)


BSD mandoc

NAME

fmio - small utility to manipulate fm radio card

SYNOPSIS

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

DESCRIPTION

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

It sets frequency, volume of a card, reports signal strength on the working frequency and can set a radio card output to mono provided that 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. 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 through /dev/mixer

The options are as follows:

-d driver
Use driver driver See list of currently known drivers in section Sx DRIVERS . If no driver was specified, default one will be used.
-f freq
Set fm card frequency (in MHz )
-i
Show all available information about a driver and a card.
-m
Set output of a card to mono. Works only in conjunction with option -f Note, that not all drivers support this option.
-s
Show current signal status of a radio card.
-v volume
Set volume of a card. Option -v 0 will mute a card. Each driver has its own maximal volume.
-x volume
Set volume of an arbitrary mixer line of a sound card thru /dev/mixer The volume has following format:
<line name>=[+-]<left channel>,[+-]<right channel>.

For the line names see

under OpenBSD and NetBSD: /usr/include/sys/audioio.h
under Linux and FreeBSD: /usr/include/sys/soundcard.h

Some examples of the option -x usage are in the section Sx EXAMPLES below.

-X volume
Set volume of the sound card master output through /dev/mixer Format of this option is similar to option -x except there is no need to specify <line name>.
-D
Detection mode. All known cards will be probed and results will be printed to standard output. Note, this procedure is very slow.
-S
Scan mode. If some of the listed below parameters were not specified the FM maximal and minimal frequencies are used. Measured data is dumped to standard output.
-l begin
Lower border of scan range (in MHz ) If it is less than the FM minimal frequency (87.5 MHz , ) it is set to the FM minimal frequency.
-h end
Upper border of scan range (in MHz ) If it is greater than the FM maximal frequency (108.0 MHz , ) it is set to the FM maximal 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.
-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

Brooktree Bt848 Driver `bktr'

Volume - 0 .. 1
Can set mono - yes
Software search
Use with bktrctl

BMC FM Radio Card (ISA) `bmc'

port 0x20F - bmc1
port 0x30F - bmc2
Volume - 0 .. 15
Can set mono - yes
Search not implemented yet

BSD Radio Driver `br'

Volume - 0 .. 255
Can set mono - yes
Software search

EcoRadio Card (ISA) `er'

port 0x316 - er1
port 0x336 - er2
Volume - 0 .. 3
Can set mono - no
Search not implemented yet
Detection not implemented yet

Gemtek FM Radio Card (ISA) `gti'

port 0x20c - gti1
port 0x30c - gti2
port 0x24c - gti3
port 0x34c - gti4
port 0x248 - gti5
Volume - 0 .. 1
Can set mono - no
Software search

Gemtek FM Radio Card (PCI) `gtp'

Volume - 0 .. 1
Can set mono - yes
Hardware search

AIMS Lab Highway Xtreme TV card with FM tuner Driver `hx'

Volume - 0 .. 1
Can set mono - yes
Software search
BSD only
Use with bktrctl
Needs kernel with `option'
BT848_GPIO_ACCESS

Guillemot MaxiRadio FM 2000 Radio Card (PCI) `mr'

Volume - 0 .. 1
Can set mono - yes
Hardware 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

SoundForte Awesome 64R SF64-PCE2 Driver (PCI) `sae'

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
Detection not implemented yet

SoundForte RadioX SF16-FMI Driver (ISAPNP) `sfi'

Also known as Creative ViBRA 16c PnP
port 0x284 - sfi1
port 0x384 - sfi2
Volume - 0 .. 1
Can set mono - no
Search not implemented yet
Detection 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 RadioLink SF64-PCR FM Radio Card (PCI) `sf4r'

Volume - 0 .. 1
Can set mono - yes
Software search

Spase PCRadio Card (ISA) `sp'

port 0x1b0 - sp1
port 0x1f0 - sp2
port 0x278 - sp3
port 0x378 - sp4
port 0x2f8 - sp5
port 0x3bc - sp6
Volume - 0 .. 63
Can set mono - yes
Search not implemented yet

SoundForte Quad X-treme SF256-PCP-R Driver (PCI) `sqx'

Volume - 0 .. 1
Can set mono - yes
Hardware search

SoundForte Theatre X-treme 5.1 SF256-PCS-R Driver (PCI) `stx'

Volume - 0 .. 1
Can set mono - yes
Hardware search

Sound Vision 16 Gold Sound Card with FM Radio (ISA) `svg'

Volume - 0 .. 1
Can set mono - no
Software search

Trust FM Radio Card (ISA) `tr'

Volume - 0 .. 63
Can set mono - yes
Software search

Terratec FM Radio Card (ISAPNP) `tt'

Volume - 0 .. 7
Can set mono - yes
Hardware search

Video4Linux Driver `v4l'

Volume - 0 .. 10
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

EXAMPLES

Set frequency to 104.5 MHz:
 # fmio -f 104.5
 
Set frequency to 104.5 MHz and show signal state on this frequency:
 # fmio -f 104.5 -s
 
Set frequency to 104.5 MHz, hardware volume to 4:
 # fmio -v 4 -f 104.5
 
Set volume of both channels of line input to 9:
 # fmio -x line=9
 
For line1, increase volume of left channel by 2, set volume of right channel
to 10:
 # fmio -x line1=+2,10
 
For master output, increase volume of left channel by 2 and decrease volume
of right channel by 1:
 # fmio -X +2,-1
 
Decrease volume of both channels by 2:
 # fmio -X -2
 
Scan range [100.0...107.6] using driver
`bktr'
 # fmio -d bktr -S -l 100.0 -h 107.6
 
Search station below 104.3 MHz using driver
`sf2r'
 # fmio -d sf2r -W -104.3
 
Detect all available cards:
 # fmio -D
 

FILES

/dev/mixer
mixer audio device
/dev/tuner
radio tuner device used by the BSD bktr driver.
/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, NetBSD and Linux)
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 a 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 /etc/rc.local )

There's a flaw in the BSD bktr driver - after closing /dev/tuner a card is turned off too. Thus, you cannot use fmio alone to manage bktr cards because 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 The same concerns Linux users. Some cards supported by kernel are turned off after closing /dev/radio (e.g. USB tuners ) Use fmio with bktrctl

Due to the above limitation the BSD bktr driver cannot work correctly if frequency was not specified. E.g. fmio -d bktr -i will not work as expected. Correct use is fmio -d bktr -f <some freq> -i

AUTHOR

Vladimir Popov Aq jumbo@narod.ru