summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/soundconfig.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config/soundconfig.sh')
-rwxr-xr-xabs/core/LinHES-config/soundconfig.sh24
1 files changed, 21 insertions, 3 deletions
diff --git a/abs/core/LinHES-config/soundconfig.sh b/abs/core/LinHES-config/soundconfig.sh
index 2f30306..e6aaa41 100755
--- a/abs/core/LinHES-config/soundconfig.sh
+++ b/abs/core/LinHES-config/soundconfig.sh
@@ -143,8 +143,6 @@ function write_asound {
pcm "hw:'"$mixAUDIODEVICE"'"
period_size 512
buffer_size 4096
-# rate 48000
-# format S16_LE
}
}
@@ -241,8 +239,28 @@ case $SOUNDOPTYPE in
;;
test|TEST)
echo $@ > /tmp/audio.test
+
#set iec958 audio bit
- iecset audio 1
+ if [[ $AUDIODEVICE == plughw:* ]]
+ then
+ cardName=`echo $AUDIODEVICE | sed 's/plughw:\(.*\),.*/\1/g'`
+ #cardDevice=`echo $AUDIODEVICE | sed 's/.*,\(.*\)/\1/g'`
+ iecset -c "$cardName" audio 1
+ else
+ cardName="0"
+ iecset audio 1
+ fi
+
+ #unmute IEC958
+ amixerControls=`amixer -c "$cardName" scontrols`
+ while read -r line; do
+ if [[ $line == *IEC958* ]]
+ then
+ amixCard=`echo "$line" | sed "s/.*\ \('.*\)/\1/g"`
+ amixer -c "$cardName" sset "$amixCard" unmute
+ fi
+ done <<< "$amixerControls"
+
#loadsound
if [ x$AUDIOTYPE = xOSS -o x$AUDIOTYPE = xoss ]
then