element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum How to get sound over HDMI working when using a TV?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 58 replies
  • Subscribers 677 subscribers
  • Views 11926 views
  • Users 0 members are here
  • raspberry
  • audio
  • hdmi;
  • hdmi
  • over
  • tv;
  • raspberry_pi
  • sound
  • pi;
Related

How to get sound over HDMI working when using a TV?

wallarug
wallarug over 13 years ago

I have tried everything I could find on the internet but nothing has worked.  I have a HD TV and the Raspberry Pi is connect through a HDMI cable.  I have tried to change the config.txt file with hdmi_drive=2 (didn't work) and tried nothing in config.txt, I have tried sudo modprobe snd-bcm2835 as well but nothing I do seems to be working.  I installed vlc but it gives me an error: "VLC failed to initlalize your sound output device (if any).  Please update your alsa-lib to version 1.0.23-2-g8d80d5f or higher to try to fix this issue".  The help on the Raspberry Pi Forums is not very helpful...Example: "yep, got it playing videos, video games, and just plain music".  Can you please help me so that I can move on to some basic operations.  PS:  I have NO Linux knowledge so please be very specific with instructions.

  • Sign in to reply
  • Cancel
Parents
  • wallarug
    wallarug over 13 years ago

    All fixed (audio + resolution)

    Instuctions for others who may be experiencing the same issue with a TV and the Raspberry Pi:

    1. Install a fresh image

    2. start-up the Raspberry Pi and let it set itself up (normal set-up)

    3. After you have gone through normal set-up:

         a. Log-in as a normal user (debian image: pi)

         b. Type the command: "sudo nano /boot/config.txt "

         c. Press enter

         d. Type in: "hdmi_drive=2 " [exactly as it is here]

         e. Then press crtl + o

         f.  Press Enter

         g. then press crtl + x

    4. Restart using the command: " sudo shutdown -r now "

     

    That gets the Raspberry Pi to register the TV as a HDMI device.  You now have sound!  For different resolution:

    5. After you have gone through normal set-up:

         a. Log-in as a normal user (debian image: pi)

         b. Type the command: "sudo nano /boot/config.txt "

         c. Press enter

         d. Type in: "hdmi_group=1 " [exactly as it is here]

              Press Enter

              Type : "hdmi_mode=x "  where x = corresponding number of resolution mode.  See: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=26&t=5851

         e. Then press crtl + o

         f. Press Enter

         g. then press crtl + x

    6. Restart using the command: " sudo shutdown -r now "

     

    Now you have desired resolution and Sound!!!

     

    Happy Raspberry Pi...ing

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • wallarug
    wallarug over 13 years ago in reply to wallarug

    Adding to above, every time you start-up the RPi, you have to type (before startx): sudo modprobe snd-bcm2835

     

    .wav and .mp3 are also working through LXmusic.

     

    My Raspberry Pi just became media central!!

     

    Playing videos is next!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • wallarug
    wallarug over 13 years ago in reply to GreenYamo

    I didn't, how do I do that?  Is it included?  I got the impression that it was included in the download.

     

    I have other files I can play.  What are the commands that I can use if the install was successful? 

     

    I am not sure if the install was successful so...??? 

    Is there a GUI way to load videos?  That would help me alot.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to wallarug

    > Is there a GUI way to load videos?

     

    multimedia is explained in chapter 5 of the RPi User's Manual.

    Unfortunately the RPi User's Manual hasn't been written yet.

    You can download big_buck_bunny from http://www.bigbuckbunny.org/

    the "wget" command is one way of downloading files.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • wallarug
    wallarug over 13 years ago in reply to Former Member

    Thanks

    Will give it a go later (maybe next thursday).

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GreenYamo
    GreenYamo over 13 years ago in reply to wallarug

    Hello Fergus, try

     

    omxplayer -o hdmi <filename>

     

    Although I haven't tried it, try using omxplayer /? or omxplayer ?

     

    It is also worth remembering that a lot of Linux commands have Man(ual) pages, so typing Man omxplayer should get you some information on how to use the commands.

     

    Steve

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • wallarug
    wallarug over 13 years ago in reply to GreenYamo

    thanks steve

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • wallarug
    wallarug over 13 years ago in reply to GreenYamo

    When I enter: "omxplayer /?" or "omxplayer ?"  the terminal window prints: "have a nice day : )" .

     

    What's with that?  I thought it was funny but annoying at the same time. image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • wallarug
    wallarug over 13 years ago in reply to GreenYamo

    Thanks again steve,

     

    omxplayer works with that command:

     

    omxplayer -o hdmi <file name>

     

    before you do that though, you need to change the directory in terminal to where the file is located.

     

    but otherwise, all good and very helpful support.

     

    Fergus

     

    PS: does it player all media types?  it plays .mp4 for certain.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • wallarug
    wallarug over 13 years ago in reply to wallarug

    I found a useful resource for getting vnc to work.  It might help others.  http://www.youtube.com/watch?v=c5QCoh8S0N4

     

    Also, tightvnc client will not run the raspberry pi at 24 bit colour. I will investigate.

     

    Set time: http://www.cyberciti.biz/faq/howto-set-date-time-from-linux-command-prompt/  (for my later use and others)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GreenYamo
    GreenYamo over 13 years ago in reply to wallarug

    Hello Fergus, enter omxplayer with nothing after it, and that will give you a list of options. I have just tried the Man page for it, and that doesn't exist!

     

    Regarding media types, see this post on the forum:

     

    http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=6979&p=87493&hilit=codec#p87493

     

    There are only two supported, Mpeg4 and h.264. Others may be possible in the future.

     

    Steve

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • wallarug
    wallarug over 13 years ago in reply to Former Member

    coder27 wrote:

     

    > All fixed (audio + resolution)

     

    Yay!

     

    > Adding to above, every time you start-up the RPi, you have to type (before startx): sudo modprobe snd-bcm2835

     

    You can automate this by adding this command to your ".login" file, which is a file in your home directory with the name .login (note the initial dot).  Every time you log in, the commands in this file get automatically executed.  If the file doesn't already exist, you can create a new one.  The purpose of the dot is to hide the file when you do a normal directory listing.

     

    > Can someone tell me how to install vlc and vnc onto the raspberry pi.  I've gotten this far: apt-get install  [what comes next?]

     

    vlc isn't gpu accelerated, so wouldn't be expected to work.  The only way I know of to get video is with omxplayer or xbmc.

    Can you give more detailed intructions for creating the .login file.  for example: is the file called: ".login.txt" or just ".login".  When I created the file, it did not load the command: "sudo modprobe snd-bcm2835"

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • wallarug
    wallarug over 13 years ago in reply to Former Member

    coder27 wrote:

     

    > All fixed (audio + resolution)

     

    Yay!

     

    > Adding to above, every time you start-up the RPi, you have to type (before startx): sudo modprobe snd-bcm2835

     

    You can automate this by adding this command to your ".login" file, which is a file in your home directory with the name .login (note the initial dot).  Every time you log in, the commands in this file get automatically executed.  If the file doesn't already exist, you can create a new one.  The purpose of the dot is to hide the file when you do a normal directory listing.

     

    > Can someone tell me how to install vlc and vnc onto the raspberry pi.  I've gotten this far: apt-get install  [what comes next?]

     

    vlc isn't gpu accelerated, so wouldn't be expected to work.  The only way I know of to get video is with omxplayer or xbmc.

    Can you give more detailed intructions for creating the .login file.  for example: is the file called: ".login.txt" or just ".login".  When I created the file, it did not load the command: "sudo modprobe snd-bcm2835"

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • GreenYamo
    GreenYamo over 13 years ago in reply to wallarug

    Fergus, I don't know if you are aware. but dot files in Linux mean they are hidden. To see if you already have a .local file, enter ls -a (list, show all)

     

    However, try as I might, I could not get the .login file to work, the command from within that file would never load the sound module (lsmod command to check if it has been loaded) for me, hopefully Coder will pop along at some point and let me know what I was doing wrong!

     

    I did however manage to add it to the profile file: sudo nano /etc/profile - copy 'sudo modprobe snd_bcm2835' (note underscore, not dash) and paste it at the end of this file (be careful not to alter anything else) save out this file and then re-boot, everything should be working, or at least it was for me.

     

    Steve

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to GreenYamo

    Steve & Fergus,

      Sorry for the bad advice on .login.  I've used that for a long time

    on other linux systems, but just now learned that it only works for

    certain shells, such as csh.

     

    A better way to do it is to add the line:

     

    snd_bcm2835

     

    to the end of the file: /etc/modules

    (after the line that says:  vchiq)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • GreenYamo
    GreenYamo over 13 years ago in reply to Former Member

    Hey Coder, no problem :-) it helped me learn a bit more about these things and let's face it, it is what they are all about.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • wallarug
    wallarug over 13 years ago in reply to Former Member

    Thanks coder27,

     

    Added the line to /etc/modules and sound now works nicely in GUI.  but the sound does not work on Quake3 (I think I am missing the sound files though - any idea where to get them.)

    .  I followed this guide EXACTLY: http://myraspberrypiexperience.blogspot.com.au/p/quake3.html so that should help you determon whether or not I have the sound files.

     

    Have any of you worked out how to print using Debain Squeeze? I want to print to a (somewhat) shared printer.

     

    http://www.element14.com/community/thread/18502?tstart=0

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 13 years ago in reply to wallarug

    Fergus,

       Apparently, nobody has Quake3 working with sound.

     

    There is a mention on this thread:   

       http://www.raspberrypi.org/archives/1139

    of a workaround for sound on x86 architecture which perhaps

    could be used as a starting point for the RPi.

     

    It is a bit unfortunate that the RPi publicity was not

    clear about the caveats:  Quake3, but not with sound;

    Midori on Debian, but not with youtube, etc.

    They even showed video of a keyboard and mouse

    sharing a USB port (using a PS2 adapter), with a

    USB hard drive on the other USB port, which

    apparently is not as easy to get working as it looked

    without a powered hub.

     

    Sorry I don't know anything helpful regarding printing.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • wallarug
    wallarug over 13 years ago in reply to Former Member

    Thanks for clearing that up, I was very puzzled when sound worked everywhere else but not in Q3. 

     

     

    I will see if anyone else knows how to print.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube