Penguin
Annotated edit history of RadioTuner version 12, including all changes. View license author blame.
Rev Author # Line
3 StuartYeates 1 A piece of [Hardware] that allows you to pick up broadcast radio on your computer.
2
5 CraigBox 3 Many TvTunerCards have a radio tuner built in.
3 StuartYeates 4
4 JohnMcPherson 5 !Tuning/Listening to the radio
12 IanMcDonald 6 You can use the "radio" application to tune and listen to radio stations. This is part of the xawtv(1) package, but in [Debian] at least it is split into its own binary package:
7 JohnMcPherson 7 <verbatim>
3 StuartYeates 8 apt-get install radio
7 JohnMcPherson 9 </verbatim>
3 StuartYeates 10
11 Here is a sample __~/.radio__ configuration file for it (based on Hamilton frequencies):
8 JohnMcPherson 12 ----
7 JohnMcPherson 13 <verbatim>
8 JohnMcPherson 14 [Stations]
9 IanMcDonald 15 89000000=The Generator
16 89800000=ZMFM
8 JohnMcPherson 17 91400000=Concert Radio
9 IanMcDonald 18 92000000=More FM
8 JohnMcPherson 19 93000000=The Rock
20 93800000=Solid Gold
9 IanMcDonald 21 94500000=Life FM
8 JohnMcPherson 22 96000000=Radio Hauraki
9 IanMcDonald 23 97000000=scan-9
24 97800000=scan-10
25 98600000=Classic Hits
26 99300000=scan-13
8 JohnMcPherson 27 99950000=scan-14
9 IanMcDonald 28 101000000=National Radio
8 JohnMcPherson 29 103340000=scan-16
3 StuartYeates 30
8 JohnMcPherson 31 [Buttons]
9 IanMcDonald 32 1=89000000
33 2=89800000
8 JohnMcPherson 34 3=91400000
35 5=93000000
36 6=93800000
37 7=96000000
9 IanMcDonald 38 8=100100000
8 JohnMcPherson 39 </verbatim>
40 ----
3 StuartYeates 41 Gnome Radio is a nice gui for [GTK2] that can store frequencies and record streams onto disk as Wav, [MP3] or OggVorbis.%%%
42 RedHat users with Dags repo set up on Apt or yum can install `gnomeradio`
4 JohnMcPherson 43
44
45 !Recording
46
47 1. Use the Gnome Radio program as above.
48
49 2. From the command line:
50
51 Step 1 - (Make sure your sound card's mixer is set to record from the appropriate device - eg from Line In if you are using a loop-back cable).
52
53 Step 2 - run the "radio" command or whatever program you use to get output to the sound card.
54
55 Step 3 - run the following commands (or put them in a script and run that). Press Ctrl-C to finish.
56 ----
7 JohnMcPherson 57 <verbatim>
4 JohnMcPherson 58 #!/bin/sh
59
60 # -c 1 for mono
61
62 # -s signed/-u unsigned, -w words (2byte samples)
63 datatype="-s -w"
64
65 # cd quality sample rate
66 rate="-r 44100"
67 # this is fine for voice recordings
68 rate="-r 22050"
69
70 # I like ogg.
71 encodecmd="oggenc - -o out.ogg"
72 #If you prefer mp3, you could install "gogo" and use
73 #encodecmd="gogo stdin out.mp3"
74
75 sox -t ossdsp /dev/dsp -t wav -c 1 $rate $datatype - | $encodecmd
7 JohnMcPherson 76 </verbatim>
4 JohnMcPherson 77 ----
78 Note that these commands aren't really radio-specific - they could be
79 used for recording anything, although the settings here are ok for radio-quality audio. Also, if you use [ALSA] then you will need to have [OSS]-emulation drivers loaded.
80
6 JohnMcPherson 81 ----
82 !!! Troubleshooting
7 JohnMcPherson 83 !!UDev
84 [UDev] by default (at least in Debian and Ubuntu) doesn't create a symlink for /dev/radio (to /dev/radio0), but the 'radio' program tries to use /dev/radio.
85
86 To tell udev to create a symlink, create a file called 00_video4linux.rules
87 in the /etc/udev/rules.d directory, with the following content:
88 <verbatim>
89 # make a symlink to the first radio device
90 KERNEL="radio0", SYMLINK="radio"
91 </verbatim>
92
93
94 !!Misc
6 JohnMcPherson 95 The driver for the radio tuner on the saa7134 tv tuner card seemed to have been broken for LinuxKernel 2.6.8, but works again in 2.6.9.
10 JakubHozak 96
97 !!Kernel parameters
11 JakubHozak 98 There is an insmod parameter for saa7134 "radio_nr" that specifies the number of radion device and ther is probably no "radio" flag parameter,
10 JakubHozak 99 by which you can turn the support on/off (use modinfo for more info). But if you want to use a radio and your doesn't have an EEPROM, you must
100 set the "card" parameter explicitly and the board you set MUST have a builtin radion. Otherwise the radio just won't play, and no error message
101 appears.
12 IanMcDonald 102 ----
103 See also [Video4Linux]
3 StuartYeates 104 ----
105 [CategoryHardware]