mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

HDMI audio problem-no sound

Wed Aug 26, 2015 11:03 am

Hi,
I have just got my first Raspberry Pi. I am relatively new to Linux and I am having trouble with the Raspberry Pi.
I cannot get the audio to work via hdmi on multiple hdmi TVs and have tried different walkthroughs/tutorials.
So far I have tried various methods in the config.txt file:

Setting "hdmi_drive" to 2.
Enabling force_hdmi_hotplug.
I have briefly tried changing "hdmi_group" and "hdmi_mode".
I also tried entering "amixer cset numid=3 2" into the terminal to force hdmi output.
Also changed the volume in the mixer.

So far none of this has enabled the audio, please could I have some help?
Many thanks.

mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

Re: HDMI audio problem-no sound

Wed Aug 26, 2015 7:51 pm

Forgot to add that I am using Raspbian.

paulie
Posts: 275
Joined: Thu Jan 19, 2012 6:51 pm

Re: HDMI audio problem-no sound

Wed Aug 26, 2015 9:29 pm

Does this help?

viewtopic.php?t=5062
It has been my custom to use Xeyes

mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

Re: HDMI audio problem-no sound

Thu Aug 27, 2015 2:37 pm

Thanks for your suggestion paulie. I tried enabling these settings this from the thread:

hdmi_drive=2
hdmi_group=1
hdmi_force_edid_audio=1
hdmi_force_hotplug=1

CTRL+O to save
CTRL+X to exit

Still no luck, is there anything else I can do?
Thanks again.

paulie
Posts: 275
Joined: Thu Jan 19, 2012 6:51 pm

Re: HDMI audio problem-no sound

Thu Aug 27, 2015 8:31 pm

Could you run the following command, and post the results?

Code: Select all

 tvservice -d edid.dat   
This should show what modes your TV can use.
It has been my custom to use Xeyes

mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

Re: HDMI audio problem-no sound

Fri Aug 28, 2015 6:29 pm

Ran the command, here are the results:

Code: Select all

Enabling fuzzy format match...
Parsing edid.dat...
HDMI:EDID version 1.3, 1 extensions, screen size 115x65 cm
HDMI:EDID features - videodef 0x80 !standby !suspend !active off; colour encoding:RGB444|YCbCr422; sRGB is not default colourspace; preferred format is native; does not support GTF
HDMI:EDID found monitor range descriptor tag 0xfd
HDMI:EDID monitor range offsets: V min=0, V max=0, H min=0, H max=0
HDMI:EDID monitor range: vertical is 58-62 Hz, horizontal is 31-70 kHz, max pixel clock is 160 MHz
HDMI:EDID monitor range does not support GTF
HDMI:EDID found monitor name descriptor tag 0xfc
HDMI:EDID monitor name is LG_TV
HDMI:EDID found preferred DMT detail timing format: 1360x768p @ 60 Hz (39)
HDMI:EDID found CEA detail timing format: 1280x720p @ 60 Hz (4)
HDMI:EDID established timing I/II bytes are A1 08 00
HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz in established timing I/II
HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz in established timing I/II
HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz in established timing I/II
HDMI:EDID standard timings block x 8: 0x81C0 6140 4540 3140 0101 0101 0101 0101 
HDMI:EDID found DMT format: code 85, 1280x720p @ 60 Hz (16:9) in standard timing 0
HDMI:EDID found DMT format: code 16, 1024x768p @ 60 Hz (4:3) in standard timing 1
HDMI:EDID found DMT format: code 9, 800x600p @ 60 Hz (4:3) in standard timing 2
HDMI:EDID found DMT format: code 4, 640x480p @ 60 Hz (4:3) in standard timing 3
HDMI:EDID parsing v3 CEA extension 0
HDMI:EDID monitor support - underscan IT formats:yes, basic audio:yes, yuv444:yes, yuv422:yes, #native DTD:1
HDMI:EDID found CEA detail timing format: 1920x1080i @ 60 Hz (5)
HDMI:EDID failed to find a matching detail format for 1280x720p hfp:64 hs:128 hbp:192 vfp:3 vs:5 vbp:4 pixel clock:74 MHz
HDMI:EDID calculated refresh rate is 61 Hz
HDMI:EDID guessing the format to be 1280x720p @60 Hz
HDMI:EDID found CEA detail timing format: 1280x720p @ 60 Hz (4)
HDMI:EDID found CEA detail timing format: 720x480p @ 60 Hz (2)
HDMI:EDID found CEA detail timing format: 1920x1080p @ 60 Hz (16)
HDMI:EDID found CEA detail timing format: 1920x1080i @ 50 Hz (20)
HDMI:EDID found CEA format: code 16, 1920x1080p @ 60Hz 
HDMI:EDID found CEA format: code 31, 1920x1080p @ 50Hz 
HDMI:EDID found CEA format: code 4, 1280x720p @ 60Hz (native)
HDMI:EDID found CEA format: code 19, 1280x720p @ 50Hz 
HDMI:EDID found CEA format: code 5, 1920x1080i @ 60Hz 
HDMI:EDID found CEA format: code 20, 1920x1080i @ 50Hz 
HDMI:EDID found CEA format: code 3, 720x480p @ 60Hz 
HDMI:EDID found CEA format: code 2, 720x480p @ 60Hz 
HDMI:EDID found CEA format: code 18, 720x576p @ 50Hz 
HDMI:EDID found CEA format: code 32, 1920x1080p @ 24Hz 
HDMI:EDID found CEA format: code 33, 1920x1080p @ 25Hz 
HDMI:EDID found CEA format: code 34, 1920x1080p @ 30Hz 
HDMI:EDID found CEA format: code 21, 1440x576i @ 50Hz 
HDMI:EDID found CEA format: code 1, 640x480p @ 60Hz 
HDMI:EDID found audio format 6 channels AC3, sample rate: 32|44|48 kHz, bitrate: 640 kbps
HDMI:EDID found audio format 2 channels PCM, sample rate: 32|44|48|96|192 kHz, sample size: 16|20|24 bits
HDMI:EDID found HDMI VSDB length 5
HDMI:EDID HDMI VSDB has physical address 1.0.0.0
HDMI:EDID HDMI VSDB has no extension fields
HDMI:EDID adding mandatory support for CEA (17) 720x576p @ 50Hz
HDMI:EDID filtering formats with pixel clock > 162 MHz or h. blanking > 1023
HDMI:EDID best score mode initialised to DMT (4) 640x480p @ 60 Hz with pixel clock 25 MHz (score 0)
HDMI:EDID best score mode is now CEA (1) 640x480p @ 60 Hz with pixel clock 25 MHz (score 43432)
HDMI:EDID best score mode is now CEA (2) 720x480p @ 60 Hz with pixel clock 27 MHz (score 3045736)
HDMI:EDID CEA mode (3) 720x480p @ 60 Hz with pixel clock 27 MHz has a score of 45736
HDMI:EDID best score mode is now CEA (4) 1280x720p @ 60 Hz with pixel clock 74 MHz (score 4607944)
HDMI:EDID DMT mode (4) 640x480p @ 60 Hz with pixel clock 25 MHz has a score of 61864
HDMI:EDID CEA mode (5) 1920x1080i @ 60 Hz with pixel clock 74 MHz has a score of 4149416
HDMI:EDID DMT mode (9) 800x600p @ 60 Hz with pixel clock 40 MHz has a score of 82600
HDMI:EDID CEA mode (16) 1920x1080p @ 60 Hz with pixel clock 148 MHz has a score of 2649416
HDMI:EDID DMT mode (16) 1024x768p @ 60 Hz with pixel clock 65 MHz has a score of 119370
HDMI:EDID CEA mode (17) 720x576p @ 50 Hz with pixel clock 27 MHz has a score of 45736
HDMI:EDID CEA mode (18) 720x576p @ 50 Hz with pixel clock 27 MHz has a score of 45736
HDMI:EDID CEA mode (19) 1280x720p @ 50 Hz with pixel clock 74 MHz has a score of 71080
HDMI:EDID CEA mode (20) 1920x1080i @ 50 Hz with pixel clock 74 MHz has a score of 2128680
HDMI:EDID CEA mode (21) 1440x576i @ 50 Hz with pixel clock 27 MHz has a score of 35368
HDMI:EDID CEA mode (31) 1920x1080p @ 50 Hz with pixel clock 148 MHz has a score of 128680
HDMI:EDID CEA mode (32) 1920x1080p @ 24 Hz with pixel clock 74 MHz has a score of 74766
HDMI:EDID CEA mode (33) 1920x1080p @ 25 Hz with pixel clock 74 MHz has a score of 76840
HDMI:EDID CEA mode (34) 1920x1080p @ 30 Hz with pixel clock 74 MHz has a score of 87208
HDMI:EDID best score mode is now DMT (39) 1360x768p @ 60 Hz with pixel clock 85 MHz (score 5188004)
HDMI:EDID DMT mode (85) 1280x720p @ 60 Hz with pixel clock 74 MHz has a score of 135592
HDMI:EDID preferred mode remained as DMT (39) 1360x768p @ 60 Hz with pixel clock 85 MHz
HDMI:EDID has HDMI support and audio support
edid_parser exited with code 0
Thanks again for your help.

paulie
Posts: 275
Joined: Thu Jan 19, 2012 6:51 pm

Re: HDMI audio problem-no sound

Fri Aug 28, 2015 9:46 pm

According to info here

viewtopic.php?t=5851

"If the chosen format is a DMT format, the default driven mode will be DVI. The user will need to set driving mode to 2 explicitly if HDMI output is desired. In DVI mode there will be no sound!"

To get sound, you need a CEA (hdmi_group = 1) setting compatible with your monitor.

I have seen reference to mono sound files not playing well (too short?) But stereo files seen to work
It has been my custom to use Xeyes

mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

Re: HDMI audio problem-no sound

Sat Aug 29, 2015 7:59 pm

Hi again, tried cea modes 4, 2, 31, 19, 5, 16, 20 and 34. However none of them gave sound. I tried some with hdmi_drive=2 with no change. I tried switching the sound card in alsamixer by pressing F6 with each mode, however this didn't help.
I also tried the headphone jack with and without this command: "disable_audio_dither=1" but the headphones buzzed/there was no sound.
Is there anything else I could do? Could it be anything to do with Raspbian being installed via noobs?
Many thanks.

paulie
Posts: 275
Joined: Thu Jan 19, 2012 6:51 pm

Re: HDMI audio problem-no sound

Sat Aug 29, 2015 11:21 pm

It won't be noobs.
More info on audio problems...

http://raspberrypi.stackexchange.com/qu ... ot-working
It has been my custom to use Xeyes

gkreidl
Posts: 6326
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HDMI audio problem-no sound

Sun Aug 30, 2015 7:03 am

Run
tvservice -a
What does it report?
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

Re: HDMI audio problem-no sound

Sun Aug 30, 2015 4:24 pm

Hi gkreidl, ran the command. Here are the results

PCM supported: Max channels: 2, Max samplerate: 192kHz, Max samplesize 24 bits.
AC3 supported: Max channels: 6, Max samplerate: 48kHz, Max rate 640 kb/s.

Thanks for the help both of you, its really appreciated.

gkreidl
Posts: 6326
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HDMI audio problem-no sound

Sun Aug 30, 2015 5:47 pm

mimby wrote:Hi gkreidl, ran the command. Here are the results

PCM supported: Max channels: 2, Max samplerate: 192kHz, Max samplesize 24 bits.
AC3 supported: Max channels: 6, Max samplerate: 48kHz, Max rate 640 kb/s.

Thanks for the help both of you, its really appreciated.
Now try playing an audio or video file with omxplayer.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

Re: HDMI audio problem-no sound

Sun Aug 30, 2015 6:53 pm

Tried playing a file in omxplayer. Didn't have one ready so I made a quick recording in sonic pi using this:

Code: Select all

2.times do
   play_pattern [40,25,45,25,25,50,50]
   play_pattern [40,25,45,25,25,50,50].reverse
end
Then used "omxplayer /home/pi/Desktop/my-recording.wav"
Still no sound. Tried changing the sound card in alsamixer to see if that did anything, no change.
Anything else that can be done?
Many thanks.
Edit: also tried beep1.ogg in the python_games file

gkreidl
Posts: 6326
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HDMI audio problem-no sound

Sun Aug 30, 2015 7:50 pm

Try

Code: Select all

omxplayer -o hdmi pathtofile
omxplayer output doesn't depend on Alsa settings.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

Re: HDMI audio problem-no sound

Mon Aug 31, 2015 1:25 pm

Hi gkreidl,
Tried running "omxplayer -o hdmi /home/pi/python_games/beep1.ogg" and "omxplayer -o hdmi /home/pi/Desktop/my-recording.wav" but did not get any audio; what can be done?
Thanks again.

gkreidl
Posts: 6326
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HDMI audio problem-no sound

Mon Aug 31, 2015 2:51 pm

Does omxplayer report anything?
Try another HDMI cable.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

Re: HDMI audio problem-no sound

Mon Aug 31, 2015 3:26 pm

Hi again,
Tried a second hdmi cable but with no luck.
This is what was reported by omxplayer:

Code: Select all

omxplayer -o hdmi /home/pi/Desktop/my-recording.wav
Audio codec pcm_s16le channels 2 samplerate 44100 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
have a nice day ;)
Thanks again for your help.

gkreidl
Posts: 6326
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HDMI audio problem-no sound

Mon Aug 31, 2015 8:07 pm

have a nice day ;)
usually means that omxplayer cannot play the file.
Can you test with some video with sound?
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

Re: HDMI audio problem-no sound

Wed Sep 02, 2015 5:25 pm

Hi again,
Tried playing the "what is a Raspberry Pi" video on the help page and a few YouTube videos. There was no sound on any of them.
What else can be done to solve this problem?
Many Thanks.

gkreidl
Posts: 6326
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: HDMI audio problem-no sound

Wed Sep 02, 2015 7:32 pm

I'm out of any more ideas. If "tvservice -a" reports working hdmi audio and omxplayer has no sound I don't know, what may be causing it.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

mimby
Posts: 11
Joined: Fri Aug 21, 2015 3:16 pm

Re: HDMI audio problem-no sound

Thu Sep 24, 2015 8:11 pm

After trying suggested fixes with no luck, I decided to order a new sd card pre-loaded with NOOBS in case there was anything wrong with the sd card.
So far I haven't changed anything on the sd card-haven't made files or users; haven't changed settings or installed programs.

In Raspbian, if the sound doesn't work initially after I have tested, what are the normal steps I should take to get the audio working on a fresh install of the OS? Is there an order in which I should try different steps?
Any help is greatly appreciated, many thanks to the people who have given me help so far.

Return to “Troubleshooting”