Analog sound trouble Raspberry Pi

11,040

Solution 1

I noticed this same problem. I haven't found a permanent solution yet, but what works for me is the following:

omxplayer -o local file.mp3

The audio comes out over HDMI, by the way, and the -o local flag forces it to line-out (local).

Solution 2

I had pulseaudio installed in my Raspberry Pi, so I had to use the variant described here:

amixer -c 0 cset numid=3 1

The -c 0 indicates which card to use. This worked for me.

I also set the volume to maximum using alsamixer just in case, but I'm not sure it was necessary.

Solution 3

Just start omx with the --vol switch. Type omxplayer --vol -1000 filename and you will notice the difference. Volume ranges from 0 to -6000.

Solution 4

Run

sudo amixer cset numid=3 1

to re-direct the output to the 3.5 mm jack

last digit 
  0 = auto
  1 = 3.5 mm
  2 = HDMI

Solution 5

It is also important to notice that omxplayer doesn't use default alsa setting (which is set by raspi-config). By default it is in auto mode, which means if HDMI is connected and EDID reports audio support, then it uses HDMI, otherwise analogue (headphone jack). (See issue).

omxplayer -o local

or

omxplayer -o hdmi

can be used to override this. That's why omxplayer can give different results than other players like mpg123.

Share:
11,040
Alf
Author by

Alf

Updated on June 14, 2022

Comments

  • Alf
    Alf almost 2 years

    I try to play mp3 files with mpg321, mpg123 and omxplayer with hdmi works fine, but with the analog audio jack doesn't work I have installed alsa-tools and alsamixergui

    I set the audio jack output:

    sudo modprobe snd_bcm2835
    sudo amixer cset numid=3 1
    

    I test the speakers with

    speaker-test -t sine -f 600
    

    and works well, I can hear the sound, but when I try to play an mp3 file with :

    omxplayer bubbling_water_1.mp3
    mpg321 bubbling_water_1.mp3
    

    not hear any sound at all, the same mp3 file play ok with hdmi output

    sudo amixer cset numid=3 0
    

    or

    sudo amixer cset numid=3 2
    

    but nothing happens on analog jack output any help ?