Closed dseven closed 7 years ago
You are trying to execute a 32-bit Intel binary on tour Raspberry Pi, that won't work
@tehmaze is correct. Please download and use the ARM binary from the release page. If you then still have problems, feel free to open another issue!
I guess neither of you read the output of the "file" command ... or I'm losing it....
Right - sorry. In principal it should work. I compiled the binary on a Raspberry Pi 3. Did you compile the binary (if - which version of Go did you use) or did you download the compiled binary?
I downloaded https://github.com/dh1tw/remoteAudio/releases/download/v0.1.2/remoteAudio-v0.1.2-linux-arm.tgz . I suspect that the Raspberry Pi 3 uses a newer version of the ARM instruction set, and the binaries may be incompatible. I'll try to find time to get a development environment together. I did get the x86_64 build to work between a couple of boxes running Fedora at home, but not sure I want to dedicate either of them to the "hilltop end" for a real remote trial - the Pi is not doing anything, so it'd be nice if that could be made to work..
I know that Go 1.9 will drop support for older ARM Platforms, but it could indeed be possible that there have been changes in the ARM instruction sets between Raspi (Model B) and Raspi 3. I unfortunately don't have an Raspberry Pi 1 anymore in order to give it a try. But it should be possible to get remoteAudio compiled on the Raspi 1 - at least with Go 1.7 / 1.8rc.
Please let me know if you need assistance during the build process!
I got go 1.7.5 installed on the Pi, but hit a wall trying to build protobuf - it's failing when trying to link libprotobuf.so with no useful error message - only "ld returned 1 exit status". It's starting to feel like more trouble than it's worth. Maybe I'll find more enthusiasm another day.... UPDATE: looks like I ran out of "disk" space. Will probably have to start over with a larger SD card (another day).
Well, I got it to build (protobuf took hours). Now to get it to open an input device ....
root@raspberrypi:~# remoteAudio enumerate
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Available audio devices and supported Host APIs:
Detected 2 host API(s):
Name: ALSA
Default input device: iMic USB audio system: Audio (hw:1,0)
Default output device: default
Devices:
Name: bcm2835 ALSA: - (hw:0,0)
MaxInputChannels: 0
MaxOutputChannels: 2
DefaultLowInputLatency: -1s
DefaultLowOutputLatency: 5.804988ms
DefaultHighInputLatency: -1s
DefaultHighOutputLatency: 34.829931ms
DefaultSampleRate: 44100
Name: bcm2835 ALSA: IEC958/HDMI (hw:0,1)
MaxInputChannels: 0
MaxOutputChannels: 2
DefaultLowInputLatency: -1s
DefaultLowOutputLatency: 5.804988ms
DefaultHighInputLatency: -1s
DefaultHighOutputLatency: 34.829931ms
DefaultSampleRate: 44100
Name: iMic USB audio system: Audio (hw:1,0)
MaxInputChannels: 2
MaxOutputChannels: 2
DefaultLowInputLatency: 8.684807ms
DefaultLowOutputLatency: 8.707482ms
DefaultHighInputLatency: 34.829931ms
DefaultHighOutputLatency: 34.829931ms
DefaultSampleRate: 44100
Name: sysdefault
MaxInputChannels: 0
MaxOutputChannels: 128
DefaultLowInputLatency: -1s
DefaultLowOutputLatency: 5.804988ms
DefaultHighInputLatency: -1s
DefaultHighOutputLatency: 34.829931ms
DefaultSampleRate: 44100
Name: default
MaxInputChannels: 0
MaxOutputChannels: 128
DefaultLowInputLatency: -1s
DefaultLowOutputLatency: 5.804988ms
DefaultHighInputLatency: -1s
DefaultHighOutputLatency: 34.829931ms
DefaultSampleRate: 44100
Name: dmix
MaxInputChannels: 0
MaxOutputChannels: 2
DefaultLowInputLatency: -1s
DefaultLowOutputLatency: 21.333333ms
DefaultHighInputLatency: -1s
DefaultHighOutputLatency: 21.333333ms
DefaultSampleRate: 48000
Name: OSS
Devices:
root@raspberrypi:~# remoteAudio server mqtt -u nuc -X N6ML -U pi-server -i 'iMic USB audio system: Audio (hw:1,0)'
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
2017/02/07 21:22:19.332379 Connected to MQTT Broker nuc:1883
OutputUnderflow
unable to open recording audio stream on device iMic USB audio system: Audio (hw:1,0)
invalid StreamCallback
Got it sortof working (by not trying to specify the input device) ... but showing high latency on the client (which is the x86_64 box that was working well in previous test, on the same LAN) - 200-400ms, getting jitter, and lots of "InputOverflow" reports on the (Pi) server. Maybe the Pi 1 is not up to the task :/
Hey,
all the alsa warnings you see are not critical. If you want to remove them you have to remove or uncomment them in /usr/share/alsa/alsa.conf
. If no input/output sound device is specified to remoteAudio, then the default card will be used. In your case it seems to point to the built-in bcm2835.
You can explicitly set the default soundcard by adding $HOME/.asoundrc
pcm.!default {
type hw
card 1
device 0
}
ctl.!default {
type hw
card 1
device 0
}
This requires a reload of Alsa or a simple restart of the Raspberry Pi.
Have you checked the CPU usage on the PI with something like htop
or top
?
With which version of Go did you compile remoteAudio? 1.7 or 1.8rc ?
OutputOverflows mean that portaudio/alsa was not able to write the data in time to the sound card. This might be an issue of not enough CPU power available. That could also be the reason for the extremely high latency. I have on a local network a latency of 1ms with a Raspi 3.
Have you tried to increase the rx buffer size?
Should the v0.1.2 ARM build run on a Raspberry Pi B+ ? I get: