Analog sound problem. Raspberry Pi

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

I set the audio jack output:

sudo modprobe snd_bcm2835 sudo amixer cset numid=3 1 

I am testing speakers with

 speaker-test -t sine -f 600 

and it works well, I hear a sound, but when I try to play an mp3 file using

 omxplayer bubbling_water_1.mp3 mpg321 bubbling_water_1.mp3 

no sound is heard, the same mp3 file plays normally with hdmi output

 sudo amixer cset numid=3 0 

or

 sudo amixer cset numid=3 2 

but nothing happens at the output of the analog connector any help?

+4
source share
5 answers

I noticed the same problem. I have not found a permanent solution yet, but the following works for me:

 omxplayer -o local file.mp3 

The sound comes out via HDMI, by the way, and the local -o flag forces it to go linear (local).

+5
source

I had a pulsudio installed in my Raspberry Pi, so I had to use the option described here :

amixer -c 0 cset numid=3 1

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

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

+1
source

Just run omx with the --vol switch. omxplayer --vol -1000 filename and you will notice the difference. Volume range 0 to -6000

+1
source

Run

 sudo amixer cset numid=3 1 

to redirect the output to the 3.5 mm jack

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

It is also important to note that omxplayer does not use the default alsa setting (which is set by raspi-config). By default, it is in automatic mode, which means that if HDMI is connected and the EDID reports sound support, then it uses HDMI, otherwise it is analog (headphone jack). (See issue ).

 omxplayer -o local 

or

 omxplayer -o hdmi 

can be used to override this parameter. This is why omxplayer can give different results than other players like mpg123.

0
source

Source: https://habr.com/ru/post/1502184/


All Articles