You are not logged in.

#1 2017-03-11 15:16:20

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Audio On Plays Over HDMI When Analog Is Connected

When installing Arch I decided to use the proprietary Nvidia driver with my GTX 1070 and was disappointed to find that while everything sound related was detected, I couldn't hear anything at all. Before I woke up my PC from sleep I connected headphones to see if maybe the analog jacks worked and to my surprise I found that I could hear sound from my HDMI connected monitor, but not from the headphones. Thinking it had fixed itself I removed the headphones, and I no longer heard sound via HDMI.

WTF is going on here?!

[bran@desktop]: ~>$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC1150 Analog [ALC1150 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC1150 Digital [ALC1150 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

[bran@desktop]: ~>$ aplay -D plughw:1,2 /usr/share/sounds/alsa/Front_Center.wav 
aplay: main:788: audio open error: No such file or directory

Last edited by brando56894 (2017-03-11 20:50:45)

Offline

#2 2017-03-15 19:55:32

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Audio On Plays Over HDMI When Analog Is Connected

It seems to act correctly because I have my two monitors unified in KDE's display settings (one is an HDMI cable connected to the DVI port on the video card another one goes directly to an HDMI port) and when I shut off one monitor the sound correctly goes to the other monitor.

So why does it need something plugged into the analogue jack to recognize there's sound coming through the HDMI channels?? In the 12 years of using Linux (8 or so using Arch) I've never seen something like this...

Offline

#3 2017-03-16 09:43:40

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: Audio On Plays Over HDMI When Analog Is Connected

Are you using nvidia driver or nouveau ?

Try the other one, does it have the same behaviour ?

what is the output of pacman -Qs pulse and pacman -Qs alsa .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2017-03-17 11:56:44

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Audio On Plays Over HDMI When Analog Is Connected

I'm using nouveau, I'll switch them shortly.

Here's the output

 [bran@desktop]: ~>$ pacman -Qs pulse
local/lib32-libpulse 10.0-1
    A featureful, general-purpose sound server (32-bit client libraries)
local/libpulse 10.0-2
    A featureful, general-purpose sound server (client library)
local/plasma-pa 5.9.3-1 (plasma)
    Plasma applet for audio volume management using PulseAudio
local/pulseaudio 10.0-2
    A featureful, general-purpose sound server
local/pulseaudio-alsa 2-3
    ALSA Configuration for PulseAudio
local/pulseaudio-bluetooth 10.0-2
    Bluetooth support for PulseAudio
local/pulseaudio-gconf 10.0-2
    GConf support for PulseAudio

 [bran@desktop]: ~>$ pacman -Qs alsa
local/alsa-lib 1.1.3-1
    An alternative implementation of Linux sound support
local/alsa-plugins 1.1.1-1
    Extra alsa plugins
local/alsa-utils 1.1.3-2
    An alternative implementation of Linux sound support
local/lib32-alsa-lib 1.1.3-1
    An alternative implementation of Linux sound support (32 bit)
local/lib32-alsa-plugins 1.1.1-1
    Extra alsa plugins (32-bit)
local/pulseaudio-alsa 2-3
    ALSA Configuration for PulseAudio
local/zita-alsa-pcmi 0.2.0-3
    The successor of clalsadrv, provides easy access to ALSA PCM devices.

Offline

#5 2017-03-20 11:50:38

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: Audio On Plays Over HDMI When Analog Is Connected

That output confirms you are using pulseaudio, not pure alsa.

Check "HDMI output configuration" section of PulseAudio/Examples wiki page


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2017-03-20 14:45:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,729

Re: Audio On Plays Over HDMI When Analog Is Connected

Before you follow that, because it's a bit dated and pulse usually recognizes these things automatically these days, can you post while playing something

pacmd list-cards
pacmd list-sinks
pacmd list-sink-inputs

Offline

#7 2017-03-20 15:01:40

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Audio On Plays Over HDMI When Analog Is Connected

Thanks I figured out that device 1,7 is my monitor but I also need it to switch to my TV when I turn it on which this doesn't support. It also looks like I would have to hack that script to support it as well.

 [bran@desktop]: ~>$ pacmd list-cards
2 card(s) available.
    index: 0
        name: <alsa_card.pci-0000_01_00.1>
        driver: <module-alsa-card.c>
        owner module: 6
        properties:
                alsa.card = "1"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xdf080000 irq 17"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:01:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "10f0"
                device.product.name = "GP104 High Definition Audio Controller"
                device.string = "1"
                device.description = "GP104 High Definition Audio Controller"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: no)
                output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: no)
                output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: no)
                output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: unknown)
                output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: no)
                output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: no)
                output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: no)
                output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5200, available: no)
                output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 100, available: no)
                output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 100, available: no)
                off: Off (priority 0, available: unknown)
        active profile: <output:hdmi-stereo-extra1>
        sinks:
                alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1/#0: GP104 High Definition Audio Controller Digital Stereo (HDMI 2)
        sources:
                alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor/#0: Monitor of GP104 High Definition Audio Controller Digital Stereo (HDMI 2)
        ports:
                hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "ASUS VH242H"
                hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
                hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "video-display"
    index: 1
        name: <alsa_card.pci-0000_00_1f.3>
        driver: <module-alsa-card.c>
        owner module: 7
        properties:
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf420000 irq 137"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "a170"
                device.product.name = "Sunrise Point-H HD Audio"
                device.form_factor = "internal"
                device.string = "0"
                device.description = "Built-in Audio"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                input:analog-stereo: Analog Stereo Input (priority 60, available: no)
                output:analog-stereo: Analog Stereo Output (priority 6000, available: no)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: no)
                output:analog-surround-21: Analog Surround 2.1 Output (priority 800, available: no)
                output:analog-surround-21+input:analog-stereo: Analog Surround 2.1 Output + Analog Stereo Input (priority 860, available: no)
                output:analog-surround-40: Analog Surround 4.0 Output (priority 700, available: no)
                output:analog-surround-40+input:analog-stereo: Analog Surround 4.0 Output + Analog Stereo Input (priority 760, available: no)
                output:analog-surround-41: Analog Surround 4.1 Output (priority 800, available: no)
                output:analog-surround-41+input:analog-stereo: Analog Surround 4.1 Output + Analog Stereo Input (priority 860, available: no)
                output:analog-surround-50: Analog Surround 5.0 Output (priority 700, available: no)
                output:analog-surround-50+input:analog-stereo: Analog Surround 5.0 Output + Analog Stereo Input (priority 760, available: no)
                output:analog-surround-51: Analog Surround 5.1 Output (priority 800, available: no)
                output:analog-surround-51+input:analog-stereo: Analog Surround 5.1 Output + Analog Stereo Input (priority 860, available: no)
                output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500, available: unknown)
                output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5560, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:iec958-stereo+input:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_1f.3.iec958-stereo/#1: Built-in Audio Digital Stereo (IEC958)
        sources:
                alsa_output.pci-0000_00_1f.3.iec958-stereo.monitor/#1: Monitor of Built-in Audio Digital Stereo (IEC958)
                alsa_input.pci-0000_00_1f.3.analog-stereo/#2: Built-in Audio Analog Stereo
        ports:
                analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
                        properties:

                analog-output-lineout: Line Out (priority 9900, latency offset 0 usec, available: no)
                        properties:

                analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-headphones"
                iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                        properties:


 [bran@desktop]: ~>$ pacmd list-sinks
2 sink(s) available.
    index: 0
        name: <alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1>
        driver: <module-alsa-card.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE 
        priority: 9050
        volume: front-left: 36043 /  55% / -15.58 dB,   front-right: 36043 /  55% / -15.58 dB
                balance 0.00
        base volume: 65536 / 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 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 1999.82 ms
        card: 0 <alsa_card.pci-0000_01_00.1>
        module: 6
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "HDMI 1"
                alsa.id = "HDMI 1"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "7"
                alsa.card = "1"
                alsa.card_name = "HDA NVidia"
                alsa.long_card_name = "HDA NVidia at 0xdf080000 irq 17"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:01:00.1"
                sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1"
                device.bus = "pci"
                device.vendor.id = "10de"
                device.vendor.name = "NVIDIA Corporation"
                device.product.id = "10f0"
                device.product.name = "GP104 High Definition Audio Controller"
                device.string = "hdmi:1,1"
                device.buffering.buffer_size = "352768"
                device.buffering.fragment_size = "176384"
                device.access_mode = "mmap+timer"
                device.profile.name = "hdmi-stereo-extra1"
                device.profile.description = "Digital Stereo (HDMI 2)"
                device.description = "GP104 High Definition Audio Controller Digital Stereo (HDMI 2)"
                alsa.mixer_name = "Nvidia GPU 83 HDMI/DP"
                alsa.components = "HDA:10de0083,38426178,00100100"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "video-display"
                                device.product.name = "ASUS VH242H"
        active port: <hdmi-output-1>
  * index: 1
        name: <alsa_output.pci-0000_00_1f.3.iec958-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE 
        priority: 9958
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max request: 0 KiB
        max rewind: 0 KiB
        monitor source: 1
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
        card: 1 <alsa_card.pci-0000_00_1f.3>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC1150 Digital"
                alsa.id = "ALC1150 Digital"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "1"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf420000 irq 137"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "a170"
                device.product.name = "Sunrise Point-H HD Audio"
                device.form_factor = "internal"
                device.string = "iec958:0"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                device.access_mode = "mmap+timer"
                device.profile.name = "iec958-stereo"
                device.profile.description = "Digital Stereo (IEC958)"
                device.description = "Built-in Audio Digital Stereo (IEC958)"
                alsa.mixer_name = "Realtek ALC1150"
                alsa.components = "HDA:10ec0900,1458a0b2,00100001"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
                        properties:

        active port: <iec958-stereo-output>

 [bran@desktop]: ~>$ pacmd list-sink-inputs
0 sink input(s) available.

Offline

#8 2017-03-23 11:36:41

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,729

Re: Audio On Plays Over HDMI When Analog Is Connected

Few things here, your default sink is set to your internal card, you might want to change that to the HDMI sink in e.g. pavucontrol so that new applications get routed to HDMI. You aren't playing anything in that output, but when you start something that produces sound, verify in pavucontrol that it plays to HDMI and not to your internal card. You will only have to do these things once per application, they will remember  whatever setting they were last on.

Offline

Board footer

Powered by FluxBB