From ce191327e87756981374ad83d2ce202baf38f5b6 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 8 Feb 2022 10:10:02 -0600 Subject: [PATCH] RP2040 PDMIn frequency based on sample rate --- ports/raspberrypi/common-hal/audiobusio/PDMIn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c index 7142306015..4b5694706f 100644 --- a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c +++ b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c @@ -64,7 +64,7 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t *self, // Use the state machine to manage pins. common_hal_rp2pio_statemachine_construct(&self->state_machine, pdmin, sizeof(pdmin) / sizeof(pdmin[0]), - 44100 * 32 * 2, // Clock at 44.1 khz to warm the DAC up. + sample_rate * 32 * 2, // Frequency based on sample rate NULL, 0, NULL, 1, 0, 0xffffffff, // out pin data_pin, 1, // in pins