Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

[solved] No Digital Audio Output from USB Sound Devices

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

[solved] No Digital Audio Output from USB Sound Devices

  • Quote

Post by jagdpanther » Sat Oct 01, 2022 9:14 pm

I can not get the S/PDIF TOSLINK (optical digital sound) output from my Z690 based motherboard to work. I am using the Asus ROG Strix Z690-E Gaming-Wifi motherboard. The audio analog out put works ok after I realized that Linux is treating that sound hardware as a USB device. (See: https://forums.gentoo.org/viewtopic-t-1149329.html ) I want to use the DAC in my stereo receiver/amp so would like to get the motherboard's TOSLINK working.

I also tried installing an Asus Xonar SE sound card. This PCIE card is also treated as a USB device by Linux and I could get the analog output working but not the digital output. https://www.asus.com/us/Motherboards-Co ... /Xonar-SE/ The Asus Xonar card is not currently in my system.

I am confident that the issue is not the TOSLINK input on the stereo receiver/amp or the fiber cable as they worked well from my older Linux (Gentoo) system. On that system there was a S/PDIF entry in alsamixer for the motherboard sound device.

Is there some additional kernel module needed for USB audio digital output?

I am using the Intel audio:

Code: Select all

$ lspci | grep -i audio
00:1f.3 Audio device: Intel Corporation Alder Lake-S HD Audio Controller (rev 11)
01:00.1 Audio device: NVIDIA Corporation GA104 High Definition Audio Controller (rev a1)

# lspci -s 00:1f.3 -v
00:1f.3 Audio device: Intel Corporation Alder Lake-S HD Audio Controller (rev 11)
        DeviceName: Onboard - Sound
        Subsystem: ASUSTeK Computer Inc. Alder Lake-S HD Audio Controller
        Flags: bus master, fast devsel, latency 32, IRQ 17
        Memory at 4002218000 (64-bit, non-prefetchable) [size=16K]
        Memory at 4002000000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: [50] Power Management version 3
        Capabilities: [80] Vendor Specific Information: Len=14 <?>
        Capabilities: [60] MSI: Enable- Count=1/1 Maskable- 64bit+
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
Is there some additional kernel module needed for USB audio digital output? I have these sound kernel modules installed:

Code: Select all

$ lsmod | grep -i snd
snd_seq                73728  0
snd_pcm_oss            53248  0
snd_mixer_oss          28672  1 snd_pcm_oss
snd_hda_codec_hdmi     65536  1
snd_usb_audio         290816  10
snd_hwdep              16384  1 snd_usb_audio
snd_usbmidi_lib        32768  1 snd_usb_audio
snd_rawmidi            36864  1 snd_usbmidi_lib
snd_hda_intel          32768  3
snd_seq_device         16384  2 snd_seq,snd_rawmidi
snd_intel_dspcfg       16384  1 snd_hda_intel
snd_hda_codec         106496  2 snd_hda_codec_hdmi,snd_hda_intel
snd_hda_core           61440  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_pcm               122880  7 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_pcm_oss,snd_hda_core
snd_timer              32768  2 snd_seq,snd_pcm
snd                    90112  38 snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_timer,snd_pcm_oss,snd_pcm,snd_rawmidi,snd_mixer_oss
soundcore              16384  1 snd

From: alsa-info.sh:

Code: Select all

!!DMI Information
!!---------------

Manufacturer:      ASUS 
Product Name:      System Product Name 
Product Version:   System Version
Firmware Version:  1720 
System SKU:        SKU
Board Vendor:      ASUSTeK COMPUTER INC. 
Board Name:        ROG STRIX Z690-E GAMING WIFI 
...
!!ALSA Version
!!------------

Driver version:     k5.19.12-gentoo-1
Library version:    1.2.7.2
Utilities version:  1.2.7


!!Loaded ALSA modules
!!-------------------

snd_hda_intel (card 1)
snd_usb_audio (card 2)


!!Sound Servers on this system
!!----------------------------

Pulseaudio:
      Installed - Yes (/usr/bin/pulseaudio)
      Running - Yes


!!Soundcards recognised by ALSA
!!-----------------------------

 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0x95080000 irq 17
 2 [Audio          ]: USB-Audio - USB Audio
                      Generic USB Audio at usb-0000:00:14.0-4, high speed


!!PCI Soundcards installed in the system
!!--------------------------------------

00:1f.3 Audio device [0403]: Intel Corporation Alder Lake-S HD Audio Controller [8086:7ad0] (rev 11)
   DeviceName: Onboard - Sound
01:00.1 Audio device [0403]: NVIDIA Corporation GA104 High Definition Audio Controller [10de:228b] (rev a1)
   Subsystem: eVga.com. Corp. GA104 High Definition Audio Controller [3842:3797]

...
Bus 001 Device 002: ID 0b05:1996 ASUSTek Computer, Inc. USB Audio
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x0b05 ASUSTek Computer, Inc.
  idProduct          0x1996
  bcdDevice            0.13
  iManufacturer           3 Generic
  iProduct                1 USB Audio

...

      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID            24
        wTerminalType      0x0605 SPDIF interface
        bAssocTerminal         16
        bSourceID              32
        bCSourceID              8
        bmControls         0x0000
        iTerminal               0
So Linux sees the SPDIF interface.

After reading https://alsa.opensrc.org/DigitalOut the following shows that the SPDIF interface should be available:

Code: Select all

$ aplay -L | grep 'S/PDIF' -B 2
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
https://alsa.opensrc.org/DigitalOut also states:
If you see IEC958 or S/PDIF in that list you can use the complete identification including the CARD and DEV parameters as a playback device instead of ```hw:x,y```.
Where do I use that "iec958:CARD=Audio,DEV=0" or "iec958:CARD=Audio,DEV=1" ? I tried in alsamixer -> F6 -> "enter device name ..." It didn't work.

Any suggestions for for getting TOSLINK output working would be greatly appreciated. (If I should provide more info please ask.)
Last edited by jagdpanther on Mon Aug 21, 2023 10:49 pm, edited 1 time in total.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56073
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 02, 2022 11:14 am

jagdpanther,

This is going to make our heads hurt.
You will have several digital audio outputs - we need to discover the right one. My video card alone has six then there are al least two on the motherboard.

Please share the content of /proc/asound/devices
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Sun Oct 02, 2022 5:12 pm

Thanks for the reply.
Please share the content of /proc/asound/devices

Code: Select all

/proc/asound]$ cat devices 
  1:        : sequencer
  2: [ 1- 3]: digital audio playback
  3: [ 1- 7]: digital audio playback
  4: [ 1- 8]: digital audio playback
  5: [ 1- 9]: digital audio playback
  6: [ 1-10]: digital audio playback
  7: [ 1-11]: digital audio playback
  8: [ 1-12]: digital audio playback
  9: [ 1]   : control
 10: [ 2- 0]: digital audio playback
 11: [ 2- 0]: digital audio capture
 12: [ 2- 1]: digital audio playback
 13: [ 2- 1]: digital audio capture
 14: [ 2- 2]: digital audio playback
 15: [ 2- 2]: digital audio capture
 16: [ 2- 3]: digital audio playback
 17: [ 2]   : control
 33:        : timer
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56073
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 02, 2022 6:31 pm

jagdpanther,

Code: Select all

  2: [ 1- 3]: digital audio playback
  3: [ 1- 7]: digital audio playback
  4: [ 1- 8]: digital audio playback
  5: [ 1- 9]: digital audio playback
  6: [ 1-10]: digital audio playback
  7: [ 1-11]: digital audio playback
  8: [ 1-12]: digital audio playback 
are the digital output devices on your video card.

Code: Select all

 10: [ 2- 0]: digital audio playback
 11: [ 2- 0]: digital audio capture
 12: [ 2- 1]: digital audio playback
 13: [ 2- 1]: digital audio capture
 14: [ 2- 2]: digital audio playback
 15: [ 2- 2]: digital audio capture
 16: [ 2- 3]: digital audio playback 
are the inputs and outputs of another card. I can't tell which from this. They are numbered card 1 and card 2 here.
That's odd as card numbers start from zero.

Card 1 is your video card as it has no inputs, so we don't need to test that.
With VLC, use some 48.0kHz sample rate material e,g. a DVD rip, to test all the outputs on Card 2 in turn.
Run

Code: Select all

alsamixer -c2 
to ensure that Card2 is not muted.

What was Cari0 and where did it go?.
The carh numbers are dynamically allocated, so may change if you reboot.
To read this file, the first column is the alsa minor device number. You see these in /dev/snd.
The [ 1- 7] is the [Card- Device] numbers.
playback means its an output device
capture means its an input device.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Sun Oct 02, 2022 7:40 pm

They are numbered card 1 and card 2 here.
That's odd as card numbers start from zero.
From /usr/sbin/alsa-info.sh"

Code: Select all

!!Soundcards recognized by ALSA 
!!-----------------------------

 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0x95080000 irq 17
 2 [Audio          ]: USB-Audio - USB Audio
                      Generic USB Audio at usb-0000:00:14.0-4, high speed
I am controlling the volume of the analog output from the motherboard sound system using alsamixer:
F6 -> Default 2 USB Audio. (Which unfortunately has no s/pdif entries.)
(And gives the same result as "alsamixer -c2")
The zero card "default" in alsamixer is called:
Card: Pulsaudio
Chip: Pulsaudio
The "Master" entry in alsas mixer for "card 0", Pulsaudio, does work as a volume control.

Is pulsaudio causing an issue? I see that the following two pulse processes are running. Uid 500 is me.:

Code: Select all

 ps axl | grep pulse
1   500 1055193       1  20   0 872132 19344 do_sys Sl   ?          6:32 /usr/bin/pulseaudio --start --log-target=syslog
0   500 1055227 1055193  20   0 233412  7052 do_sys Sl   ?          0:00 /usr/libexec/pulse/gsettings-helper
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Sun Aug 20, 2023 10:40 pm

I am trying again to get S/PDIF output working from my Gentoo system. For a few MIN. it worked. ...

I decided to try using pavucontrol instead of alsamixer: On the Playback tab I select S/PDIF and it worked. Then I decided to try it as a 2nd user. I can not replicate getting S/PDIF working. I killed all the running pulse (anything) processes and even tried logging out and back in. Still no more S/PDIF output. In pavucontrol Playback tab I switch back to USB Audio Speakers and the analog output works as usual.

Any suggestions on where to start?

Code: Select all

$ pa-info | grep PDIF
        Description: USB Audio S/PDIF Output
                device.profile.description = "S/PDIF Output"
                device.description = "USB Audio S/PDIF Output"
                [Out] SPDIF: S/PDIF Output (type: SPDIF, priority: 100, availability unknown)
        Active Port: [Out] SPDIF
        Description: Monitor of USB Audio S/PDIF Output
                device.description = "Monitor of USB Audio S/PDIF Output"
                [Out] SPDIF: S/PDIF Output (type: SPDIF, priority: 100, latency offset: 0 usec, availability unknown)
    IEC958 (S/PDIF) Digital Audio Output
    IEC958 (S/PDIF) Digital Audio Output
        wTerminalType      0x0605 SPDIF interface

I read through https://wiki.gentoo.org/wiki/PulseAudio but can't seem to get S/PDIF output working again.
Top
jagdpanther
l33t
l33t
Posts: 820
Joined: Sat Nov 22, 2003 2:26 pm

  • Quote

Post by jagdpanther » Mon Aug 21, 2023 10:48 pm

solved: The original issue was me not using pavucontrol. The only remaining trick is that I need to ensure that I do NOT have any applications using the optical (S/PDIF) output from user 1 if I want to use optical output from user 2. There is a section in the Gentoo PulseAudio wiki about allowing multiple users to use S/PDIF but I could not get that working.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy