LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Cannot Switch Audio to HDMI (https://www.linuxquestions.org/questions/linux-hardware-18/cannot-switch-audio-to-hdmi-4175498672/)

binarybob0001 03-18-2014 10:30 PM

Cannot Switch Audio to HDMI
 
Hello everyone and thank you for taking the time to read this thread. I installed Debian Wheezy on my computer about a month ago, and I must say, I am impressed with how well it set up my hardware. I have one annoying problem though. I cannot get any sound to play through HDMI. I can get sound through the audio jack on the front of the computer, but not through the HDMI cable that extends from my NVIDIA GeForce GTX 560 Ti to my monitor for both video and audio. Pulse Audio appears to recognize my HDMI cable as audio capable. Here's the output from PACMD list-sinks
Code:

Welcome to PulseAudio! Use "help" for usage information.
>>> 2 sink(s) available.
  * index: 0
        name: <alsa_output.pci-0000_03_00.1.hdmi-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9050
        volume: 0: 100% 1: 100%
                0: 0.00 dB 1: 0.00 dB
                balance 0.00
        base volume: 100%
                    0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 0
        sample spec: s16le 2ch 48000Hz
        channel map: front-left,front-right
                    Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 341.33 ms
        card: 0 <alsa_card.pci-0000_03_00.1>
        module: 4
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "HDMI 0"
                alsa.id = "HDMI 0"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "3"
                alsa.card = "1"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xf9ffc000 irq 17"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:03:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.0/0000:02:00.0/0000:03:00.1/sound/card1"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.name = "GF114 HDMI Audio Controller"
                device.string = "hdmi:1"
                device.buffering.buffer_size = "65536"
                device.buffering.fragment_size = "32768"
                device.access_mode = "mmap+timer"
                device.profile.name = "hdmi-stereo"
                device.profile.description = "Digital Stereo (HDMI)"
                device.description = "GF114 HDMI Audio Controller Digital Stereo (HDMI)"
                alsa.mixer_name = "Nvidia GPU 16 HDMI/DP"
                alsa.components = "HDA:10de0016,10de0101,00100100"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                hdmi-output-0: HDMI / DisplayPort (priority 5900, available: unknown)
                        properties:
                               
        active port: <hdmi-output-0>
    index: 1
        name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE
        priority: 9959
        volume: 0:  93% 1:  93%
                0: -2.00 dB 1: -2.00 dB
                balance 0.00
        base volume:  93%
                    -2.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 2
        sample spec: s16le 2ch 48000Hz
        channel map: front-left,front-right
                    Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 341.33 ms
        card: 2 <alsa_card.pci-0000_00_1b.0>
        module: 6
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC889 Analog"
                alsa.id = "ALC889 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xfbff4000 irq 62"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1b.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "65536"
                device.buffering.fragment_size = "32768"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                alsa.mixer_name = "Realtek ALC889"
                alsa.components = "HDA:10ec0889,1458a022,00100004"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-output: Analog Output (priority 9900, available: unknown)
                        properties:
                               
                analog-output-headphones: Headphones (priority 9000, available: unknown)
                        properties:
                               
        active port: <analog-output-headphones>
>>>

If I load alsa-mixer and select HDA video, I get options to either mute or unmute S/PDIF, S/PDIF1, S/PDIF2, and S/PDIF3, but no volume bar. Anyone have any suggestions?

wchouser3 03-19-2014 12:37 AM

I'm not sure if this will be helpful but I have an AMD video card and the HDMI audio is disabled by default. To get it to work, I had to append "radeon.audo=1" to the kernel line of my mkinitcpio.conf file (this starts the service at boot up)

evo2 03-19-2014 12:43 AM

Hi,

I had problem that presented itself exactly as you describe. I found that I could only get pulse audio to send the output to hdmi sink if process producing the audio was started after the hdmi cable is connected. Eg make sure you the process is not visible in the "Playback" tab of pavucontrol when you connect the hdmi cable.

HTH,

Evo2.

binarybob0001 06-19-2014 02:09 PM

Thank you for your confirmation evo2. I have done some more research, and I have been able to get my audio working using speaker-test -c 2 -r 48000 -t sine -D hw:1,7. ALSA has (or had?) an "Under-Enumeration of Logical Devices" problem where it only detects the first audio device. To fix this, I added a line to my /etc/pulse/default.pa as follows: load-module module-alsa-sink device=hw:1,7. Now, I can hear audio in KMix when I go into settings->audio setup, and select the appropriate audio device. Wooo hoooo, progress! However, I cannot hear audio anywhere else on my system. I cannot hear audio on KDE boot or playing a movie or at any other time. When KDE starts it gives me a message saying that my headphone jack (Built-in Audio Analog Sterio) has a higher priority, and that it switched to that device. I have set the priority of my new device to highest in the sound configuration menus. Does anyone know what this new problem could be?

binarybob0001 06-20-2014 10:50 AM

Okay, so I finally got KDE to use HDMI. Apparently, pulse restores the default audio devices everytime the computer is rebooted. Also, KDE seems incapable of switch audio devices after it's started. As a result, everytime I rebooted the computer my audio devices were changed back to the incorrect settings. To fix this, all one needs to do is delete the *stream-volumes.db file under ~/.pulse. This will cause KDE to actually use your preferences.


All times are GMT -5. The time now is 04:12 PM.