SOUNDCAMP-CL-AUG2015


NOTES ON USING THE SOUNDCAMP DISK IMAGE FOR THE RASPBERRY PI B+ OR A+ WITH THE CIRRUS LOGIC AUDIO CARD



CREDITS

This disk image was made by soundCamp and Max Baraitser in collaboration with Stephane Cousot (Locus Sonus), Udo Noll (radioaporee) and others. We're grateful to Peter Sinclair and all at Locus Sonus for hosting a Pi R&D workshop back in JAN 2014 and for ongoing hosting and collaboration. Thanks to Cirrus Logic / Wolfson for implementing the bias voltage on Line In, so EC mics can be plugged directly. The Primo EM-172 microphone capsule is available from FEL in the UK assembled or as components, or directly from the manufacturers. Thanks to Udo Noll for telling us about the Primo, and Zach Poff and others for DIY mic info online. Darkice is an open source project by Rafael Diniz and others. Thanks to all.



DOWNLOAD and DISK PREPARATION

1. Download the compressed disk image soundcamp-cl-aug2015.img.zip (1.8 GB) from the soundCamp Pi Resources page http://www.soundtent.org/how_to/pi_cirrus.html

2. Extract the image soundcamp-cl-aug2015.img from the zipped version (usually by double-clicking).

3. Download ApplePi-Baker or the previous ApplePi-Baker-1 (recommended) from  http://www.tweaking4all.com/news/applepi-baker-v1-6-update/

4. Insert an 8 GB Class 10 SD Card in your computer's SD Card slot or USB card reader. Launch ApplePi-Baker and select the SD card to write to. Be certain you have the correct disk selected (check the size). Select the soundcamp-cl-aug2015.img disk image  to copy from and type your computer's password to write it to the card (takes about 7 min). [Note: flashing the image is not the same as copying the files.]

5. When prompted on completion, eject the SD Card (now called 'boot') and follow SETUP below.





SETUP - GENERAL

1. Insert the SD Card in your computer SD Card slot or use a USB SD Card reader.

2. The SD Card appears in the Finder as 'boot'

3. In 'boot' find the folder 'SETUP' and the file 'wifi_settings.txt'. Open it in a text editor. Update these fields

ssid="WiFiNetworkName"
psk="WiFiPassword"

with the name and password of your WiFi network, keeping linebreaks and " " marks as they are.

4. Save and close the file. Eject the SD Card.

5. Insert the SD Card in the Pi with the Cirrus Logic audiocard and a WiFi adaptor attached. Connect a power supply and turn on.

6. The streambox appears on the network as a device called 'soundcamp-cl-aug2015'. If you want you can connect to it as

User: pi
Password: soundcamp

7. By default, a stream is set up to the Locus Sonus server called 'soundcamp_test.ogg'. It uses the pink Line In jack on the audiocard with bias voltage enabled, so you can plug in an external recorder or electret condenser (binaural) microphones directly. To listen, go to http://locusonus.org/soundmap/ and choose the branching server icon at upper right. A list of streams appears. Click to select and listen. For adjustments, see below.



SETTINGS - ACCOUNT


1. To appear on the Locus Sonus soundmap at http://locusonus.org/soundmap/, the name of your stream must match the one set in your Locus Sonus account. Choose the person icon from the map upper right or go to http://locusonus.org/soundmap/dev/admin/login/ to create or edit an account. 

2. Log in with your account user name and password and adjust your settings so the stream name at upper left is as you want it. (It generally has the form place_site.ogg or place_site.mp3). Check that other settings are correct, save and exit. 

3. If necessary, shut down the pi following instructions below. Insert the SD card in your computer. It appears in the finder as 'boot'. In 'boot' find the folder 'SETUP' and open the file 'stream_configuration.cfg' in a text editor. Adjust the following line

mountPoint      = soundcamp_test.ogg  # mount point of this stream on the IceCast2 server 

so it matches the stream name in your account, for instance: 

mountPoint      = place_site.ogg  # mount point of this stream on the IceCast2 server 

OR

mountPoint      = place_site.mp3  # mount point of this stream on the IceCast2 server 



If you are streaming in mp3, change this line

format          = vorbis    # format of the stream: 'vorbis' for ogg or 'mp3' for mp3

to

format          = mp3    # format of the stream: 'vorbis' for ogg or 'mp3' for mp3


Save, close the file and eject the SD Card.

Insert in the Pi and turn on. Your stream appears on the map. The location can be fine tuned via the user account interface as above.


SETTINGS - AUDIO STREAM

The vorbis or mp3 setting needs to be correct for the pi to stream to the map (see above).

In addition, you may want to tune other settings, especially the 'quality' - which sets the data rate of the stream. Trying to pass too much data through a connection that is too slow will lead to buffer overruns and the audio will be heard to drop out momentarily. When darkice is set to variable bit rate (vbr) the data rate is set exclusively by the quality setting (other fields are ignored). In general aim for the highest data rate that gives a stable stream without dropouts. Take account of times when the network has heavier usage. The quality setting is from 0.1 to 1.0. The default is 0.7. Try raising or lowering the setting to get the best result.

1. If necessary, shut down the pi following instructions below. Insert the SD card in your computer. It appears in the finder as 'boot'. In 'boot' find the folder 'SETUP' and open the file 'stream_configuration.cfg' in a text editor. Adjust the following line

quality         = 0.7       # From 0.1 to 1.0. Default 0.7. Adjust for quality and stability 

Stereo / mono is set in this line

channel         = 2         # channels. 1 = mono, 2 = stereo

For details on other settings, see the darkice manual page at http://manpages.ubuntu.com/manpages/hardy/man5/darkice.cfg.5.html



SETTINGS - AUDIO INPUT

The default audio input is from the Line In with bias voltage enabled at maximum gain (40)

You may want to change the source of the audio input or adjust the gain.

To access a GUI controller via the command line:

1. SSH into the pi as described above.

2. Open the controller by typing:

sudo cirrus_settings

Use the GUI to select the input and adjust the gain.



PI SHUTDOWN AND REBOOT


Shutting down the pi by simply turning it off can cause problems. It's better to use this method: 

1.   Open a Terminal window. To find the IP address of your pi on the network, type

ping soundcamp-cl-aug2015.local   > Enter

Note the IP address in the printout. It has the form 192.168.1.xxx To stop the printout type

Ctrl-c

2.   Connect to the pi via SSH by typing

ssh pi@IPaddress     > Enter

yes     > Enter		[to confirm you want to proceed]

password: soundcamp     > Enter

3.   Your cursor changes to pi@soundcamp-cl-aug2015 ~ $ You are now logged in to the pi remotely. To shut it down type

sudo halt     > Enter

4.   The pi reports: 'The system is going down for system halt NOW!' The stream will go down, lights on the Pi will stop flashing, and it can be switched off.

5.   Alternatively, to shut down and restart the pi, follow the instructions above but instead of 'halt' type

sudo reboot     > Enter

The pi shuts down and restarts. The stream resumes automatically.

6. If necessary, simply switch the Pi off. Disk corruption can result but in our experience, most likely that will be fine. Preferably keep a backup of the disk image.




Grant Smith
soundCamp
AUG 2015
soundtent.org

 

