Closed
Description
CircuitPython version and board name
# Tested without error
Adafruit CircuitPython 9.2.7 on 2025-04-04; Waveshare RP2040-PiZero with rp2040
Adafruit CircuitPython 10.0.0-alpha.2 on 2025-04-04; Waveshare RP2040-PiZero with rp2040
# Tested with error
Adafruit CircuitPython 10.0.0-alpha.2-16-g8f7496c069 on 2025-04-15; Waveshare RP2040-PiZero with rp2040
Code/REPL
# waveshare rp2040-pizero with waveshare audio hat (requires i2c pull-ups)
import time
import board
import digitalio
import audiobusio
import synthio
from adafruit_wm8960 import WM8960
# Configure codec
codec = WM8960(board.I2C(), 11025, 16)
codec.volume = 1.0
codec.headphone = 0.5
codec.speaker = 0.0
# Configure I2S Output
audio = audiobusio.I2SOut(board.GP18, board.GP19, board.GP21) # ADC is GP20
# Setup synthio
synth = synthio.Synthesizer(sample_rate=codec.sample_rate, channel_count=2)
audio.play(synth)
note = synthio.Note(220, panning=-1.0)
while True:
print("note on")
synth.press(note) # midi note 65 = F4
time.sleep(0.5)
synth.release(note) # release the note we pressed
print("note off")
time.sleep(0.5)
Behavior
Traceback (most recent call last):
File "<stdin>", line 21, in <module>
RuntimeError: Unable to allocate buffers for signed conversion
No audio output occurs.
Description
- The source of the error message is
- The error flag likely occurs at
circuitpython/ports/raspberrypi/audio_dma.c
Line 234 in 8f7496c
- The most recent change to the audio DMA is from Add RP2 support for dma_capable #10240. I haven't verified if those changes are definitively the cause of this error.
Additional information
I don't completely understand what's going on in port_realloc
, but the primary difference I can discern against m_realloc
is that is uses tlsf_realloc
instead of realloc
.
Any thoughts on this? @tannewt