The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Ubuntu 9.10--HDMI audio out?

    Discussion in 'Linux Compatibility and Software' started by v1k1ng1001, Dec 10, 2009.

  1. v1k1ng1001

    v1k1ng1001 Notebook Deity

    Reputations:
    239
    Messages:
    738
    Likes Received:
    0
    Trophy Points:
    30
    Ok, so here's the question: does anyone know a good tutorial on how to get hdmi audio out working in Ubuntu 9.10? :confused:

    I'm setting up an htpc. I've figured out how to install flash 10.1 and the nvidia 190.xx drivers but I can't for the life of me figure out how to run the sound through the hdmi cable. :(

    Do I need to swap out alsa for pulseaudio or what?

    Any help is appreciated. Thanks. ;)
     
  2. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Short version: gksudo nvidia-settings, detect displays, set to twinview, apply. Make sure IEC958 is checked in your mixer. Then:

    Code:
    aplay - l
    Should show you which device is your hdmi out. Then you can make an .asoundrc which forces it to that output. There are instructions here, just scroll past the build instructions:
    http://n10.wikia.com/wiki/Linux_HOWTO#HDMI_Audio_.5BNVIDIA.5D
     
  3. DEagleson

    DEagleson Gamer extraordinaire

    Reputations:
    2,529
    Messages:
    3,107
    Likes Received:
    30
    Trophy Points:
    116
    Easier steps:

    1. Install the Nvidia ppa:

    Link: https://launchpad.net/~nvidia-vdpau/+archive/ppa

    Then open the console and input
    Code:
    sudo apt-get update
    sudo apt-get install linux-headers-generic nvidia-glx-190
    Finish with:
    Code:
    sudo nvidia-xconfig -s --no-logo --force-generate
    2. Configure ALSA to unmute HDMI audio out:
    Code:
    sudo alsamixer
    Unmute and set volume (MM means muted and OO On)
    Hit "m" to toggle mute on/off.
    Hit escape to close and input command to save settings.
    Code:
    sudo alsactl store 0
    3. (Optional) Force audio over HDMI:

    Create a file named .asoundrc in your home folder.
    Copy / paste this info it in and save.
    Code:
    pcm.!default {
    type plug
    slave {
    pcm "hdmi"
    }
    }
    I did step 1 & 2 and now got audio over hdmi in XBMC 9.11b2. :)
    May be a bit different for you as you try getting flash 10.1b to work.
     
  4. EOAG

    EOAG Newbie

    Reputations:
    0
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    5
  5. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    What graphics card do you have?
     
  6. EOAG

    EOAG Newbie

    Reputations:
    0
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    5
    Nvidia 9700M GTS
     
  7. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Hm, if it doesn't show up with aplay -l that's definitely not going to work.

    Have you compiled a recent ALSA driver build?

    http://www.alsa-project.org/main/index.php/Download

    It might be worth a try to compile without the patch from my N10 guide. I left it in the guide since it works for most people, but it depends on your distro and kernel / ALSA versions.

    You can do a sudo lspci -vvnn | grep 10de, and then take the ID from that (the part that follows 10de) and grep that against alsa-driver-1.0.22/alsa-kernel/pci/hda/patch_nvhdmi.c

    Or you can just see all the supported IDs by:
    Code:
    grep 10de alsa-driver-1.0.22/alsa-kernel/pci/hda/patch_nvhdmi.c
    If it shows up, it means your card is supported, if not it needs a patch for it to recognize it. That card should definitely be supported, I had one previously and used it with HDMI audio.
     
  8. EOAG

    EOAG Newbie

    Reputations:
    0
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    5
    After grep 10de alsa-driver-1.0.22/alsa-kernel/pci/hda/patch_nvhdmi.c it does show up but your n10 guide mentions "make sure IEC958 is switched on" but on my machine, IEC958 is the spdif. Could that conflict be causing the problem?
     
  9. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    That shouldn't cause it to not show up with aplay -l... are you using a recent nvidia driver? Try installing it from the 'latest nvidia' link at the top of the N10 guide. You need the proprietary driver installed for HDMI to work.

    It should show up in /proc/asound/card0/codec#3
     
  10. EOAG

    EOAG Newbie

    Reputations:
    0
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    5
    I'm using 190.53. After compiling 1.0.22 aplay show no soundcards found and alsamixer won't open "no such file or directory"
     
  11. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Did alsa force-reload throw errors like unknown symbol or something (check dmesg or syslog). If it did manually unload and reload the modules (or try rebooting).
     
  12. EOAG

    EOAG Newbie

    Reputations:
    0
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    5
    Actually after 1.0.22 hdmi now works after forcing it with .asoundrc but aplay now only shows the hdmi and alsamixer only shows spdif. No sound comes out of the computer speakers even if hdmi isn't forced with .asoundrc. How would I go about in switching it back?

    But I guess that some progress right?
     
  13. ALLurGroceries

    ALLurGroceries  Vegan Vermin Super Moderator

    Reputations:
    15,730
    Messages:
    7,146
    Likes Received:
    2,343
    Trophy Points:
    331
    Maybe you need to compile and install alsa-lib and alsa-utils to match the new driver version?

    Edit: or maybe the modules arent loaded..?

    Edit #2: If all else fails you can aptitude reinstall alsa-base to start fresh...