Closed benhornshaw closed 5 years ago
Hi Ben. Thanks for the post. Just for clarification, could you share your ALSA backend setting please? Also, does this happen repeatably – would there be a track or clip I could try?
Mike
Hi Thanks for your reply. So i know just enough about linux to be dangerous. So could you elaborate on how/what backend ALSA settings you would like me to send you please?
Also it happens on all tracks and all the time. But the one i notice it the most on is: https://www.youtube.com/watch?v=IkUKFdacHvo when the Bass kicks in at 23s. Literally i put the volume fader in iTunes to 99% and it stops.
I took a little recording: https://www.dropbox.com/s/duq3rzidibr54zg/Squelch.m4a?dl=0
Ok interestingly I just made my laptop output airplay and played that track from youtube at the loudest volume and nothing. So it seems its completely related to playback from iTunes. It doesn't matter the track. iTunes 12.3.2.35 Its like a clipping noise
Thanks Ben
Usually you can tweak audio settings for ALSA graphically using the alsamixer
command. Back off the volume in there and see if it helps. Just bear in mind that the Pi's own internal audio system is absolutely terrible - use a USB alternative or one of the fancy shields if you're at all bothered about audio quality. There are many threads discussing why the on-board sound is so bad on their forums.
Thanks birdslikewires for your comment. Unfortunately I am already doing all that you suggest. I have a USB sound card and yes it is much better and as i mentioned in my initial post if i use alsamixer then all that happens is the squelch gets quieter. It doesn't stop. Thanks
Thanks for the information, Ben. What I meant by "ALSA backend settings" was just the settings in the alsa
stanza of the configuration file /etc/shairport-sync.conf
, or the command-line settings if you are using them. For example, you might have:
// Back End Settings
// These are parameters for the "alsa" audio back end, the only back end that supports synchronised audio.
alsa =
{
output_device = "hw:0"; // the name of the alsa output device. Use "alsamixer" or "aplay" to find out the names of devices, mixers, etc.
mixer_control_name = "PCM"; // the name of the mixer to use to adjust output volume. If not specified, volume in adjusted in software.
// mixer_device = "default"; // the mixer_device default is whatever the output_device is. Normally you wouldn't have to use this.
// audio_backend_latency_offset = 0; // Set this offset to compensate for a fixed delay in the audio back end. E.g. if the output device delays by 100 ms, set this to -4410.
// audio_backend_buffer_desired_length = 6615; // If set too small, buffer underflow occurs on low-powered machines. Too long and the response times with software mixer become annoying.
};
It's a very clear phenomenon, whatever the cause of it!
Hi Mike All i do is start Shairport as a Daemon. No command line settings and Everything in the conf file is commented out.
// Back End Settings
// These are parameters for the "alsa" audio back end, the only back end that supports synchronised audio.
alsa =
{
// output_device = "default"; // the name of the alsa output device. Use "alsamixer" or "aplay" to find out t$
// mixer_control_name = "PCM"; // the name of the mixer to use to adjust output volume. If not specified, vol$
// mixer_device = "default"; // the mixer_device default is whatever the output_device is. Normally you would$
// audio_backend_latency_offset = 0; // Set this offset to compensate for a fixed delay in the audio back end$
// audio_backend_buffer_desired_length = 6615; // If set too small, buffer underflow occurs on low-powered ma$
};
Thanks
I haven't forgotten this – I'll get to it, I promise.
Thanks Mike I have been doing some more testing into this. It seems like it is totally iTunes. Doesn't happen with any other airplay client. I had an equalizer turned on. it i flatten that and turn it off it greatly reduces it and if i bring the pre amp down to -5db then it fixes the problem. so thats how i'm running at present. Don't know if that helps. Thanks again
Hi there! I'm experiencing this issue on a Rasperry Pi 3 B runnning Jessie. At first I thought it was the poor quality of the built-in 3.5mm jack, so I bought an Audioquest Dragonfly Black (v1.5). Still experiencing the issue with the Dragonfly, I changed the init.d script to specify the hardware mixer on the DAC, but that resulted in absolutely no change in behavior. I also tried adjusting the PCM volume in alsamixer all the way down to -16db, and tried reducing the volume in iTunes to about the half-way mark. None of this has helped. I don't experience any sort of distorted output when the Dragonfly is connected to either my MacBook Pro or my iPhone. What I hear is basically a static/crunch noise on on certain transients (especially noticeable with heavy bass), so I'm assuming it's some sort of clipping that's occurring in the digital domain.
Hi there. Thanks for the post. It seemed to me that the OP's problem was caused by the equaliser, that thee settings were causing digital clipping in the output. It it possible that you have an equaliser setting turned on – look for the EQ setting in the Music app in iOS or the Equalizer window in iTunes? I'd really like to track this down...
Hello! No equalizer here.
Thanks. Would you have a particular track that highlights the problem?
Certainly. This doesn't happen with every track, but I've verified that it can happen on both ALAC files that I've ripped from my own CD collection, and from 256k AAC files from the iTunes store. A particularly strong example "#1 Thing (Radio Edit)" by Amerie. If you have access to it, the CD release of "4th of July" by Kelis is an even stronger example, but the version on the iTunes Store seems to have been mastered with more dynamic headroom than the CD version, and doesn't distort in the same way.
By the way, I'm not sure if this is going to be helpful or not, but I just installed the most recent build of OSMC on the pi, and it doesn't exhibit this distortion on AirPlay streaming. So there might be something in their code that can help get to the bottom of this.
That is interesting alright. What do they use, I wonder? Also, BTW, what version of Shairport Sync are you using? Also [2], could you send me a sample track?
There have been quite a few updates since this issue was raised, and it may well be that it's been fixed. So, closing the issue. Please open a new one if necessary.
Hi Firstly Thank you for your amazing work. I have shairport-sync all up and running and have written a metadata reader that works nicely. So Thanks
The only issue i have is that if i play a song from my itunes to the Raspberry pi at full volume on itunes i get a squelch, especially if the track has heavy bass.
It doesn't seem to matter on the sound card on the raspberry pi as i have tried but the internal one and and now using a USB one and if i turn the raspberry pi volume down in aslamixer the squelch just gets quieter. But if i back off the volume in itunes by only a tiny bit then it disappears and playback if perfect.
So what i am asking is, is there a way, like you have written already to limit the bottom of the volume. To limit the top slightly. Or can i just tweak something so it never goes that loud.
Thanks
Ben