missing samplerates on Asus Xonar Essence STX sound card
#1
Hi,

I'm currently using fritsch's Ubuntu build with the aforementioned sound card.
Unfortunately Kodi doesn't recognize the available samplerates and is limited to 48 kHz output only. The sound card has worked flawlessly in Windows 8.1 before, so I guess it's not a hardware defect.

To get an overview what functions of my STX are currently supported in Linux i used this alsa-capabilites script.
I get the following output: alsa-capabilities

Here's my debug log while playing several test-files: kodi.log
The output of my soundcard while playing the 96 kHz file: hw_params
dmesg
id
amixer
Kernel 4.4.0-22-generic
up-to-date Ubuntu 16.04 as of today, Kodi 17.0-ALPHA2 Git:569f576

Hardware Info
Mainboard: Asus Maximus IV Gene (Z87 Chipset)
CPU: Intel Core i3-4130T
GPU: Intel HD Graphics 4400

So how can I play music files at their native sample rate without any conversion?
*WANTED* Someone to go back in time with me. This is not a joke. P.O. Box 91 Ocean View, WA 99393. You'll get paid after we get back. Must bring your own weapons. Safety not guaranteed. I have only done this once before.
Reply
#2
What is your setting in Setting/System/Audio Output/Output Configuration? Is it set to Best Match? It seems like your configuration sets your card to 48 khz no matter what, even your naim-test-2-wav-16-44100.wav file is played at 48 khz. Check that this setting isn't set to Fixed or Optimized.
Reply
#3
Force disable ALSA's dmix or only the dmix frequency will be usable.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#4
(2016-05-24, 11:59)kyungrak Wrote: What is your setting in Setting/System/Audio Output/Output Configuration? Is it set to Best Match? It seems like your configuration sets your card to 48 khz no matter what, even your naim-test-2-wav-16-44100.wav file is played at 48 khz. Check that this setting isn't set to Fixed or Optimized.
It was set to "Best Match". That's actually one of the first things I adjust in a fresh Kodi install Wink
(2016-05-24, 13:42)fritsch Wrote: Force disable ALSA's dmix or only the dmix frequency will be usable.
I tried that before but It didn't work. I fiddled around with different asound.conf files but only got it working like 1 out of 20 times.
This is what i thought was right:
Code:
pcm.!default {
type hw
card 0
}

ctl.!default {
type hw
card 0
}

Turns out I misunderstood a Kodi setting and additionally made a small error in my asound.conf.

If anybody is interested, here's what I did wrong / How I got it working:

Somehow every other time I booted my PC the order of my soundcards were switched. At one time card 0 was my STX and card 1 my HDMI output, sometimes it was the other way around. I had to put in the alias of my card in my asound.conf, so it looks as follows:
Code:
pcm.!default {
type hw
card STX
}

ctl.!default {
type hw
card STX
}

The other thing that I did wrong was to set up my "Audio output device" under Settings -> System Settings -> Audio to "Xonar STX Multichannel".
I had to switch to "Default (Xonar STX Multichannel)". I think this is because the "Default" refers to the system / alsa default which is referenced in my asound.conf. If I choose anything other than "Default xxx" then Kodi tries to directly communicate with it, which means dmix including resampling on my STX.

Thanks for your help guys!
*WANTED* Someone to go back in time with me. This is not a joke. P.O. Box 91 Ocean View, WA 99393. You'll get paid after we get back. Must bring your own weapons. Safety not guaranteed. I have only done this once before.
Reply
#5
I just booted my pc and am now stuck at 48 kHz ... again.
I didn't change anything so I don't know where these inconsistent results come from. Any more ideas?
*WANTED* Someone to go back in time with me. This is not a joke. P.O. Box 91 Ocean View, WA 99393. You'll get paid after we get back. Must bring your own weapons. Safety not guaranteed. I have only done this once before.
Reply
#6
Always verify with aplay -l if card numbers / name has changed.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
That is my current output:

Quote:**** List of PLAYBACK Hardware Devices ****
card 0: STX [Xonar STX], device 0: Multichannel [Multichannel]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: STX [Xonar STX], device 1: Digital [Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
Subdevices: 1/1
Subdevice #0: subdevice #0

So it is still named "STX". As I wrote above I chose the alias because sometimes the order of my cards is switched. If I could get it working I could compare it against this post.

What I did now: disabled fastboot and the CPU / HDMI Audio device in the UEFI - to no avail.
*WANTED* Someone to go back in time with me. This is not a joke. P.O. Box 91 Ocean View, WA 99393. You'll get paid after we get back. Must bring your own weapons. Safety not guaranteed. I have only done this once before.
Reply
#8
FWIW I don't think this is just a Xonar STX issue.

I can reproduce with both mobo sound and headphone USB DAC/amp.

Works with other players.

Seems that kodi/alsa just lists 48k for the raw devices and nothing else is tried.

Selecting surround2.1 in kodi for my mobo (which does list all rates) and playing a 96k file did result in h/w params of 96k.
Reply
#9
See: f5dcb946f88fa13b7681bf6bcbd8870ab87f8054 and think about it.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#10
"If dmix is not wanted, the user should not have it enabled in the first place."

Unless it is enabled by default I don't think I am using it.

This is LFS - I guess I would have to try, but then I don't know that.

The only thing I have in /etc/asound.conf is

pcm.!default { type hw card C20 }
ctl.!default { type hw card C20 }

No ~/.asoundrc while testing this though I sometimes use various ones with a plughw to work around browsers/sdl.
Reply
#11
(2016-05-27, 16:39)AndyFurniss Wrote: FWIW I don't think this is just a Xonar STX issue.

I can reproduce with both mobo sound and headphone USB DAC/amp.

What Headphone AMP/DAC Combo are you using?
I thought I could work around this issue by using my Dr. DAC Prime ...
*WANTED* Someone to go back in time with me. This is not a joke. P.O. Box 91 Ocean View, WA 99393. You'll get paid after we get back. Must bring your own weapons. Safety not guaranteed. I have only done this once before.
Reply
#12
It's a Cambridge Audio <something> :-)

Edit: Cambridge Audio DacMagic lol I was rushed earlier it was under the headphones and I couldn't remember the name - it says on the front :-)

Anyway I don't know whether this is peculiar to my "no configs" setup, but I have a workaround.

For me alsa or kodi is reading the rather large /usr/share/alsa.conf template which contains -

defaults.pcm.dmix.max_periods 0
defaults.pcm.dmix.rate 48000
defaults.pcm.dmix.format "unchanged"
defaults.pcm.dmix.card defaults.pcm.card
defaults.pcm.dmix.device defaults.pcm.device

Changing

defaults.pcm.dmix.rate 48000

to

defaults.pcm.dmix.rate "unchanged"

fixes the issue.
Reply
#13
(2016-05-27, 18:55)AndyFurniss Wrote: Changing

defaults.pcm.dmix.rate 48000

to

defaults.pcm.dmix.rate "unchanged"

fixes the issue.

Tried that, works for me too Wink
Thanks a lot!

I'm just curious if there are any disadvantages to this method ...
*WANTED* Someone to go back in time with me. This is not a joke. P.O. Box 91 Ocean View, WA 99393. You'll get paid after we get back. Must bring your own weapons. Safety not guaranteed. I have only done this once before.
Reply
#14
You are audiophiles - you will hear the issues right away for sure :-)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
missing samplerates on Asus Xonar Essence STX sound card0