Commit Graph

12 Commits

Author SHA1 Message Date
Scott Shawcroft 28642ab10d Add audio output support!
This evolves the API from 2.x (and breaks it). Playback devices are now
separate from the samples themselves. This allows for greater playback
flexibility. Two sample sources are audioio.RawSample and audioio.WaveFile.
They can both be mono or stereo. They can be output to audioio.AudioOut or
audiobusio.I2SOut.

Internally, the dma tracking has changed from a TC counting block transfers
to an interrupt generated by the block event sent to the EVSYS. This reduces
the overhead of each DMA transfer so multiple can occure without using up TCs.

Fixes #652. Fixes #522. Huge progress on #263
2018-04-12 16:35:13 -07:00
Scott Shawcroft bf05183158 Merge remote-tracking branch 'adafruit/2.x' into merge_2x 2018-02-27 15:24:16 -08:00
Scott Shawcroft 20dd3b1e43 Delete a bunch of docs, drivers and examples not relevant to CircuitPython.
This fixes #345 and fixes #215.
2018-02-20 17:34:59 -08:00
arturo182 ff041caa52 shared-bindings: Fix incorrect code comments
Most likely caused by copy-paste.
2018-02-06 22:03:17 +01:00
Dan Halbert 065e82015f merge from 2.2.0 + fix up board defs 2018-01-02 21:25:41 -05:00
Dan Halbert 43650b6896 Fix PDMIn MEMS microphone support (#479)
Changes:

    * New faster filter loop, by @ladyada. New filter coefficients as well.
    * Turn on microphone clock when PDMIn object is created, and run it all the time, so the user code doesn't have to wait for microphone startup, which can be 10ms or even 100ms.
    * Wait for microphone startup when PDMIn is first created, based on new optional parameter microphone_startup in seconds (takes a float).
    * record() returns number of samples actually recorded, so you can see if it's not keeping up.
    * Fix buffer overflow errors when buffer size was not a multiple of 16 or something like that.
    * Tweak a few peripheral settings.
    * Minimum sampling frequency is now 16kHZ or so, because 8kHz runs microphone at only 0.5MHz, which is too slow for many mics.

Note: I tried 128x oversampling instead of 64x, but the code cannot keep up at 24kHz or above sampling. 128x would reduce the high-frequency noise by 6db.
2017-12-13 10:12:49 -08:00
Kattni 4902f0937f Resolved formatting issue in doc 2017-11-22 21:44:18 -05:00
Kattni 1d6bf8e04a Updated frequency minimum requirements in docs and examples (#444)
Updated frequency minimum requirements in docs and examples
2017-11-19 22:19:22 -08:00
Dan Halbert c478c10923 Do not allow a *io object to be used after deinit().
Fixes #278, #277, #276, #275.
2017-10-03 12:07:17 -07:00
Scott Shawcroft 6d9d683443 atmel-samd: Enable 8-bit audio recording support even though it'll be
quiet. Also update the examples.

Fixes #226
2017-09-05 16:37:02 -07:00
Dan Halbert ef61b5ecb5 Initial merge of micropython v1.9.2 into circuitpython 2.0.0 (in development) master.
cpx build compiles and loads and works in repl; test suite not run yet
esp8266 not tested yet
2017-08-25 22:17:07 -04:00
Scott Shawcroft 557ceded00 atmel-samd: Introduce audiobusio.PDMIn for recording audio from PDM
microphones.
2017-07-28 12:12:38 -07:00