This adds a new enable() function.
bool enable(extMCLK, pllFreq);
switches the SGTL to Master Mode.
On LC this done automatically, so the normal enable() works with the Teensy LC.
There was a missing `break;` at the end of the FILTER_HISHELF
case in the calculations, meaning a hishelf coeff calc always
returned the default fallthrough case, which is a benign passthrough
filter.
Fix by adding the `break;`.
Fixes: #343
Signed-off-by: Graham Whaley <graham.whaley@gmail.com>
While changing everything else I also modified most things regarding
gain or volume from using 0 to 100 (or -100 thru 0 to 100) to using 1
(or -1 to 1) with only one exception I can think of right now in the
autoVolumeControl(..); - I modified all examples I found .volume or
similar in to suit.
I found opportunity to write these changes, I did not have a chance to
test much more extensively than just compiling it. I will have a chance
to test them by about 24 hours time.
Adding route() made me review dap_enable() more closely and it wasn't
doing what I intended to do before, it was ignoring I2S coming back from
Teensy, DAP was sourced from ADC as was I2S_DOUT and DAC was sourced
from DAP; Teensy received valid data from ADC but data from Teensy was
just discarded if user selected it.
unsigned short .adc_hpf(uint8_t bypass, uint8_t freeze);
unsigned short .adc_hpf(uint8_t bypass);
bypass & freeze as defined on page 34 of the SGTL5000 datasheet.
Added
AudioControlSGTL5000::dap_avc(..);
AudioControlSGTL5000::dap_avc_enable(..);
SGTL5000_Specific/dap_avc_agc example sketch
Also added 'public domain...' line to all my examples.