[OpenELEC] audio via mini jack

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)?

--
td
Reply to
td
Loading thread data ...

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 #

--
Chris Elvidge 
England
 Click to see the full signature
Reply to
Chris Elvidge

Thx, I'll try. Should it be executed automatically each time OpenELEC is starting?

--
td
Reply to
td

If you want ONLY mini-jack output, just execute "amixer cset numid=3 1" at startup.

The bash script can be executed anytime from command prompt.

--
Chris Elvidge 
England
 Click to see the full signature
Reply to
Chris Elvidge

amixer settings are remembered across reboots, so only need to execute it once. Caveat: /boot/config.txt may also set jack/hdmi output.

Reply to
A. Dumas

Yes. I've heard that one before. Setting it every boot doesn't hurt - and if you've set it to HDMI during uptime, it's reset.

--
Chris Elvidge 
England
 Click to see the full signature
Reply to
Chris Elvidge

Just for my understanding.

Can you have audio out of both devices or is it either/or?

Cheers

Dave R

Reply to
David.WE.Roberts

AKAIK Either/Or

--
Chris Elvidge 
England
 Click to see the full signature
Reply to
Chris Elvidge

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.