iec958 passthrough fails with ALC4080

John Klug <[email protected]> Sun, 26 Feb 2023 11:04:26 -0600
Newsgroups gmane.linux.alsa.user
Message-ID <CADU0Vqw+m8nKKUYUizzPiHcxAb0SxnkwTEc8AZ=t2NZCJfb+QQ@mail.gmail.com>
I am trying to use this hardware:
0db0:d1d7 MSI PRO Z790-A WIFI

I see these two Alsa entries:

iec958:CARD=Audio,DEV=0
    USB Audio, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
iec958:CARD=Audio,DEV=1
    USB Audio, USB Audio #1
    IEC958 (S/PDIF) Digital Audio Output

The first produces no sound, the 2nd when used with aplay -D produces
an error because the device does not exist.  This seems to match alsa
choices in VLC.

This was from strace when running aplay -Diec958:CARD=Audio,DEV=1:

17528 openat(AT_FDCWD, "/dev/snd/controlC2", O_RDWR|O_CLOEXEC) = 3
17528 ioctl(3, SNDRV_CTL_IOCTL_PVERSION, 0x7fffa204941c) = 0
17528 ioctl(3, SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE, 0x7fffa204947c) = 0
17528 openat(AT_FDCWD, "/dev/snd/pcmC2D999p",
O_RDWR|O_NONBLOCK|O_CLOEXEC) = -1 ENOENT (No such file or directory)
17528 close(3)                          = 0

I do get sound via pipewire configured for either profile Pro or
surround 5.1, or surround 7.1.  Pro works with USB Audio Pro #2, and
the other two have no choices and just say S/PDIF.  But these settings
are received as two-channel by my receiver.

I saved the alsa-info.sh result here:
http://alsa-project.org/db/?f=a9b20dc9b3e29cf7545c6b61eca5411e717da085

John Klug