0

Stereo Bonnet: Device or resource busy.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Stereo Bonnet: Device or resource busy.

by buzzelljason on Mon Jun 14, 2021 7:29 pm

Hi there! I'm currently making a small piano that can use Pure Data on the RPi 3 to generate its own music, and so I had bought the Stereo Speaker bonnet to drive audio. The only problem is that the RPi is convinced that the device is busy (see photos of VLC and Pure Data); I found only when first booting up the RPi with the standard BCM2835 and then switching does the RPi drive the audio (which sounds great, by the way! No issue there).

The intention is that music should start playing once the power is turned on, so I had added a sudo command to a python patch that will call Pure Data in /etc/rc.local, but that wasn't working so I switched it to /etc/profile. Unfortunately, I need the RPi to set up all the right commands on power up, since I won't be controlling the piano, so I need a solution that doesn't require input after power up!

Thank you to anybody can help or offer suggestions, and let me know if you need any more information!
Attachments
2.png
2.png (941.88 KiB) Viewed 191 times
1.png
1.png (617.98 KiB) Viewed 191 times
Last edited by buzzelljason on Mon Jun 14, 2021 7:34 pm, edited 1 time in total.

buzzelljason
 
Posts: 4
Joined: Mon Jun 14, 2021 7:22 pm

Re: Stereo Bonnet: Device or resource busy.

by buzzelljason on Mon Jun 14, 2021 7:34 pm

I also wanted to add that I am aware of a Pure Data bug that requires the DSP on message to be delayed so the audio hardware is set in time, but that doesn't seem to have an immediate effect (it is added into the patch, though!).

I also have a picture of my setup and wiring, for those who are interested in checking that out! Nothing too complex there.
Attachments
p2.jpg
p2.jpg (747.01 KiB) Viewed 190 times
p1.jpg
p1.jpg (535.48 KiB) Viewed 190 times

buzzelljason
 
Posts: 4
Joined: Mon Jun 14, 2021 7:22 pm

Re: Stereo Bonnet: Device or resource busy.

by adafruit_support_carter on Tue Jun 15, 2021 12:39 pm

Just want to make sure the basic hardware is working as expected? It sounds like it is based on your comment here:
I found only when first booting up the RPi with the standard BCM2835 and then switching does the RPi drive the audio (which sounds great, by the way! No issue there).


So this seems more like a config (software) issue getting things to work with your setup? Pure Data, etc.

Also - that's a really cute little piano build :)

adafruit_support_carter
 
Posts: 20625
Joined: Tue Nov 29, 2016 2:45 pm

Re: Stereo Bonnet: Device or resource busy.

by buzzelljason on Tue Jun 15, 2021 1:47 pm

Yes, I believe this is a software issue! On the occasion that the device is not busy, everything works perfectly, even the speaker-test.

buzzelljason
 
Posts: 4
Joined: Mon Jun 14, 2021 7:22 pm

Re: Stereo Bonnet: Device or resource busy.

by buzzelljason on Thu Jun 24, 2021 2:07 pm

Hi again! A little update on the bonnet: I'm currently not using it anymore because the issue was random and persistent, so I couldn't guarantee for a fact that it would work every time I powered on the device, no matter what I tried. I'd still like to know though why this issue is happening going into the future, in case I decide to use it for a different project! Thanks!

buzzelljason
 
Posts: 4
Joined: Mon Jun 14, 2021 7:22 pm

Re: Stereo Bonnet: Device or resource busy.

by adafruit_support_carter on Thu Jun 24, 2021 5:41 pm

It seems like this is related to something with Pure Data, which we have no direct experience with. In general, it seems like some other process is claiming the device or it's not configured as needed.

adafruit_support_carter
 
Posts: 20625
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.