section7 / squeezelite

Automatically exported from code.google.com/p/squeezelite
Other
0 stars 0 forks source link

Raspberry Pi: Distorted sound in random intervals for some seconds #88

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
- What steps will reproduce the problem?
Run multiple instances of squeezelite as a daemon, e.g. with an init.d script:
/usr/bin/squeezelite-armv6hf -o sysdefault:CARD=forRoomX -n RoomX -m 
00:00:00:00:00:XX -s 127.0.0.1 -a 80:4:16:0 -f /var/log/squeezeliteX.log -d 
all=info
(Replace X with values 1 - 6. Unfortunately, I cannot say if the problem has 
anything to do with the multiple instances)

- What is the expected output? What do you see instead?
Expected output is clear sound. But in random intervals, you can hear a 
distortion noise (please have a look at the attachment file).
E.g. player 1 is playing an internet radio stream, the other players are 
stopped. After e.g. 20 minutes running the noise might appear for approx. 3 
minutes. Then everything runs fine for another 30 minutes (or even a day), and 
so on.

- What version of the product are you using? On what operating system?
squeezelite-armv6hf binary 1.7 on Raspbian

- Please provide any additional information below.
This issue might be similar to #31, but I am not sure if the authors meant the 
same like this one, so I tried to record the distortion from the audio speakers.
(I just saw in your Changelog that v1.8 is the current version. Would you mind 
publishing it in binary hf format?)

Original issue reported on code.google.com by i...@schaussi.com on 17 Jan 2015 at 9:08

Attachments:

GoogleCodeExporter commented 8 years ago
I suspect this is an alsa audio output problem as it runs fine on pi for others 
for long periods of time.

Try using -o hw:CARD=XXXX as the output device and disabling mmap using -a :::0

v1.8 is work in progress (no date in changelog - won't be available as a binary 
until it is complete)

Original comment by trio...@btinternet.com on 17 Jan 2015 at 9:58

GoogleCodeExporter commented 8 years ago
Thank you for your quick answer.

Unfortunately changing the parameters did not help.

Please listen to distorted2.mp3. The noise appeared after playing a web stream 
for about 2 minutes. After some seconds (about 00:05) everything goes back to 
normal.

At the moment I am running out of ideas how to solve this. I tried changing USB 
sound card, the RPi itself, USB Hub etc. Every piece of software should be up 
to date.

Is there any other thing I could try?

Original comment by i...@schaussi.com on 19 Jan 2015 at 6:55

Attachments:

GoogleCodeExporter commented 8 years ago
Try changing codec - does it also appear on flacs?  If it is mp3 specific, does 
it appear with mad as well as mpg123 codecs?

Original comment by trio...@btinternet.com on 19 Jan 2015 at 7:39

GoogleCodeExporter commented 8 years ago
Have not tried with flacs yet, but changed mp3 codec to mpg instead of mad.

Now there seems to be an encoding problem:
[format.c:269] error: Unable to set up output format! Constraints: 44100, 22050 
or 11025Hz.
Same error appears with 2 web streams and local MP3 files. According to VLC 
player, they are all at 44100 Hz.

Current parameters are:
/usr/bin/squeezelite-armv6hf -o hw:CARD=forRoom1 -n Room1 -m 00:00:00:00:00:11 
-s 127.0.0.1 -a :::0 -e mad -f /var/log/squeezelite.log -d all=info

I attached the log file, please have a look.

Original comment by i...@schaussi.com on 20 Jan 2015 at 10:32

Attachments:

GoogleCodeExporter commented 8 years ago
There is no format.c in squeezelite - this must be coming from the libmpg123?

Suggest trying flac files to prove to yourself that the player and output 
device works, then try to narrow down on how mp3s are decode.

Original comment by trio...@btinternet.com on 20 Jan 2015 at 7:07

GoogleCodeExporter commented 8 years ago
According to http://fossies.org/dox/mpg123-1.21.0/format_8c_source.html, this 
seems to be a libmpg123 file.
Unfortunately, I'm not a C expert, so I could not really get an information 
what causes this error.
If I play an MP3 file via command line "mpg123 test.mp3", it starts without 
problems.

Could there maybe be any incorrect parameter etc. in the squeezelite mpg123 
handler?
Or could it have something to do with alsa-oss? (is also installed anyway)

At the moment I have been playing a list of flac files for some hours, they run 
fine yet. But to be sure if libmad is the cause, I have to run it for some more 
days, and it would be great to get libmpg123 working.

Original comment by i...@schaussi.com on 20 Jan 2015 at 7:52

GoogleCodeExporter commented 8 years ago
Is that file mono or multichannel?  Can you post it or part of it?

Original comment by trio...@btinternet.com on 20 Jan 2015 at 8:36

GoogleCodeExporter commented 8 years ago
This is one of the files I tested, it's a common stereo MP3 file.

Original comment by i...@schaussi.com on 21 Jan 2015 at 1:26

Attachments:

GoogleCodeExporter commented 8 years ago
Update: Today I heard the same noise also with flac files...

Original comment by i...@schaussi.com on 21 Jan 2015 at 3:28

GoogleCodeExporter commented 8 years ago
Sorry don't know what is the output device - there are many people using 
squeezelite on a Pi who don't hear this so there is something specific to your 
application.

Original comment by trio...@btinternet.com on 21 Jan 2015 at 9:27

GoogleCodeExporter commented 8 years ago
The output devices I tested until now were Sound Blaster Play v1 and v2, and a 
noname model.
Today I ordered an Asus Xonar U3 and another USB hub, hopefully it will run 
better with these parts.

However, could you help me with the libmpg123 problem?
If you need more information regarding this, please let me know.

Original comment by i...@schaussi.com on 22 Jan 2015 at 8:06