HDMI/DP Audio support Under Linux

http://ubuntuforums.org/showthread.php?t=1668737

  1. HOWTO: Ubuntu 10.10 Nvidia hdmi audio
  2. Although this information is present in this forum in bits and pieces a new nvidia hdmi audio thread pops up every couple days.

    So for simplicity sake here's my attempt and a very simple howto instead of editing re-editing and reposting old information.

    First make sure you have nvidia proprietary drivers installed. hdmi audio does not work with nouveau/opensource. Open a terminal. Applications -> Accessories ->Terminal.

    Now type:

    Code:
    cat /proc/driver/nvidia/version
    You should see something like this.
    Code:
    NVRM version: NVIDIA UNIX x86 Kernel Module  260.19.06  Mon Sep 13 06:35:06 PDT 2010
    GCC version:  gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
    If not go install the nvidia proprietary driver via System -> Administration -> Additional Drivers.




    NVIDIA HDMI AUDIO Ubuntu 10.10

    Begin by reading this (it's ok if you don't understand it but you should be aware of this post): http://www.nvnews.net/vbulletin/show...20&postcount=7

    Step 1) To start confirm that your system can see your nvidia hdmi audio card. Type aplay -l in a terminal. You should see something like this.

    Code:
    aplay -l
    **** List of PLAYBACK Hardware Devices ****
    card 0: Intel [HDA Intel], device 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: Intel [HDA Intel], device 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 7: NVIDIA HDMI [NVIDIA HDMI]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 8: NVIDIA HDMI [NVIDIA HDMI]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 1: NVidia [HDA NVidia], device 9: NVIDIA HDMI [NVIDIA HDMI]
      Subdevices: 0/1
      Subdevice #0: subdevice #0
    If you do not see a nvidia sound device you need to upgrade to a properly patched alsa 1.0.23 or 2.6.35+ kernel. For the fact that it is often not required nowdays I'll leave that out of this howto. Follow this link to upgrade alsa https://wiki.ubuntu.com/Audio/Instal...aDriverModules


    Step 2) Confirm which device is responsible for hdmi audio.

    Open a terminal and type:

    Code:
    grep eld_valid /proc/asound/NVidia/eld*
    You'll see an output like this:

    Code:
    /proc/asound/NVidia/eld#0.0:eld_valid        0
    /proc/asound/NVidia/eld#1.0:eld_valid        0
    /proc/asound/NVidia/eld#2.0:eld_valid        0
    /proc/asound/NVidia/eld#3.0:eld_valid        1
    The line that returns eld_valid 1 is the device responsible for hdmi audio on your nvidia card and has recognized that there is a connection.

    If you don't receive a 1 for one of the devices you need to return to Step 1) and ensure you have a properly patched alsa 1.0.23 or 2.6.35+ kernel. This may also be the fault of the system not acquiring EDID data from your hdmi connection. Inability to acquire an EDID will also result in resolution issues so you should move onto resolving this issue before setting up hdmi audio. You can confirm your system has acquired an EDID from the connection by checking your /var/log/Xorg.0.log file.

    UPDATE: http://http.download.nvidia.com/XFre...dmi-audio.html
    According to the above:

    13.5. Verify Your ELD Is Valid
    To validate that the ALSA driver is aware of your monitor, check the eld files. Recall that older chipsets (ION and earlier) don’t support ELD reporting, and hence the ELD files will not exist. In this case, ALSA always assumes that all audio features are available
    Therefore if you don't receive any eld information you may just have an older card that doesn't support reporting. You will then have to manually test each device with aplay to determine which device is responsible for audio.

    eg.
    Code:
    aplay -D plughw:NVidia,3 /usr/share/sounds/alsa/Front_Center.wav
    aplay -D plughw:NVidia,7 /usr/share/sounds/alsa/Front_Center.wav
    aplay -D plughw:NVidia,8 /usr/share/sounds/alsa/Front_Center.wav
    aplay -D plughw:NVidia,9 /usr/share/sounds/alsa/Front_Center.wav
    Step 3) Use a probemask to enable the proper codec for hdmi:NVidia.

    eld#0.0=device 3 probe_mask=0x101
    eld#1.0=device 7 probe_mask=0x102
    eld#2.0=device 8 probe_mask=0x104
    eld#3.0=device 9 probe_mask=0x108

    Edit or create a /etc/modprobe.d/sound.conf file. Type the following in a terminal:

    Code:
    gksudo gedit /etc/modprobe.d/sound.conf
    add the proper options snd-hda-intel probe_mask line to this file (this example uses device 9)

    Code:
    options snd-hda-intel probe_mask=0x108
    Save the file and update the initramfs to make sure this change will be used upon reboot.

    Code:
    sudo update-initramfs -u


    UPDATE: see this post for more information on probe_masks.
    http://ubuntuforums.org/showpost.php...8&postcount=21


    Step 4)
    Edit your pulseaudio default.pa file. **Note if you do not have pulseaudio installed just add pcm.!default hdmi:NVidia to your /etc/asound.conf file remove any .asoundrc file and reboot as in this post http://ubuntuforums.org/showpost.php...2&postcount=11

    If you have pulseaudio installed continue with the following edit.

    Code:
    gksudo gedit /etc/pulse/default.pa
    Find the static alsa sink line:

    Code:
    ### Load audio drivers statically (it's probably better to not load
    ### these drivers manually, but instead use module-hal-detect --
    ### see below -- for doing this automatically)
    #load-module module-alsa-sink
    #load-module module-alsa-source device=hw:1,0
    #load-module module-oss device="/dev/dsp" sink_name=output source_name=input
    #load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
    #load-module module-null-sink
    #load-module module-pipe-sink
    Add load-module module-alsa-sink device=hdmi:NVidia to the end of the section:

    Code:
    ### Load audio drivers statically (it's probably better to not load
    ### these drivers manually, but instead use module-hal-detect --
    ### see below -- for doing this automatically)
    #load-module module-alsa-sink
    #load-module module-alsa-source device=hw:1,0
    #load-module module-oss device="/dev/dsp" sink_name=output source_name=input
    #load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
    #load-module module-null-sink
    #load-module module-pipe-sink
    load-module module-alsa-sink device=hdmi:NVidia
    Remove any local pulseaudio/alsa settings to ensure this new default.pa systemwide setting will be used. Type the following in a terminal.

    Code:
    rm -r ~/.pulse ~/.asound* ~/.pulse-cookie


    Step 5)
    Reboot the computer and you should now be able to use the standard hdmi audio connection or the hdmi device via hdmi:NVidia.

    If not try unmuting the device in alsamixer then test it again.

    Code:
    alsamixer
    MM denotes muted 00 is unmuted, m is the toggle, f6 to switch cards.

    To test the probemask after the reboot do the following:

    Code:
    aplay -Dhdmi:NVidia /usr/share/sounds/alsa/Front_Center.wav
    If you receive audio with the aplay command but not at your desktop your pulseaudio or local settings are probably incorrect.



    If you have problems with this probemask method you will have to resort to editing default.pa and possibly asound.conf listing the explicit card# and device # for your hdmi audio eg. hw:1,9 or hw:NVidia,9

    If anybody sees something wrong with this process let me know and I'll correct it asap.
    1. Last edited by tjones00; February 17th, 2011 at 09:45 AM.Reason: added alsa upgrade link, foolproof default.pa mod. eld failure information                                         

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值