I installed OpenELEC on my RaspberryPi. Connected with TV with HDMI cable audio is OK and works. I plugged some speakers to mini jack and I have no sound. How can I enable audio via minijack (I've already enabled it in OpenELEC settings)?
Try this: #!/bin/bash # # The value(s) (last line) for PCM playback 0=auto, 1=analog, 2=hdmi # # amixer cget numid=3 # numid=3,iface=MIXER,name='PCM Playback Route' # ; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0 # : values=0 # # script toggles output from auto to speaker # or sets absoutely if $1 is 0, 1 or 2 # if [ ! -z "$1" ] then if [ "$1" = "auto" ] then amixer cset numid=3 0 echo "Output set to auto." elif [ "$1" = "0" -o "$1" = "1" -o "$1" = "2" ] then amixer cset numid=3 $1 case $1 in 0) echo "Output set to auto." ;; 1) echo "Output set to analog." ;; 2) echo "Output set to hdmi." ;; esac else echo "To set: value must be 0, 1 or 2." echo "No parameter to toggle 0/1." fi exit fi # if [ $(amixer cget numid=3 | tail -n1 | cut -d= -f2) -eq 0 ] then amixer cset numid=3 1 echo "Output set to analog." else amixer cset numid=3 0 echo "Output set to auto." fi #
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.