Bit Perfect Audio from Linux
Jun 29, 2017 at 3:17 AM Post #454 of 543
Why do you need to modify the .asound?
It is not strictly needed, at least for a bitperfect configuration.
I have mpd also running on my desktop PC so mpd starts as a user process. As long as this process reads a correct conf file, you need to set something like

Code:
"hw:DAC,0"

on your alsa output device, if your dac is named DAC of course.

Also make sure mpd uses the current user. This should mean comment the configuration entry or set it to your login username.

Hope this helps
 
Last edited:
Jun 29, 2017 at 9:51 AM Post #455 of 543
I do not know, I thought we had to edit ".asoundrc" because it says in the page I gave, and you told me there was no need to Edit it if I use the configuration in "/etc/mpd.conf" (so the general config), but I use it in my home so I always thought it was necessary to edit the asoundrc

So if I have several SACs I add several entries ?

Thanks
 
Jun 29, 2017 at 11:58 AM Post #456 of 543
There are situations where you need a .asoundrc (or at system level, a /etc/asound.conf).
But it's not strictly necessary if you simply want to configure one or more alsa output on mpd.
Yes of course you may configure more output.

The list of sound devices is given by the command posted before.

Let me know if you need more information, I will try to help.
 
Jul 5, 2017 at 8:43 PM Post #457 of 543
In my file "mpd.conf", I have a section like this:

audio_output {
type "alsa"
name "My ALSA Device"
device "hw:0,0" # optional
# format "44100:16:2" # optional
mixer_type "hardware" # optional
mixer_device "default" # optional
mixer_control "Master" # optional
mixer_index "0" # optional
}


So I have to copy this section several times for each dac?
 
Last edited:
Jul 6, 2017 at 12:17 PM Post #458 of 543
Exactly.
You might want to also use different names so you can easily select your output configuration in your mpd client.

Also consider using device names instead of device numbers.

Hope this helps
 
Jul 6, 2017 at 2:11 PM Post #459 of 543
Thank you so much for your help


I think it's better to put the name in the "device" part instead of the device number?

For find the name i think it's with the aplay-l command but i don't know where is the name and how to know if it works

In the "name" part I put the name I want, for example "The name of my dac", or the real name for example "STX"?

I can not understand the parts "mixer_device" "mixer_control" and "mixer_index", could someone help me?
 
Last edited:
Jul 7, 2017 at 4:07 AM Post #460 of 543
the two commands are pretty much equivalent:

Code:
giof71@desktopmusicplayer:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: x20 [xCORE USB Audio 2.0], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
giof71@desktopmusicplayer:~$ cat /proc/asound/cards
 1 [x20            ]: USB-Audio - xCORE USB Audio 2.0
                      XMOS xCORE USB Audio 2.0 at usb-0000:00:1d.7-1.1, high speed

In your case I think you have a Asus Xonar Essence ST(X) as I also have on my desktop pc, if so the name of the dac it STX.
From my mpd.conf:

audio_output {
type "alsa"
name "STX"
auto_resample "no"
device "hw:STX,1"
}

In my case I use STX,1 because I have a DAC connected to the STX digital output. If you use its analog output, just write "hw:STX,0".
There is no particular need to specify the other parameters in the output configuration, but I am no expert.
OTOH, I let MPD set the volume via software. Just enable the global parameter:

mixer_type "software"

but keep in mind that if you use a volume under 100%, this in some ways degrades the sound quality. So do not digitally lower you volume if you also have an analog volume control in your signal path.
Though it might be useful if you want to connect active speakers directly to your analog output.
This is quite a dangerous setup if you ask me, but feasible. One needs to be extra careful the volume is not @ 100% when the active speakers are powered.
Of course if you have a volume control in your DAC or amp/preamp, you can safely disable mixer_type.
 
Jul 7, 2017 at 7:53 PM Post #461 of 543
Thanks for your help, so I have an asus STX, and a USB DAC, there I configured my USB DAC, however for the mixer I put hardware because the software is not bit-perfect like Indicated on the site MPD

So if I understand correctly, you use the RCA output of your STX or another output? And you put STX, 1 because you do not use the STX DAC? But what is the use of STX then?

When I lower the volume in my player, the sound does not move so I guess it's bit-perfect, but in deadbeef the volume drops even when choosing alsa, so I do not know how to do

In deadbeef I did a test with the sound card of the PC, I have "default audio device" and "front speakers", even if I put front speakers, the sound in the headphones works but with front speakers :
Code:
 cat /proc/asound/card0/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 1024
buffer_size: 8192

And with default output device :

Code:
cat /proc/asound/card0/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S32_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 1024
buffer_size: 16384

In alsamixer, for the DAC I have mounted and lowered the volume but nothing moves in reading so it must be really bit-perfect, well I do not know

So the name of your card is x20, right? I do not understand why you put STX of the blow
 
Last edited:
Jul 8, 2017 at 4:58 AM Post #462 of 543
Hello, I understand my post might be confusing. Let me explain my desktop setup.
I have a regular desktop PC with Linux Mint 18.2 as well as a dedicated low power box with an Atom D510 with ubuntu server 16.04.
I named the latter "desktop media player".

Both have mpd and upmpdcli installed, although in with different configurations.
On the DesktopMediaPlayer, mpd and upmpdcli working as services.
On the PC, they run in the user session.

The desktop media player (dmp from now on) is connected via USB to a Gustard U12 (a USB DDC interface), which is the device named 'x20'.
The Gustard U12 is connected to the Gustard X12 DAC via I2S (through a HDMI cable).
The Gustard X12 DAC is also connected to the desktop pc via both USB and the optical output of the xonar essence stx.
Of course with this configuration I am not really using the DAC section of the STX. The Gustard X12 DAC fed by the digital output of the STX sound better than the STX's DAC. And, I can also decode DSD (using DSD over PCM) with this connection, a thing the STX's DAC cannot do.

This is the main reason I still use the STX over the onboard spdif. The onboard spdif does not 88.2kHz and 176.4kHz. I do not have a lot of content with that sampling rate, but I have some DSD albums which are in fact streamed to the dac as 24bit/176.4 (dop). The onboard spdif can't do that, the STX can.

Also, I prefer this configuration over the USB connection to the X12 because it seems to me it sounds better, although the spdif input does not support sampling rates over 192kHz. The I2S and the USB support up to 352.8/384kHz, useful if one want to do some upsampling.

Of course the desktop music player, with its dedicated digital-to-digital converter (the gustard U12) and the I2S connection to the Gustard X12 is currently my best configuration.
The desktop pc is good enough for casual listening like, for example, listening to a webradio through the browser, spotify, etc etc.

Hope this clarifies!

Cheers
 
Last edited:
Jul 8, 2017 at 6:02 PM Post #463 of 543
Thank you for your help, I learn a lot with you, so if I understand correctly :

The dmp is USB connected to the U12, which is connected to the X12, and the X12 is connected to the desktop via the S / PDIF

You tell me optical, but it's S/PDIF no? I do not see any optical output

So by putting STX,1 it asks the STX not to decode, and to send in S/PDIF ? But how did you adjust the s / pdif output?

What is I2S? I have a raspberry pi, for me I2S it's the pins but there it does not look like it

Does S/PDIF not support the sampling rates of 88.2 and 176 kHz? I did not know

Here i see a review of the card : http://www.hdfever.fr/2012/02/24/test-asus-xonar-essence-stx/comment-page-6/

He say : Port S/PDIF : connexion à la carte graphique compatible via le port HDMI
It's an error, no ?

You advise me what for Deadbeef outings? I have several as indicated
 
Last edited:
Jul 8, 2017 at 7:17 PM Post #464 of 543
@Kantilo The ASUS® XONAR® Essence™ Series uses an RCA jack with integrated optical transmitter for the S/P-DIF Digital Output; load may be coaxial (RCA plug) or optical (3.5mm TOSLINK adapter).
 

Users who are viewing this thread

Back
Top