Skip to content

Conversation

@ArkinSolomon
Copy link
Contributor

Only the pin could be overridden for pico_audio. This PR allows overriding other parts of the default configuration, so that the state machine # and DMA channels can be modified at compile time. It does not make sense for only one part of the default configuration to be overridden.

@lurch
Copy link
Contributor

lurch commented Apr 1, 2025

Rather than configuring explicit PIO and DMA numbers, I wonder if it might be better to update this to use the newer "claim" API functions, e.g. pio_claim_free_sm_and_add_program and dma_claim_unused_channel ?

@ArkinSolomon
Copy link
Contributor Author

Agreed, but I don't think we should get rid of this function for libraries that depend on the older API. Those should be new functions. Or maybe we claim unused if you pass in NULL for the config?

@lurch
Copy link
Contributor

lurch commented Apr 1, 2025

The code in pico-extras is "experimental, use at your own risk", so I'm not sure if we need to worry about maintaining compatibility with an "older API" ? (but this is more of a @kilograham decision)

@kilograham kilograham merged commit 77c3d5e into raspberrypi:develop Apr 2, 2025
ArkinSolomon added a commit to ArkinSolomon/pico-extras that referenced this pull request Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants