Internetstreaming

Starting with Linux kernel version 2.6.37 you can do without a 2nd soundcard,
because from this kernel version on the module „snd-aloop“ which creates a loopback device is already included.

The following description refers to OpenSuSE12.1 but should be easily transferable to other distributions.

Requirements:
* a streaming server (Icecast2 or Shoutcast)
* a streaming client (Ices2 or SC_Trans)
* Linux kernel version 2.6.37 or higher on the SvxLink PC (e.g. OpenSuSE 12.1)

First you have to install Icecast2 and Ices2 or, if you use Shoutcast, the Shoutcast server and SC_Trans and configure them as you wish. There are more than enough installation and configuration instructions on the Internet for this.

The streaming server does not necessarily have to be installed on the same PC on which SvxLink is running. A root server is a good choice here simply because of the better network connection to the Internet, as long as it is available.

Ices2 or also SC_Trans are either installed on the PC running SvxLink or on the PC running remotetrx (to free the SvxLink PC from the CPU load).

Then we have to make sure that the modules „snd-aloop“ and „snd-pcm-oss“, which are needed for the connection to the streaming client, are loaded when starting the system.

[/etc/sysconfig/kernel]:
MODULES_LOADED_ON_BOOT=“snd-aloop snd-pcm-oss“

After restarting the system, you can now use the command „aplay -l“ to check whether the „snd-aloop“ module has also been loaded.

remote-trx1:~ # aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: rev40 [VIA 82C686A/B rev40], device 0: VIA 82C686A/B rev40 [VIA 82C686A/B rev40]
Subdevices: 0/1
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —
<font color=“#ffff00″>Sync by honeybunny <font color=“#ffff00″> —

If everything is working and the module „snd-pcm-oss“ has been loaded correctly then „/dev/dsp1″ can now be used as capture device for the streaming client.

[sc_trans.conf]:

capture=1
capturedevice=/dev/dsp1
captureinput=Capture
capturesamplerate=16000
capturechannels=1

[ices2.xml]:

< stream >
< metadata >
< name >DB0DIN< /name>
< genre >Hamradio Network< /genre >
< description >DB0DIN Livestream< /description >
< url >http://db0din.de< /url >
< /metadata >
< input >
< modules >oss< /modules >
< param name=“rate“>16000< /param>
< param name=“channels“>1< /param>
< param name=“device“>/dev/dsp1< /param>
< param name=“buffer-time“>500< /param>
< param name=“metadata“>1< /param>
< param name=“metadatafilename“>/tmp/info.txt< /param>
< /input>

SvxLink or the remotetrx is still configured as Multi-Tx
[/etc/svxlink/svxlink.conf or /etc/svxlink/remotetrx.conf]:

[RepeaterLogic]
TYPE=Repeater
RX=QuantarRx
TX=MultiTx
MODULES=ModuleEchoLink,ModuleMetarInfo,ModulePropagationMonitor,ModuleSelCallEnc,ModuleTrafficInfo
….

[MultiTx]
TYPE=Multi
TRANSMITTERS=RepeaterTx,StreamingTx

[RepeaterTx]
TYPE=Local
AUDIO_DEV=alsa:plughw:0
AUDIO_CHANNEL=0
PTT_PORT=/dev/ttyS0
PTT_PIN=DTRRTS
TX_DELAY=0
PREEMPHASIS=0
DTMF_TONE_LENGTH=100
DTMF_TONE_SPACING=50
DTMF_TONE_AMP=-18

[StreamingTx]
TYPE=Local
AUDIO_DEV=alsa:plughw:1,1 #here the 1st capture-device of the snd-aloop is selected now
AUDIO_CHANNEL=0
PTT_PORT=NONE
PTT_PIN=DTRRTS
TX_DELAY=0
PREEMPHASIS=0

Now start all applications and check the function.
Good luck to do6ep, Mathias