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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-30-2021, 02:23 PM
|
#1
|
Member
Registered: Apr 2004
Location: USA
Distribution: Mint 19 Cinnamon
Posts: 75
Rep:
|
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.? 
|
|
|
04-30-2021, 03:04 PM
|
#2
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
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.
|
|
|
04-30-2021, 07:00 PM
|
#3
|
Member
Registered: Apr 2004
Location: USA
Distribution: Mint 19 Cinnamon
Posts: 75
Original Poster
Rep:
|
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?
|
|
|
04-30-2021, 08:14 PM
|
#4
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
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.)
|
|
|
05-01-2021, 05:01 PM
|
#5
|
Member
Registered: Apr 2004
Location: USA
Distribution: Mint 19 Cinnamon
Posts: 75
Original Poster
Rep:
|
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?
|
|
|
All times are GMT -5. The time now is 11:55 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|