Skip to content

Commit

Permalink
Convert setsound.sh to make use of new associative array init file pa…
Browse files Browse the repository at this point in the history
…rsing.
  • Loading branch information
jcass77 committed Mar 1, 2015
1 parent 26f25c2 commit a415c1d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Create Pi MusicBox.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Update the kernel to make sure all optimizations of newer core-software:

**USB Fix**

It's tricky to get good sound out of the Pi. For USB Audio (sound cards, etc), it is essential to disable the so called FIQ_SPLIT. Why? It seems that audio at high nitrates interferes with the ethernet activity, which also runs over USB. Add these options to the cmdline.txt file on your SD Card.
It's tricky to get good sound out of the Pi. For USB Audio (sound cards, etc), it is essential to disable the so called FIQ_SPLIT. Why? It seems that audio at high bitrates interferes with the ethernet activity, which also runs over USB. Add these options to the cmdline.txt file on your SD Card.

dwc_otg.fiq_fix_enable=1 dwc_otg.fiq_split_enable=0

Expand Down
2 changes: 1 addition & 1 deletion create_musicbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ ln -fsn /boot/config/settings.ini /var/lib/mopidy/.config/mopidy/mopidy.conf
#**USB Fix**
#It's tricky to get good sound out of the Pi. For USB Audio (sound cards, etc),
# it is essential to disable the so called FIQ_SPLIT. Why? It seems that audio
# at high nitrates interferes with the ethernet activity, which also runs over USB.
# at high bitrates interferes with the ethernet activity, which also runs over USB.
# These options are added at the beginning of the cmdline.txt file in /boot
sed -i '1s/^/dwc_otg.fiq_fix_enable=1 dwc_otg.fiq_split_enable=0 smsc95xx.turbo_mode=N /' /boot/cmdline.txt

Expand Down
4 changes: 2 additions & 2 deletions filechanges/opt/musicbox/setsound.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fi
# If output not defined, it will automatically detect USB / HDMI / Analog in given order
# It is at this moment not possible to detect whether an i2s device is connected hence
# i2s is only selected if explicitly given as output in the config file
OUTPUT=$(echo $INI__musicbox__output | tr "[:upper:]" "[:lower:]")
OUTPUT=$(echo ${INI["musicbox__output"]} | tr "[:upper:]" "[:lower:]")
CARD=

if [[ -z "$OUTPUT" ]]
Expand Down Expand Up @@ -166,7 +166,7 @@ fi

log_progress_msg "Line out set to $OUTPUT card $CARD"

if [ "$OUTPUT" == "usb" -a "$INI__musicbox__downsample_usb" == "1" ]
if [ "$OUTPUT" == "usb" -a "${INI["musicbox__downsample_usb"]}" == "1" ]
# resamples to 44K because of problems with some usb-dacs on 48k (probably related to usb drawbacks of Pi)
# and extra buffer for usb
#if [ "$OUTPUT" == "usb" ]
Expand Down

0 comments on commit a415c1d

Please sign in to comment.