Closed raspbeguy closed 7 years ago
Thanks for the post. Looking at the manual for your device, on page 18 it looks like it does not accept 16/44100. Try setting Shairport Sync to 24 bit output in the configuration file.
It does accepts 16/44100, it works perfectly with MPD.
Anyway, I changed the setting from S16
to S24
as you asked and it doesn't work better. Now I have this error (6 instead of 2):
mars 26 08:42:03 mpdpi shairport-sync[2756]: audio_alsa: Sample format 6 not available for device "hw:1,0": Invalid argument
Thanks for the update. The thing is, MPD may be resampling the material to suit the output device, so just because MPD accepts 16/44100 material, it does not mean that that's what it sends to the device. A way to check whether the device accepts 16/44100 is to try using aplay
with a 16/44100 sample.
In the manual, in USB 1.0 mode (which I think is the default for Linux), it says 24 bit. There are a number of 24 bit formats – have you tried them all?
Thanks for your answer. No, MPD isn't resampling anything, I disabled it, so MPD sends unaltered data to the DAC. This might be slightly out of topic, but here is my mpd config:
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:CARD=C1,DEV=0"
mixer_type "none"
auto_channels "no"
auto_format "no"
auto_resample "no"
}
Besides I can also check this by running the following command:
cat /proc/asound/card1/pcm0p/sub0/hw_params
I can garantee you that the DAC accepts 16/44100.
Very mysterious! Can you share the output of $ cat /proc/asound/card1/pcm0p/sub0/hw_params
please?
Just FYI, another user had a similar problem, though with a different card, in issue #463.
Also, when you look at it with alsamixer
, what device number does it give you?
I'm very sorry, it seems that once more I spoke without being sure at 100%. Actually you seem to be right. MPD is sending S24_3LE audio to the DAC, I don't know why. I set it up in shairport-sync and it is now working. I'm concerned by those results though. It leads me to 3 problems:
Anyway, that's not a problem related to shairport-sync (but if have a response I would appreciate it).
Thanks for the reply, and it's good to get to the the source of the issue.
To address your problems:
What I mean is the process used by Shairport Sync to keep the audio in sync – basically it inserts or deletes audio frames to keep the output in step when the source and destination sample rates, while nominally the same, are slightly off.
I see. Well, anyway thank you for the help, I guess the ticket can be closed now that the problem has been explained (even if it means more inverstifation for me).
Okay, I'll close this, thanks. If you find anything definitive on the subject of USB Audio 2.0 support in Linux, I'd be glad to hear of it.
Hello, I am unable to use shairport-sync with my external DAC (works on default sound card). I use output device
hw:CARD=C1,DEV=0
(this is set the same way on MPD, which works correctly). I also triedhw:1
andhw:1,0
without success. Whenever I send sound from a iOS device, I've got this output (verbosity set to 1):For info my DAC is a Cambridge DacMagic 100.