|
PebbleOS
|
Microphone implementation for the nRF5 PDM peripheral. More...
Data Structures | |
| struct | MicDevice |
| nRF5 PDM microphone device. More... | |
Macros | |
| #define | PDM_BUFFER_SIZE_SAMPLES (320) |
| Samples per PDM DMA buffer. | |
| #define | PDM_BUFFER_COUNT (2) |
| Number of PDM DMA buffers. | |
| #define | PDM_GAIN_DEFAULT (NRF_PDM_GAIN_DEFAULT) |
| Default PDM gain. | |
| #define | CIRCULAR_BUF_SIZE_MS (320) |
| Preferred length of the queue between DMA and the data handler, in milliseconds. | |
| #define | CIRCULAR_BUF_SIZE_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_SIZE_MS) / 1000) |
| Preferred queue length, in samples. | |
| #define | CIRCULAR_BUF_SIZE_BYTES (CIRCULAR_BUF_SIZE_SAMPLES * sizeof(int16_t)) |
| Preferred queue size, in bytes. | |
| #define | CIRCULAR_BUF_MIN_SIZE_MS (128) |
| Minimum queue length, in milliseconds, accepted when the heap is too fragmented for the preferred one. | |
| #define | CIRCULAR_BUF_MIN_SIZE_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_MIN_SIZE_MS) / 1000) |
| Minimum queue length, in samples. | |
| #define | CIRCULAR_BUF_MIN_SIZE_BYTES (CIRCULAR_BUF_MIN_SIZE_SAMPLES * sizeof(int16_t)) |
| Minimum queue size, in bytes. | |
| #define | CIRCULAR_BUF_STEP_MS (32) |
| Queue shrink per allocation retry, in milliseconds. | |
| #define | CIRCULAR_BUF_STEP_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_STEP_MS) / 1000) |
| Queue shrink per allocation retry, in samples. | |
| #define | CIRCULAR_BUF_STEP_BYTES (CIRCULAR_BUF_STEP_SAMPLES * sizeof(int16_t)) |
| Queue shrink per allocation retry, in bytes. | |
Microphone implementation for the nRF5 PDM peripheral.
| struct MicDevice |
nRF5 PDM microphone device.
SF32LB52 PDM microphone device.
QEMU microphone device.
| #define CIRCULAR_BUF_MIN_SIZE_BYTES (CIRCULAR_BUF_MIN_SIZE_SAMPLES * sizeof(int16_t)) |
Minimum queue size, in bytes.
| #define CIRCULAR_BUF_MIN_SIZE_MS (128) |
Minimum queue length, in milliseconds, accepted when the heap is too fragmented for the preferred one.
Transcription quality degrades noticeably below it.
| #define CIRCULAR_BUF_MIN_SIZE_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_MIN_SIZE_MS) / 1000) |
Minimum queue length, in samples.
| #define CIRCULAR_BUF_SIZE_BYTES (CIRCULAR_BUF_SIZE_SAMPLES * sizeof(int16_t)) |
Preferred queue size, in bytes.
| #define CIRCULAR_BUF_SIZE_MS (320) |
Preferred length of the queue between DMA and the data handler, in milliseconds.
| #define CIRCULAR_BUF_SIZE_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_SIZE_MS) / 1000) |
Preferred queue length, in samples.
| #define CIRCULAR_BUF_STEP_BYTES (CIRCULAR_BUF_STEP_SAMPLES * sizeof(int16_t)) |
Queue shrink per allocation retry, in bytes.
| #define CIRCULAR_BUF_STEP_MS (32) |
Queue shrink per allocation retry, in milliseconds.
Gives about 7 attempts between the preferred and the minimum length.
| #define CIRCULAR_BUF_STEP_SAMPLES ((MIC_SAMPLE_RATE * CIRCULAR_BUF_STEP_MS) / 1000) |
Queue shrink per allocation retry, in samples.
| #define PDM_BUFFER_COUNT (2) |
Number of PDM DMA buffers.
| #define PDM_BUFFER_SIZE_SAMPLES (320) |
Samples per PDM DMA buffer.
| #define PDM_GAIN_DEFAULT (NRF_PDM_GAIN_DEFAULT) |
Default PDM gain.