We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86bb6db commit c95cbeaCopy full SHA for c95cbea
ports/raspberrypi/common-hal/audiobusio/PDMIn.c
@@ -64,7 +64,7 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t *self,
64
PIO_FIFO_TYPE_DEFAULT,
65
PIO_MOV_STATUS_DEFAULT, PIO_MOV_N_DEFAULT);
66
uint32_t actual_frequency = common_hal_rp2pio_statemachine_get_frequency(&self->state_machine);
67
- if (actual_frequency < MIN_MIC_CLOCK) {
+ if (actual_frequency < 2 * MIN_MIC_CLOCK) { // 2 PIO samples per audio clock
68
mp_raise_ValueError(MP_ERROR_TEXT("sampling rate out of range"));
69
}
70
0 commit comments