LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-30-2021, 02:23 PM   #1
mstrimel
Member
 
Registered: Apr 2004
Location: USA
Distribution: Mint 19 Cinnamon
Posts: 75

Rep: Reputation: 0
desperate to get S/PDIF output working on Xonar SE sound card


Hello,
I purchased an Asus Xonar SE sound card and I specifically needed the S/PDIF output to work. I've worked really hard but can't seem to get it going. Can anyone help? Forgive the length of this post but I'm going to try and provide all relevant info along with everything I've tried.

Distribution: Linux mint
Code:
mary@mythbox:~$ uname -r
5.8.0-50-generic
Card info [NOTE: it is a pci card but for some reason reports as a USB card. But the analog speaker out works, so this anomaly doesn't seem like the problem?]
Code:
mary@mythbox:~$ lsusb
* * * 
Bus 001 Device 002: ID 0b05:189d ASUSTek Computer, Inc. Xonar SoundCard
Onboard sound info [this is NOT the card I'm worried about, but I'm providing the info in case it's somehow relevant]:
Code:
mary@mythbox:~$ lspci

0b:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 1637
sinks info, this seems to look like the port is active:
Code:
mary@mythbox:~$ pacmd list-sinks
1 sink(s) available.
  * index: 6
	name: <alsa_output.usb-ASUSTeK_Xonar_SoundCard-00.iec958-stereo>
	driver: <module-alsa-card.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: RUNNING
	suspend cause: (none)
	priority: 9048
	volume: front-left: 67624 / 103% / 0.82 dB,   front-right: 67624 / 103% / 0.82 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 20.22 ms
	max request: 4 KiB
	max rewind: 4 KiB
	monitor source: 12
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 3
	configured latency: 23.22 ms; range is 0.50 .. 2000.00 ms
	card: 0 <alsa_card.usb-ASUSTeK_Xonar_SoundCard-00>
	module: 7
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "USB Audio"
		alsa.id = "USB Audio"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "1"
		alsa.card_name = "Xonar SoundCard"
		alsa.long_card_name = "ASUSTeK Xonar SoundCard at usb-0000:01:00.0-1, high speed"
		alsa.driver_name = "snd_usb_audio"
		device.bus_path = "pci-0000:01:00.0-usb-0:1:1.0"
		sysfs.path = "/devices/pci0000:00/0000:00:01.1/0000:01:00.0/usb1/1-1/1-1:1.0/sound/card1"
		udev.id = "usb-ASUSTeK_Xonar_SoundCard-00"
		device.bus = "usb"
		device.vendor.id = "0b05"
		device.vendor.name = "ASUSTek Computer, Inc."
		device.product.id = "189d"
		device.product.name = "Xonar SoundCard"
		device.serial = "ASUSTeK_Xonar_SoundCard"
		device.string = "iec958:1"
		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 = "Xonar SoundCard Digital Stereo (IEC958)"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-usb"
	ports:
		iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown)
			properties:
				
	active port: <iec958-stereo-output>
Controls (look at NUMID=19)
Code:
mary@mythbox:~$ amixer -c 1 contents
numid=10,iface=CARD,name='Clock Source 21 Validity'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=15,iface=CARD,name='Clock Source 22 Validity'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=18,iface=CARD,name='Clock Source 23 Validity'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=30,iface=CARD,name='Clock Source 24 Validity'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=35,iface=CARD,name='Clock Source 25 Validity'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=16,iface=CARD,name='Headphone - Output Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=off
numid=19,iface=CARD,name='IEC958 In - Output Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=36,iface=CARD,name='Keep Interface'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=24,iface=CARD,name='Line - Input Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=20,iface=CARD,name='Mic - Input Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=31,iface=CARD,name='Mic - Input Jack',index=1
  ; type=BOOLEAN,access=r-------,values=1
  : values=off
numid=11,iface=CARD,name='Speaker - Output Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
numid=7,iface=MIXER,name='PCM Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=12,iface=MIXER,name='PCM Playback Switch',index=1
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=17,iface=MIXER,name='PCM Playback Switch',index=2
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=8,iface=MIXER,name='PCM Playback Volume'
  ; type=INTEGER,access=rw---R--,values=6,min=0,max=87,step=0
  : values=66,87,84,69,81,74
  | dBminmax-min=-65.25dB,max=0.00dB
numid=13,iface=MIXER,name='PCM Playback Volume',index=1
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=87,step=0
  : values=74,74
  | dBminmax-min=-65.25dB,max=0.00dB
numid=29,iface=MIXER,name='PCM Capture Source'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Mic'
  ; Item #1 'Line'
  ; Item #2 'Mixer'
  : values=0
numid=27,iface=MIXER,name='PCM Capture Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=28,iface=MIXER,name='PCM Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
  : values=23,23
  | dBminmax-min=-17.25dB,max=30.00dB
numid=25,iface=MIXER,name='Line Capture Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=26,iface=MIXER,name='Line Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=23,step=0
  : values=0,0
  | dBminmax-min=-17.25dB,max=0.00dB
numid=21,iface=MIXER,name='Mic Capture Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=32,iface=MIXER,name='Mic Capture Switch',index=1
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=22,iface=MIXER,name='Mic Capture Volume'
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
  : values=23,23
  | dBminmax-min=-17.25dB,max=30.00dB
numid=33,iface=MIXER,name='Mic Capture Volume',index=1
  ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0
  : values=23,23
  | dBminmax-min=-17.25dB,max=30.00dB
numid=23,iface=MIXER,name='Auto Gain Control'
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=34,iface=MIXER,name='Auto Gain Control',index=1
  ; type=BOOLEAN,access=rw------,values=1
  : values=off
numid=9,iface=MIXER,name='Input Gain Pad Control'
  ; type=INTEGER,access=rw------,values=1,min=0,max=2,step=0
  : values=2
numid=14,iface=MIXER,name='Input Gain Pad Control',index=1
  ; type=INTEGER,access=rw------,values=2,min=0,max=1,step=0
  : values=1,1
numid=5,iface=PCM,name='Capture Channel Map'
  ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
  : values=0,0
  | container
    | chmap-fixed=FL,FR
numid=1,iface=PCM,name='Playback Channel Map'
  ; type=INTEGER,access=r----R--,values=6,min=0,max=36,step=0
  : values=0,0,0,0,0,0
  | container
    | chmap-fixed=FL,FR,FC,LFE,SL,SR
    | chmap-fixed=FL,FR
    | chmap-fixed=FL,FR,RL,RR
numid=6,iface=PCM,name='Capture Channel Map',device=1
  ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
  : values=0,0
  | container
    | chmap-fixed=FL,FR
numid=2,iface=PCM,name='Playback Channel Map',device=1
  ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
  : values=0,0
  | container
    | chmap-fixed=FL,FR
numid=3,iface=PCM,name='Playback Channel Map',device=2
  ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
  : values=0,0
  | container
    | chmap-fixed=FL,FR
numid=4,iface=PCM,name='Playback Channel Map',device=3
  ; type=INTEGER,access=r----R--,values=2,min=0,max=36,step=0
  : values=0,0
  | container
    | chmap-fixed=FL,FR
dmesg:
Code:
mary@mythbox:~$ dmesg | grep snd
[    7.416094] snd_hda_intel 0000:0b:00.1: Handle vga_switcheroo audio client
[    7.430707] snd_hda_intel 0000:0b:00.1: bound 0000:0b:00.0 (ops amdgpu_dm_audio_component_bind_ops [amdgpu])
[    7.631468] usbcore: registered new interface driver snd-usb-audio
lsmod:
Code:
mary@mythbox:~$ lsmod | grep snd
snd_hda_codec_hdmi     61440  1
snd_usb_audio         282624  2
snd_usbmidi_lib        36864  1 snd_usb_audio
snd_hda_intel          53248  2
snd_intel_dspcfg       24576  1 snd_hda_intel
snd_hda_codec         139264  2 snd_hda_codec_hdmi,snd_hda_intel
snd_hda_core           94208  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_hwdep              20480  2 snd_usb_audio,snd_hda_codec
snd_pcm               114688  5 snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_hda_core
snd_seq_midi           20480  0
snd_seq_midi_event     16384  1 snd_seq_midi
snd_rawmidi            36864  2 snd_seq_midi,snd_usbmidi_lib
snd_seq                69632  2 snd_seq_midi,snd_seq_midi_event
mc                     57344  2 videodev,snd_usb_audio
snd_seq_device         16384  3 snd_seq,snd_seq_midi,snd_rawmidi
snd_timer              40960  2 snd_seq,snd_pcm
snd                    94208  19 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,snd_rawmidi
soundcore              16384  1 snd
.asound.rc
Code:
pcm.!default {
    type plug
    slave { pcm "jack" }
}

pcm.jack {
    type jack
    playback_ports {
        0 alsa_pcm:playback_1
        1 alsa_pcm:playback_2
    }
    capture_ports {
        0 alsa_pcm:capture_1
        1 alsa_pcm:capture_2
    }
}

ctl.mixer0 {
    type hw
    card 0
}


Things I have tried: raising all volumes to maximum in qasmixer and alsamixer (after selecting the correct card); turning off pulseaudio with "pulseaudio -k"; turning off pulsaudio by moving the /usr/bin program then restarting the machine and trying all mixer controls; turning off onboard sound in bios; looking for entries in bios that would enable the spdif on my sound card (didn't find any); typing "iecset audio on" from a terminal as recommended in the Arch Linux manual (I'm really disappointed that didn't work!); setting framerate to 48000 (I don't remember where), using "amixer cset" command to try to adjust the settings for numid=19 which looks like the correct output, and the permissions appear to be read-only which seems like a clue. I'm not really sure I need to adjust these permissions but when I try, I get:

Code:
mary@mythbox:~$ amixer -c 1 cset numid=19,iface=CARD,name=IEC958 In - Output Jack,type=BOOLEAN,access=rw----R--
amixer: Control hw:1 element write error: Operation not permitted
Can anyone save me from having to return this sound card and pay all the restocking fees, etc.?
 
Old 04-30-2021, 03:04 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675

Rep: Reputation: Disabled
Stabbing in dark. I hear in PulseAudio setups user is not in audio group (not supposed to be). OTOH, to use plain ALSA user must be in audio group. Your user is getting permission error when using ALSA tools. At this stage of troubleshooting I'd recommend using root account. Once it is clear ALSA is working then you can add bells and whistles.
Also, there is no need for ~/.asound.rc, all audio devices are usable regardless whether they are default or not. Trying to reconfigure default device only obfuscates the issue.
 
Old 04-30-2021, 07:00 PM   #3
mstrimel
Member
 
Registered: Apr 2004
Location: USA
Distribution: Mint 19 Cinnamon
Posts: 75

Original Poster
Rep: Reputation: 0
thank you - I should have mentioned I tried most of the commands as both regular user and root, with no difference. Also just as an FYI, the S-PDIF output works fine under Windows, so it is not a hardware problem.

Here's an example of something I tried with root, where it seemed to not work:
Code:
root@mythbox:/usr/share/libreoffice/share# aplay /usr/share/sounds/alsa/Noise.wav 
XDG_RUNTIME_DIR (/run/user/1000) is not owned by us (uid 0), but by uid 1000! (This could e.g. happen if you try to connect to a non-root PulseAudio as a root user, over the native protocol. Don't do that.)
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
aplay: main:830: audio open error: No such file or directory
Any other ideas?
 
Old 04-30-2021, 08:14 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675

Rep: Reputation: Disabled
XDG? There is a GUI running with all bells and whistles. I do not use systemd and I do not use PulseAudio - I keep my life and computer simple. From your error, there is a process blocking access, a process belonging to your user (UID=1000). What is responsible for this process is unclear for me. You can't do any serious troubleshooting if there are multiple applications running trying to use your sound device. (When I had a MythTV frontend I even didn't install any desktop environments or window managers, I ran MythTV directly on Xorg.)
 
Old 05-01-2021, 05:01 PM   #5
mstrimel
Member
 
Registered: Apr 2004
Location: USA
Distribution: Mint 19 Cinnamon
Posts: 75

Original Poster
Rep: Reputation: 0
So, following up these thoughts I booted to recovery mode, and tried playing sounds every which way in a console environment as the root user after re-checking the mixer settings. Still no luck.

Any other thoughts? Alternatively, can anyone recommend a sound card with digital out that is supported by Linux?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Audio not working Xonar STX sound card robbur Linux - Newbie 1 01-27-2021 06:46 PM
Sound card Xonar DX -- sound test -- lubu_guy Linux - Hardware 0 01-07-2021 06:45 PM
Sound from radio to sound card's S/PDIF In isn't detected Mintonite Linux - General 1 03-17-2016 03:19 AM
[SOLVED] How to mix S/PDIF input and PCM Out (to hear PCM and S/PDIF simultaneously)? *Dark Dragon* Linux - General 11 07-20-2012 07:53 AM
(ASUS Xonar DX sound card) Only its Side output has sound. Akeke Linux - Hardware 3 04-13-2011 08:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration