pzyvbv wrote:
> I installed the applet and all seemed to be okay , but I recently tried
> to play an mp3 audio track with a sample rate of 22050Hz and it just
> refused to play with a buffer size of 30ms. In fact it crashed the
> player which became unresponsive and eventually rebooted.
>
> Track plays without the applet installed, with the applet installed and
> set to 20ms (default) and also when set to 40ms.
>
I have replicated your findings both with an mp3 and a flac file at
22050Hz. The problem seems to be that the alsa sub-system chokes on this
particular combination, and fails to initialize. In consequence,
-jive_alsa- fails and terminates. The watchdog notices that after a
while, and reboots the machine. I've appended a relevant trace from
squeezeplay's log below.
I am a little surprised, as the buffer size of 30ms was the default used
in the firmware prior to product launch, and before a "Real Time" linux
was adopted. So one might have expected the issue to have been spotted
during initial testing.
My initial guess as to the underlying issue is that there may be an
integer/rounding issue lurking within the alsa library. It would take
some further investigation to establish that for certain.
Reasoning:
At a sample rate of 44,100, a 20ms buffer comprises, in total,
882 samples. 30ms comprises 1,323 samples, 40ms comprises 1,764
samples.
At a sample rate of 22,050, a 20ms buffer comprises, in total, 441
samples. 30ms comprises *661.5* samples, 40ms comprises 882 samples.
Note the fractional part. I would expect the alsa library to round down
the buffer sizes to some suitably close integer. But it seems to have
given up instead !
Of course, the problem may be more intricate than my guess.
Code:
--------------------
Jan 15 14:55:12 squeezeplay: INFO audio.decode - decode_start_handler:279
init decoder flc
Jan 15 14:55:12 squeezeplay: INFO audio.decode - Playback.lua:476 connect
192.168.1.182:9000 GET /stream.mp3?player=00:04:20:29:a4:29 HTTP/1.0^M
Jan 15 14:55:15 squeezeplay: _pcm_open:646 Unable to set buffer time Invalid
argument
Jan 15 14:55:15 squeezeplay: pcm_close:536 snd_pcm_drain error: Input/output
error
Jan 15 14:55:15 squeezeplay: _pcm_open:646 Unable to set buffer time Invalid
argument
Jan 15 14:55:15 squeezeplay: audio_thread_execute:830 Playback open failed:
Invalid argument
--------------------
I'll have to see if there is some other reasonable combination that can
work for all sample rates encountered, in place of 30ms.
------------------------------------------------------------------------
mrw's Profile: http://forums.slimdevices.com/member.php?userid=38299
View this thread: http://forums.slimdevices.com/showthread.php?t=104141
_______________________________________________
Radio mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/radio