diff options
| author | Scott Shawcroft <scott@chickadee.tech> | 2017-09-05 12:31:02 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2017-09-05 16:37:02 -0700 |
| commit | 6d9d683443705a3c06afbf3cc4e64da86e5c9dc6 (patch) | |
| tree | 9de153a66b865108b4b9995ab953ec23e157c840 /atmel-samd | |
| parent | e1eb1802a668ecdfb2703db08b559a3e5fcefc55 (diff) | |
atmel-samd: Enable 8-bit audio recording support even though it'll be
quiet. Also update the examples.
Fixes #226
Diffstat (limited to 'atmel-samd')
| -rw-r--r-- | atmel-samd/common-hal/audiobusio/PDMIn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/atmel-samd/common-hal/audiobusio/PDMIn.c b/atmel-samd/common-hal/audiobusio/PDMIn.c index b53a3fa7f..555601c9d 100644 --- a/atmel-samd/common-hal/audiobusio/PDMIn.c +++ b/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -96,8 +96,8 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t* self, mp_raise_RuntimeError("Unable to allocate audio DMA block counter."); } - if (bit_depth != 16 || !mono || oversample != 64) { - mp_raise_NotImplementedError(""); + if (!(bit_depth == 16 || bit_depth == 8) || !mono || oversample != 64) { + mp_raise_NotImplementedError("Only 8 or 16 bit mono with 64 oversample is supported."); } // TODO(tannewt): Use the DPLL to get a more precise sampling rate. |
