New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Callback function never called - arm #128
Comments
Ok I gave it a try on a raspberry pi 2, also with arch. I got similar results as the above, but with the PI I'm able to comment out the default audio device in /etc/modules-load.d/raspberrypi.conf (snd-bcm2835), so that there's only the USB audio device when the PI boots. So now aplay only lists the usb device:
The rust program runs normally, with fewer error messages than before, but doesn't make any sound.
I compiled a portaudio example program, and that works - I hear pink noise through headphones on the usb device.
|
Ok it looks like the program never executes the portaudio callback function when running on the PI. Throwing a printf in there results in lots of messages on my laptop, and none on the pi. Progress is made. |
Gave it a try with the sine example, it appears to run normally but no sound. I put a println! in the callback function but it never gets called.
put the println here:
|
@bburdette Thanks so much for this issue and keeping us up to date with your discoveries - it's highly appreciated! I don't have an arm device myself, but am happy to make any fixes or changes you deem necessary to get this working 👍 I'm planning on running this on arm at some point in the near future as well, so I'm keen to do what we can! |
Ok thanks Mitch! If you have any suggestions for things to try, don't hesitate! I'm kind of stuck-ish right now, until I think of another angle. I'll keep you posted. |
Looked at this again today, didn't figure anything out. If you feel like hacking on this I'll be glad to give you a login to my raspberry pi 2. |
Have been thinking about this a little and I'm wondering if your errors are due to us not yet having bindings to the Host-API-specific header for linux alsa? Also, I recently added an example that will enumerate all available Hosts on the system - would be interesting to see what it outputs when running on your R-PI if you happen to get a chance? |
Right now I have the default Pi audio hardware blacklisted, so it only sees the USB audio hardware.
Ok, un-blacklisted the default hardware. Now I get this:
Hope this helps! I haven't had time to look at this lately... |
Hi @mitchmindtree, I'm trying the same sort of thing with my raspberry pi zero, and am having the same issue. I'm using the 'pHAT DAC' from Pimoroni. Using speaker-test produces sound without issue, but like @bburdette, the callback's not getting called. Interestingly, running the test example from portaudio-rs works fine, so looking at the differences between that and your library might help narrow down what the issue is. I'm happy to help out trying to debug this, so let me know if there's anything you want me to test out and I'll let you know how it goes. Don't know if helps, but I've included the output from the hosts example below. Cheers,
|
I forgot to mention, #22 is the tracking issue for adding the platform-specific extensions (I'm guessing the lack of the ALSA extension is what is causing an issue here). |
Hmm looking more closely at One difference is that |
I've had good luck with portaudio-rs on ARM so far, but it only works in debug mode, not release mode. |
for me pull request #152 fixed the issue after i did apply a patch to the pull request itself to make it compile on a 32-bit processor |
I guess this can be marked as resolved now. |
I'm working on getting rust-portaudio to work on my bananapi. On the bananapi I want to ignore the builtin audio devices and use a USB soundblaster instead. I'm able to specify that device using a device index, but I get a lot of error messages concerning the builtin audio device. The results is I don't hear any audio. I'm not sure what the cause might be, though the error messages look suspicious. PortAudio doesn't seem to be too happy.
FWIW, I am able to play audio through the soundblaster using other sound sources on that computer. aplay works, as does supercollider running through jack1.
Output from my test program is below. (portaudio startup is at line 89 in my test program).
And here's output from the 'devices.rs' example:
The text was updated successfully, but these errors were encountered: