jjalling / squeezelite

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

Squeezelite not outputing sound on kindle. #63

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've been trying to get squeezelite running on my kindle.  It's just a standard 
armv6 with alsa.

I can get audio output from the kindle if I run squeezelite like this:

./squeezelite-armv6 -d all=info -n "kindle" -s 192.168.128.132 -o - -r 48000 | 
aplay -f dat

aplay -f dat outputs (16 bit little endian, 48000, stereo)
but it's very slow.  I can get audio out if I just pipe urandom to aplay also.  
I also know that squeezelite is grabbing audio output because other audio (like 
aplay or kindle audio) stops and complains about not getting the device.

Here's the output from the above command that plays slowly (1/2 or more time, 
distorted voices, etc):
sh-4.2# ./squeezelite-armv6 -d all=info -n "kindle" -s 192.168.128.132 -o - -r 
48000 | aplay -f dat
[15:48:06.889840] stream_init:264 init stream
[15:48:06.917203] output_init_stdout:125 init output stdout
[15:48:06.919544] output_init_common:394 supported rates: 48000 44100 32000 
24000 22500 16000 12000 11025 8000 
[15:48:06.937401] decode_init:129 init decode
[15:48:06.940397] load_faad:610 loaded libfaad.so.2
[15:48:06.943732] load_vorbis:279 dlerror: libvorbisidec.so.1: cannot open 
shared object file: No such file or directory
[15:48:06.971211] load_flac:258 loaded libFLAC.so.8
[15:48:06.973128] register_pcm:382 using pcm
[15:48:06.976005] load_mad:351 loaded libmad.so.0
Playing raw data 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
[15:48:06.997643] slimproto:787 connecting to 192.168.128.132:3483
[15:48:07.003322] slimproto:817 connected
[15:48:07.005167] sendHELO:117 mac: 28:ef:01:xx:xx:xx
[15:48:07.007217] sendHELO:119 cap: 
Model=squeezelite,ModelName=SqueezeLite,AccuratePlayPoints=1,HasDigitalOut=1,Max
SampleRate=48000,aac,flc,aif,pcm,mp3
[15:48:07.019076] decode_flush:188 decode flush
[15:48:07.020903] output_flush:407 flush output buffer
[15:48:07.026349] decode_flush:188 decode flush
[15:48:07.028393] output_flush:407 flush output buffer
[15:48:09.320797] decode_flush:188 decode flush
[15:48:09.320987] output_flush:407 flush output buffer
[15:48:09.324295] codec_open:211 codec open: 'f'
[15:48:09.324710] stream_sock:352 connecting to 192.168.128.132:9000
[15:48:09.331394] stream_sock:381 header: GET 
/stream.mp3?player=28:ef:01:xx:xx:xx HTTP/1.0

[15:48:10.143970] stream_thread:150 headers: len: 118
HTTP/1.1 200 OK
Server: Logitech Media Server (7.8.0 - 1395409907)
Connection: close
Content-Type: audio/x-flac

[15:48:10.389489] write_cb:116 setting track_start
[15:48:10.479223] _output_frames:59 start buffer frames: 40960
[15:48:10.479480] _output_frames:140 track start sample rate: 44100 
replay_gain: 0

Here's the output from squeezelite when it's just normal:
./squeezelite-armv6 -d all=info -n "kindle" -s 192.168.128.132 -r 48000
[15:49:16.509584] stream_init:264 init stream
[15:49:16.537212] output_init_alsa:636 init output
[15:49:16.538885] output_init_alsa:658 requested alsa_buffer: 40 alsa_period: 4 
format: any mmap: 1
[15:49:16.541187] output_init_common:394 supported rates: 48000 44100 32000 
24000 22500 16000 12000 11025 8000 
[15:49:16.631086] output_init_alsa:670 memory locked
[15:49:16.689508] output_thread:465 open output device: default
[15:49:16.694540] alsa_open:234 opened device default using format: S32_LE 
sample rate: 44100 mmap: 1
[15:49:16.696095] alsa_open:313 buffer: 40 period: 4 -> buffer size: 1764 
period size: 441
[15:49:16.702544] decode_init:129 init decode
[15:49:17.212135] load_faad:610 loaded libfaad.so.2
[15:49:17.272052] load_vorbis:279 dlerror: libvorbisidec.so.1: cannot open 
shared object file: No such file or directory
[15:49:17.319510] load_flac:258 loaded libFLAC.so.8
[15:49:17.321433] register_pcm:382 using pcm
[15:49:17.324387] load_mad:351 loaded libmad.so.0
[15:49:17.407515] slimproto:787 connecting to 192.168.128.132:3483
[15:49:17.418716] slimproto:817 connected
[15:49:17.420354] sendHELO:117 mac: 28:ef:01:xx:xx:xx
[15:49:17.421891] sendHELO:119 cap: 
Model=squeezelite,ModelName=SqueezeLite,AccuratePlayPoints=1,HasDigitalOut=1,Max
SampleRate=48000,aac,flc,aif,pcm,mp3
[15:49:17.677903] codec_open:211 codec open: 'f'
[15:49:17.678696] stream_sock:352 connecting to 192.168.128.132:9000
[15:49:17.688772] stream_sock:381 header: GET 
/stream.mp3?player=28:ef:01:xx:xx:xx HTTP/1.0

[15:49:17.848030] stream_thread:150 headers: len: 118
HTTP/1.1 200 OK
Server: Logitech Media Server (7.8.0 - 1395409907)
Connection: close
Content-Type: audio/x-flac

[15:49:18.068590] write_cb:116 setting track_start

I never seem to get the _write_frames.

The closest I can get to actual speed with good quality is saying that it's 4 
channels of input with 16 bit little endian:
aplay -f S16_LE -r 44100 -c 4

Either way, I can't figure out what's wrong and assume that the delay 
associated with aplay may be messing up the synchronization.

Original issue reported on code.google.com by rand...@mason.ch on 27 Mar 2014 at 2:19

GoogleCodeExporter commented 8 years ago
Have you tried with mmap disabled for squeezelite (aplay will default to this)

-a ::16:0

Also try with the output device named using the -o option using hw:CARD=XXXXXX 
where XXXX is the card name.

Original comment by trio...@btinternet.com on 27 Mar 2014 at 9:16

GoogleCodeExporter commented 8 years ago
The -a ::16:0 solved the problem.  I should have noted that I had tried various 
versions of the -o option and had similar results.

Also, this fixed all of my sync issues too, so I think the pipe to aplay was 
delaying things about .58 seconds.

Original comment by rand...@mason.ch on 28 Mar 2014 at 1:55

GoogleCodeExporter commented 8 years ago

Original comment by trio...@btinternet.com on 28 Mar 2014 at 6:20