You are not logged in.

#1 2016-03-29 00:43:33

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

[SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

Hi everyone - I just bought a new monitor (asus pb287Q) and I have this plugged into my GTX 950 with a display port cable. In Windows I can get audio playing on the monitor speakers, but not in arch? My GTX 950 is using the NVidia binary drivers. Does alsa work with display port? Is there anything I can try? When I run 'aplay -L', I get:

null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default
    Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=PCH
    HDA Intel PCH, ALC887-VD Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output

If I try to play anything back with aplay or speaker-test, it plays over my headphone jack on the front of my computer. When I try something like

aplay -D hdmi:CARD=NVidia,DEV=0 /usr/share/sounds/alsa/Front_Center.wav

I get:

Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono                                                                                             
aplay: set_params:1239: Channels count non available                                                                                                                                                  

When I run alsamixer, I get to choose between the "HDA Intel PCH" and "HDA NVidia". Choosing "HDA NVidia" shows me 4 spdif volume adustments, all fixed at 0.

I have the default /etc/asound.conf from the pulseaudio-alsa package.

Is there anything I should try?

Last edited by tmiddleton (2016-04-02 17:16:25)

Offline

#2 2016-03-29 00:54:01

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

Please use code tags when pasting to the boards:
https://wiki.archlinux.org/index.php/Fo … s_and_code


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-03-29 01:06:54

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

jasonwryan wrote:

Please use code tags when pasting to the boards:
https://wiki.archlinux.org/index.php/Fo … s_and_code

Ack - sorry. Couldn't find the BBCode legend. Added code tags.

Last edited by tmiddleton (2016-03-29 06:35:05)

Offline

#4 2016-03-29 06:43:49

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

Another datapoint - when I do lspci -v, I get:

...

01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 950] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: eVga.com. Corp. Device 1950
        Flags: bus master, fast devsel, latency 0, IRQ 30
        Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
        Memory at e0000000 (64-bit, prefetchable) [size=256M]
        Memory at f0000000 (64-bit, prefetchable) [size=32M]
        I/O ports at e000 [size=128]
        [virtual] Expansion ROM at f7000000 [disabled] [size=512K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
        Capabilities: [258] L1 PM Substates
        Capabilities: [128] Power Budgeting <?>
        Capabilities: [420] Advanced Error Reporting
        Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Capabilities: [900] #19
        Kernel driver in use: nvidia
        Kernel modules: nouveau, nvidia

01:00.1 Audio device: NVIDIA Corporation Device 0fba (rev a1)
        Subsystem: eVga.com. Corp. Device 1950
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at f7080000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [60] Power Management version 3
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
        Capabilities: [78] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

...

I'm kind of surprised by the 'snd_hda_intel' module that has attached itself to my NVidia GPU - but apparently according to this this is expected because the GPU HDMI audio implements an Intel-defined interface.

Does this apply to Display Port?

Hmm...

Offline

#5 2016-03-29 06:46:15

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

Ah - from the same link,

For brevity, this document discusses HDMI audio. However, everything herein applies equally to Display Port, and in many cases also DVI ports when connected to an HDMI port on the display device.

So it isn't unreasonable to expect that I should be getting audio out of my monitor, especially given that I'm seeing that Azalia-interface HD Audio PCI device.

Still isn't working, though.

Offline

#6 2016-03-29 08:41:35

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

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

You have 4 possible HDMI devices, what happens if you cycle through them? i.e. run the aplay commands against all 4 of them? It isn't always trivial to determine which is the actually used channel, apart from trial and error. Can you post

pacmd list-cards
pacmd list-sinks

as well, so we can see how pulse maps your card?

Last edited by V1del (2016-03-29 08:42:07)

Online

#7 2016-03-29 15:34:20

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

V1del wrote:

You have 4 possible HDMI devices, what happens if you cycle through them? i.e. run the aplay commands against all 4 of them? It isn't always trivial to determine which is the actually used channel, apart from trial and error.

[ted@tedspc ~]{0}$ aplay -D hdmi:CARD=NVidia,DEV=0 /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1239: Channels count non available
[ted@tedspc ~]{1}$ aplay -D hdmi:CARD=NVidia,DEV=1 /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1239: Channels count non available
[ted@tedspc ~]{1}$ aplay -D hdmi:CARD=NVidia,DEV=2 /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1239: Channels count non available
[ted@tedspc ~]{1}$ aplay -D hdmi:CARD=NVidia,DEV=3 /usr/share/sounds/alsa/Front_Center.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1239: Channels count non available
[ted@tedspc ~]{1}$ 

Can you post

pacmd list-cards
pacmd list-sinks

as well, so we can see how pulse maps your card?

I didn't think pulse would be relevant because I thought the fact that the alsa tools can't make anything play meant that it was a lower-level problem. But, here it is:

list-cards:

[ted@tedspc ~]{1}$ 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 0xf7080000 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 = "0fba"
                device.string = "1"
                device.description = "HDA NVidia"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        profiles:
                output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
                output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
                output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown)
                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: unknown)
                output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: unknown)
                output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: unknown)
                output:hdmi-stereo-extra3: Digital Stereo (HDMI 4) Output (priority 5200, available: unknown)
                output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4) Output (priority 100, available: unknown)
                output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4) Output (priority 100, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:hdmi-stereo-extra1>
        sinks:
                alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1/#2: HDA NVidia Digital Stereo (HDMI 2)
        sources:
                alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1.monitor/#3: Monitor of HDA NVidia 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 PB287Q
 "
                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_1b.0>
        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 0xf7110000 irq 29"
                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.id = "8c20"
                device.product.name = "8 Series/C220 Series Chipset High Definition Audio Controller"
                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: unknown)
                output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
                output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
                off: Off (priority 0, available: unknown)
        active profile: <output:analog-stereo+input:analog-stereo>
        sinks:
                alsa_output.pci-0000_00_1b.0.analog-stereo/#1: Built-in Audio Analog Stereo
        sources:
                alsa_output.pci-0000_00_1b.0.analog-stereo.monitor/#1: Monitor of Built-in Audio Analog Stereo
                alsa_input.pci-0000_00_1b.0.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: yes)
                        properties:
                                device.icon_name = "audio-headphones"

list-sinks:

[ted@tedspc ~]{0}$ pacmd list-sinks
2 sink(s) available.
  * 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 DYNAMIC_LATENCY
        state: SUSPENDED
        suspend cause: IDLE 
        priority: 9959
        volume: front-left: 50463 /  77% / -6.81 dB,   front-right: 50463 /  77% / -6.81 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 48000Hz
        channel map: front-left,front-right
                     Stereo
        used by: 0
        linked by: 0
        configured latency: 0.00 ms; range is 0.50 .. 1837.50 ms
        card: 1 <alsa_card.pci-0000_00_1b.0>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC887-VD Analog"
                alsa.id = "ALC887-VD 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 0xf7110000 irq 29"
                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.id = "8c20"
                device.product.name = "8 Series/C220 Series Chipset High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                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 ALC887-VD"
                alsa.components = "HDA:10ec0887,10438576,00100302"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                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: yes)
                        properties:
                                device.icon_name = "audio-headphones"
        active port: <analog-output-headphones>
    index: 2
        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: 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: 3
        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 0xf7080000 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 = "0fba"
                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 = "HDA NVidia Digital Stereo (HDMI 2)"
                alsa.mixer_name = "Nvidia GPU 72 HDMI/DP"
                alsa.components = "HDA:10de0072,38421950,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 PB287Q
 "
        active port: <hdmi-output-1>

Offline

#8 2016-03-29 16:15:45

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

Here's another data point: when I run speaker-test with

speaker-test -c 2 -r 48000 -D hw:0,0

I hear pink noise in my headphones plugged into the front of my computer. When I run it with

speaker-test -c 2 -r 48000 -D hw:1,0

.. or hw:1,1, hw:1,2, hw:1,4, hw:1,5, hw:1,6 I get

Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -2,No such file or directory

But when I use hw:1,3,

 
speaker-test -c 2 -r 48000 -D hw:1,3

I get

 
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
Time per period = 11.116589
 0 - Front Left
^C 1 - Front Right

...as if alsa has a device there, but... I don't hear anything. I have the volume on the monitor's OSD cranked to the maximum and as I said when I reboot into Windows on a separate drive it plays audio well enough.

Offline

#9 2016-03-30 04:23:13

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

So I'm reading more about how alsa works in that NVidia document, but I'm having a hard time figuring out what a working alsa configuration *should* look like. When I look at my AC97 HDA device on my motherboard (alsa device 0 on my machine) in /proc/asound/card0, I see

dr-xr-xr-x 5 root root 0 Mar 29 21:02 .
dr-xr-xr-x 6 root root 0 Mar 29 21:02 ..
-r--r--r-- 1 root root 0 Mar 29 21:02 codec#0
-r--r--r-- 1 root root 0 Mar 29 21:02 id
dr-xr-xr-x 3 root root 0 Mar 29 21:02 pcm0c
dr-xr-xr-x 3 root root 0 Mar 29 21:02 pcm0p
dr-xr-xr-x 3 root root 0 Mar 29 21:02 pcm2c

When I look at the /proc/asound/card0/codec#0 file, it's quite large but I noticed at the top of it...

[ted@tedspc ~]{0}$ cat /proc/asound/card0/codec#0    
Codec: Realtek ALC887-VD
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0887
Subsystem Id: 0x10438576
Revision Id: 0x100302
No Modem Function Group found
Default PCM:
    rates [0x5f0]: 32000 44100 48000 88200 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D1 D2 D3 CLKSTOP EPSS
  Power: setting=D0, actual=D0
GPIO: io=2, o=0, i=0, unsolicited=1, wake=0
  IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
  IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
...

When I look at my GPU's HDA device in /proc/asound/card1, I see

[ted@tedspc ~]{0}$ la /proc/asound/card1/
total 0                                                                                                                      
dr-xr-xr-x 6 root root 0 Mar 29 21:05 .                                                                                      
dr-xr-xr-x 6 root root 0 Mar 29 21:05 ..                                                                                     
-r--r--r-- 1 root root 0 Mar 29 21:05 codec#0                                                                                
-rw-r--r-- 1 root root 0 Mar 29 21:05 eld#0.0
-rw-r--r-- 1 root root 0 Mar 29 21:05 eld#0.1
-rw-r--r-- 1 root root 0 Mar 29 21:05 eld#0.2
-rw-r--r-- 1 root root 0 Mar 29 21:05 eld#0.3
-r--r--r-- 1 root root 0 Mar 29 21:05 id
dr-xr-xr-x 3 root root 0 Mar 29 21:05 pcm3p
dr-xr-xr-x 3 root root 0 Mar 29 21:05 pcm7p
dr-xr-xr-x 3 root root 0 Mar 29 21:05 pcm8p
dr-xr-xr-x 3 root root 0 Mar 29 21:05 pcm9p

A lot more complexity, but my understanding of this is that those eld#x,y files are for the EDID information that comes back from the monitor (which my motherboard audio wouldn't have). If I cat /proc/asound/card1/codec#0, at the start I see

Codec: Nvidia GPU 72 HDMI/DP
Address: 0
AFG Function Id: 0x1 (unsol 0)
Vendor Id: 0x10de0072
Subsystem Id: 0x38421950
Revision Id: 0x100100
No Modem Function Group found
Default PCM:
    rates [0x0]:
    bits [0x0]:
    formats [0x0]:
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
State of AFG node 0x01:
  Power states:  D0 D1 D2 D3 CLKSTOP EPSS
  Power: setting=D0, actual=D0
GPIO: io=0, o=0, i=0, unsolicited=0, wake=0

I'm noticing that the rates:/bits:/formats: section in my HDMI audio codec is empty. Given that when I run aplay and speaker-test they both complain about missing channel information, could that be the cause?

Offline

#10 2016-03-30 04:32:43

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

Going right to the source, I'm looking in dmesg for driver errors. On boot, I see this in the kernel log:

[    1.768903] snd_hda_intel 0000:00:1b.0: enabling device (0000 -> 0002)
[    1.769201] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[    1.769205] snd_hda_intel 0000:01:00.1: Disabling MSI
[    1.769208] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client

00:1b:0 I assume to mean bus:device:function in PCI-lingo, meaning 00:1b:0 would be my mobo audio, and 01:00.1 would be the HDMI sound 'card' on my GPU that I so desperately want to get working. Not sure what MSI is or whether or not I need it, but anyhoo, continuing I see:

[    1.775276] Adding 4194300k swap on /dev/sdb3.  Priority:-1 extents:1 across:4194300k SSFS
[    1.781103] BTRFS info (device sdb4): disk space caching is enabled
[    1.781107] BTRFS: has skinny extents
[    1.782714] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC887-VD: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:line
[    1.782717] snd_hda_codec_realtek hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    1.782719] snd_hda_codec_realtek hdaudioC0D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
[    1.782720] snd_hda_codec_realtek hdaudioC0D0:    mono: mono_out=0x0
[    1.782721] snd_hda_codec_realtek hdaudioC0D0:    inputs:
[    1.782723] snd_hda_codec_realtek hdaudioC0D0:      Front Mic=0x19
[    1.782725] snd_hda_codec_realtek hdaudioC0D0:      Rear Mic=0x18
[    1.782727] snd_hda_codec_realtek hdaudioC0D0:      Line=0x1a
[    1.788987] ppdev: user-space parallel port driver
[    1.790871] nvidia: module license 'NVIDIA' taints kernel.
[    1.790871] Disabling lock debugging due to kernel taint
[    1.791600] iTCO_vendor_support: vendor-support=0
[    1.792554] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
[    1.792600] iTCO_wdt: Found a Lynx Point TCO device (Version=2, TCOBASE=0x1860)
[    1.792939] iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
[    1.793025] r8169 0000:03:00.0 enp3s0: renamed from eth0
[    1.793426] asus_wmi: ASUS WMI generic driver loaded
[    1.794476] asus_wmi: Initialization: 0x0
[    1.794498] asus_wmi: BIOS WMI version: 0.9
[    1.794526] asus_wmi: SFUN value: 0x0
[    1.794780] input: Eee PC WMI hotkeys as /devices/platform/eeepc-wmi/input/input14
[    1.795009] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input9
[    1.795019] asus_wmi: Number of fans: 1
[    1.795064] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input10
[    1.795133] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1b.0/sound/card0/input11
[    1.795218] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1b.0/sound/card0/input12
[    1.795279] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card0/input13
[    1.797962] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=io+mem
[    1.798102] nvidia-nvlink: Nvlink Core is being initialized, major device number 246
[    1.798183] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:01:00.0 on minor 0
[    1.798188] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  361.28  Wed Feb  3 15:48:04 PST 2016
[    1.807892] BTRFS: detected SSD devices, enabling SSD mode
[    1.852818] intel_rapl: Found RAPL domain package
[    1.852823] intel_rapl: Found RAPL domain core
[    1.852829] intel_rapl: Found RAPL domain dram
[    1.883597] BTRFS error (device sdb4): could not find root 8
[    2.131730] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
[    2.211135] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input15
[    2.211507] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input16
[    2.211621] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input17
[    2.211994] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card1/input18
[    2.241398] r8169 0000:03:00.0 enp3s0: link down
[    2.241398] r8169 0000:03:00.0 enp3s0: link down
[    2.241451] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
[    2.311928] clocksource: Switched to clocksource tsc
[    2.901779] nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  361.28  Wed Feb  3 15:15:17 PST 2016
[    2.902058] nvidia-modeset: Allocated GPU:0 (GPU-1b83a3d6-74a2-dc9f-fa4a-b973bd7c78af) @ PCI:0000:01:00.0
[    2.975062] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 2

I see

[    2.975062] snd_hda_codec_hdmi hdaudioC1D0: HDMI: invalid ELD data byte 2

Could that be the cause of my problems? Is alsa abandoning my hdmi audio because of a bad EDID?

Last edited by tmiddleton (2016-03-30 04:33:27)

Offline

#11 2016-03-30 05:30:19

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

Doing a search through the kernel source, I found this code in hda_eld.c:

	/* set ELD buffer */
	for (i = 0; i < size; i++) {
		unsigned int val = hdmi_get_eld_data(codec, nid, i);
		/*
		 * Graphics driver might be writing to ELD buffer right now.
		 * Just abort. The caller will repoll after a while.
		 */
		if (!(val & AC_ELDD_ELD_VALID)) {
			codec_info(codec, "HDMI: invalid ELD data byte %d\n", i);
			ret = -EINVAL;
			goto error;
		}
		val &= AC_ELDD_ELD_DATA;
		/*
		 * The first byte cannot be zero. This can happen on some DVI
		 * connections. Some Intel chips may also need some 250ms delay
		 * to return non-zero ELD data, even when the graphics driver
		 * correctly writes ELD content before setting ELD_valid bit.
		 */
		if (!val && !i) {
			codec_dbg(codec, "HDMI: 0 ELD data\n");
			ret = -EINVAL;
			goto error;
		}
		buf[i] = val;
	}

So perhaps hda_eld.c couldn't read the ELD data from my monitor, but the code suggests that there might be another try at some point and that it might have subsequently succeeded?

I'm wondering if I could boot my kernel with that codec_dbg() function printing out the ELD data...?

Offline

#12 2016-04-01 07:37:36

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

Ok - I seem to be able to make audio play on my monitor. As long as I specify plughw:1,7 or plughw:CARD=NVidia,DEV=7 and 2 channels, both aplay and speaker-test manage to output audio on my monitor.

[ted@tedspc ~]{1}$ aplay -c 2 -D plughw:1,7  /usr/share/sounds/alsa/Front_Left.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
[ted@tedspc ~]{1}$ aplay -c 2 -D plughw:CARD=NVidia,DEV=7  /usr/share/sounds/alsa/Front_Left.wav 
Playing WAVE '/usr/share/sounds/alsa/Front_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

So ... I guess the next question is why am I not hearing any of this when I play audio from Chromium or vlc? If pacmd list-sinks can be believed, pulse seems to have found the working port...?

Offline

#13 2016-04-01 09:08:18

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

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

Have you configured the applications to play to the HDMI sink by moving them there in e.g. pavucontrol? how does

pacmd list-sink-inputs

look like while you play something in  chromium/vlc? Also currently your analog card is set to be the default for pulse applications that pulse hasn't seen yet, you might want to change that by setting the fallback device to HDMI in pavucontrol or issuing a

pacmd set-default-sink alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1

Last edited by V1del (2016-04-01 09:12:09)

Online

#14 2016-04-02 06:45:40

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

V1del wrote:

Have you configured the applications to play to the HDMI sink by moving them there in e.g. pavucontrol? how does

pacmd list-sink-inputs

look like while you play something in  chromium/vlc? Also currently your analog card is set to be the default for pulse applications that pulse hasn't seen yet, you might want to change that by setting the fallback device to HDMI in pavucontrol or issuing a

pacmd set-default-sink alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1

Ok - it looks like I've got audio working, or at least limping along.

It seems pretty clear to me based on my speaker-test and aplay tests that I don't seem to have a problem with alsa - it looks like everything is being enumerated successfully, and indeed I have a properly populated /proc/asound/cardX/eldX.Y file that indicates my monitor is plugged in.

Like you suggested, I've been playing around with the 'fallback' device. This is a bit strange, though.

When I set my hdmi monitor to be the fallback device, and then I reboot, everything is ok - chrome/vlc/everything play audio through my hdmi monitor. On an application to application basis in pavucontrol I can send audio either to hdmi or headphones. But here are the issues:

1. The default is always hdmi. When I don't reboot, and I change the fallback to headphones, new applications still pick hdmi for some reason. Do I have to reset a daemon or something after changing this selection in pavucontrol?

2. When I set the default to headphones and then reboot, according to pacmd stat or the pavucontrol UI, headphones are indeed the default. But newly started applications still get hdmi?

3. Worse, after the reboot-with-default-as-headphones, hdmi will completely not work - I can switch applications back and forth between hdmi and headphones; headphones will work, hdmi will not?

Offline

#15 2016-04-02 06:49:05

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

Another interesting data point - when I do reboot with headphones as fallback, and then I try to do a speaker-test on my non-working hdmi monitor, I get this:

[ted@tedspc etc]{1}$ speaker-test -D plughw:1,7 -t pink -c2

speaker-test 1.1.0

Playback device is plughw:1,7
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy

Offline

#16 2016-04-02 07:04:26

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

I'm really confused about this concept of a 'default-sink'. Correct me if I'm wrong, but does that mean that if I set an output device to be the 'default-sink', that a new sound-emitting process like vlc or chrome will send audio out to that output device?

Because that isn't at all what's happening - vlc right now is, by default, using my headphones, no matter what I set the 'default-sink' to be. Chrome is, by default, using hdmi, no matter what I set the 'default-sink' to be. Both can be re-targetted in pavucontrol to use either headphones or hdmi, but when they start they seem to use some random device?

Offline

#17 2016-04-02 13:47:27

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

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

When any given application starts the first time, they will go to the default sink. Any subsequent starts after that, will remember the device they were last on. So if you move a stream manually to the headphones next time you start that application they will remember to play from there. If you want to globally disable this behavior and have every stream always default to the default device,  you can append  load-module module-stream-restore  with restore_device=0 in your /etc/pulse/default.pa

Online

#18 2016-04-02 17:13:49

tmiddleton
Member
Registered: 2016-03-29
Posts: 28

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

V1del wrote:

When any given application starts the first time, they will go to the default sink. Any subsequent starts after that, will remember the device they were last on. So if you move a stream manually to the headphones next time you start that application they will remember to play from there. If you want to globally disable this behavior and have every stream always default to the default device,  you can append  load-module module-stream-restore  with restore_device=0 in your /etc/pulse/default.pa

Ah - ok. That makes sense. I guess? I added restore_device=0 to my default.pa and all is well.

I have to say, though, that this seems like an extraordinarily bad choice of default behaviours for pulseaudio to have implemented - I would never have guessed that the UI selection in pavucontrol meant, "this is the default stream sink when you first run an application" rather than "this is the default stream sink for running applications". Actually, maybe that's why it's called a 'fallback' rather than a 'default'? At any rate, it seems like at least pavucontrol should change or clarify it's terminology?

Anyways, it seems to work now, and I can now say that for the first time since buying this monitor and GPU, my audio is working more or less the way I would expect/prefer it to. Thank you!

Offline

#19 2016-04-03 13:00:11

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

Re: [SOLVED] No sound from DP, can't figure out alsa/pulseaudio?

You can't make defaults that are going to cover everyone's use cases, that's why they are optional and configurable. I like the default behavior because I have certain applications I always want to play on a specific device

Online

Board footer

Powered by FluxBB