Bug 218326 - [snd_hda] OSS ioctl() reports low sample rate for HDMI with Nvidia GeForce
Summary: [snd_hda] OSS ioctl() reports low sample rate for HDMI with Nvidia GeForce
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-multimedia mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-03 11:46 UTC by Mikael Simonsson
Modified: 2017-04-24 09:59 UTC (History)
0 users

See Also:


Attachments
oss_info.cc (1.23 KB, text/plain)
2017-04-03 11:46 UTC, Mikael Simonsson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Simonsson 2017-04-03 11:46:50 UTC
Created attachment 181422 [details]
oss_info.cc

Hi,

I'm trying to get TrueHD/DTS-HD-MA pass-through working with Kodi. The problem seems to be that the OSS ioctl() interface reports a low sample rate for the HDMI port:

# ./oss_info
oss_card_info.shortname: pcm0
oss_card_info.longname: NVIDIA (0x0051) (HDMI/DP 8ch)
oss_audioinfo.min_rate: 32000
oss_audioinfo.max_rate: 192000

oss_card_info.shortname: pcm1
oss_card_info.longname: NVIDIA (0x0051) (HDMI/DP 8ch)
oss_audioinfo.min_rate: 48000
oss_audioinfo.max_rate: 48000
...

pcm1 is my HDMI port, I'm guessing pcm0 is the DVI-D port. I can select TrueHD/DTS-HD-MA pass-through in Kodi for pcm0, but not for pcm1.

Why does OSS report the sample rate as (min-max) 48000-48000 for pcm1 and not 32000-192000?

This system has a "ASUS GT730-SL-2GD3-BRK" and I'm seeing the same result on a system with a "ASUS GEFORCE GT 610 2GB DDR3 PCI-E".

This should be supported by both cards:
http://nvidia.custhelp.com/app/answers/detail/a_id/2796

# uname -a
FreeBSD htpc.localdomain 11.0-RELEASE-p8 FreeBSD 11.0-RELEASE-p8 #0: Wed Feb 22 06:12:04 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

# cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0051) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0051) (HDMI/DP 8ch)> (play) default
pcm2: <Realtek ALC887 (Rear Analog)> (play/rec)
pcm3: <Realtek ALC887 (Front Analog)> (play/rec)
pcm4: <Realtek ALC887 (Internal Digital)> (play)
pcm5: <Realtek ALC887 (Rear Digital)> (play)
No devices installed from userspace.

# sysctl dev.pcm
...
dev.pcm.1.bitperfect: 0
dev.pcm.1.buffersize: 65536
dev.pcm.1.play.vchanformat: s16le:2.0
dev.pcm.1.play.vchanrate: 48000
dev.pcm.1.play.vchanmode: passthrough
dev.pcm.1.play.vchans: 1
dev.pcm.1.play.32bit: 24
dev.pcm.1.%parent: hdaa0
dev.pcm.1.%pnpinfo:
dev.pcm.1.%location: nid=5
dev.pcm.1.%driver: pcm
dev.pcm.1.%desc: NVIDIA (0x0051) (HDMI/DP 8ch)
dev.pcm.0.bitperfect: 0
dev.pcm.0.buffersize: 65536
dev.pcm.0.play.vchanformat: s16le:2.0
dev.pcm.0.play.vchanrate: 48000
dev.pcm.0.play.vchanmode: passthrough
dev.pcm.0.play.vchans: 1
dev.pcm.0.play.32bit: 24
dev.pcm.0.%parent: hdaa0
dev.pcm.0.%pnpinfo:
dev.pcm.0.%location: nid=4
dev.pcm.0.%driver: pcm
dev.pcm.0.%desc: NVIDIA (0x0051) (HDMI/DP 8ch)
...

# sysctl dev.hdaa.0
dev.hdaa.0.reconfig: 0
dev.hdaa.0.gpo_config:
dev.hdaa.0.gpo_state:
dev.hdaa.0.gpio_config:
dev.hdaa.0.gpio_state:
dev.hdaa.0.gpi_state:
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.nid11: audio output [DISABLED]
     Widget cap: 0x000062b1 DIGITAL UNSOL STRIPE(x4) 8CH
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x000e07f0 16 20 24 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.0.nid10: audio output [DISABLED]
     Widget cap: 0x000062b1 DIGITAL UNSOL STRIPE(x4) 8CH
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x000e07f0 16 20 24 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.0.nid9: audio output
     Widget cap: 0x000062b1 DIGITAL UNSOL STRIPE(x4) 8CH
    Association: 1 (0x0001)
            OSS: pcm (pcm)
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x000e07f0 16 20 24 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.0.nid8: audio output
     Widget cap: 0x000062b1 DIGITAL UNSOL STRIPE(x4) 8CH
    Association: 0 (0x0001)
            OSS: pcm (pcm)
     Stream cap: 0x00000005 AC3 PCM
        PCM cap: 0x000e07f0 16 20 24 bits, 32 44 48 88 96 176 192 KHz

dev.hdaa.0.nid7_original: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid7_config: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid7: pin: Digital-out (None) [DISABLED]
     Widget cap: 0x00407381 DIGITAL UNSOL 8CH
        Pin cap: 0x09000094 PDC OUT HDMI DP HBR
     Pin config: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
    Pin control: 0x00000000
    Connections: 4
          + <- nid=8 [audio output] (selected)
          + <- nid=9 [audio output]
          + <- nid=10 [audio output] [DISABLED]
          + <- nid=11 [audio output] [DISABLED]

dev.hdaa.0.nid6_original: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid6_config: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid6: pin: Digital-out (None) [DISABLED]
     Widget cap: 0x00407381 DIGITAL UNSOL 8CH
        Pin cap: 0x09000094 PDC OUT HDMI DP HBR
     Pin config: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
    Pin control: 0x00000000
    Connections: 4
          + <- nid=8 [audio output] (selected)
          + <- nid=9 [audio output]
          + <- nid=10 [audio output] [DISABLED]
          + <- nid=11 [audio output] [DISABLED]

dev.hdaa.0.nid5_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid5_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid5: pin: Digital-out (Jack)
     Widget cap: 0x00407381 DIGITAL UNSOL 8CH
    Association: 1 (0x0001)
        Pin cap: 0x09000094 PDC OUT HDMI DP HBR
     Pin config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
    Pin control: 0x00000040 OUT
    Connections: 4
          + [DISABLED] <- nid=8 [audio output]
          + <- nid=9 [audio output] (selected)
          + [DISABLED] <- nid=10 [audio output] [DISABLED]
          + [DISABLED] <- nid=11 [audio output] [DISABLED]

dev.hdaa.0.nid4_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid4_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid4: pin: Digital-out (Jack)
     Widget cap: 0x00407381 DIGITAL UNSOL 8CH
    Association: 0 (0x0001)
        Pin cap: 0x09000094 PDC OUT HDMI DP HBR
     Pin config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
    Pin control: 0x00000040 OUT
    Connections: 4
          + <- nid=8 [audio output] (selected)
          + [DISABLED] <- nid=9 [audio output]
          + [DISABLED] <- nid=10 [audio output] [DISABLED]
          + [DISABLED] <- nid=11 [audio output] [DISABLED]

dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x104384f5
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: NVIDIA (0x0051) Audio Function Group


# pciconf -lv
...
hdac1@pci0:0:27:0:      class=0x040300 card=0x863f1043 chip=0x8ca08086 rev=0x00 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '9 Series Chipset Family HD Audio Controller'
    class      = multimedia
    subclass   = HDA
...
vgapci0@pci0:1:0:0:     class=0x030000 card=0x84f51043 chip=0x128710de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'GK208 [GeForce GT 730]'
    class      = display
    subclass   = VGA
hdac0@pci0:1:0:1:       class=0x040300 card=0x84f51043 chip=0x0e0f10de rev=0xa1 hdr=0x00
    vendor     = 'NVIDIA Corporation'
    device     = 'GK208 HDMI/DP Audio Controller'
    class      = multimedia
    subclass   = HDA
Comment 1 Mikael Simonsson 2017-04-24 09:59:01 UTC
If anyone comes across this bug looking for a workaround, the simple solution is to buy a HDMI to DVI-D converter.