Skip to content

Commit 4e107ff

Browse files
committed
CS42448 driver
1 parent 95e4c1e commit 4e107ff

File tree

6 files changed

+590
-7
lines changed

6 files changed

+590
-7
lines changed

examples/custom/custom-max/custom-max.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ void setup() {
2222

2323
// configure codec
2424
CodecConfig cfg;
25-
cfg.input_device = input_device_LINE1;
26-
cfg.output_device = output_device_ALL;
25+
cfg.input_device = ADC_INPUT_LINE1;
26+
cfg.output_device = DAC_OUTPUT_ALL;
2727
cfg.i2s.bits = BIT_LENGTH_16BITS;
2828
cfg.i2s.rate = RATE_44K;
2929
// cfg.i2s.fmt = I2S_NORMAL;

examples/custom/custom-min/custom-min.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ void setup() {
1717
Wire.begin();
1818
// configure codec
1919
CodecConfig cfg;
20-
cfg.input_device = input_device_LINE1;
21-
cfg.output_device = output_device_ALL;
20+
cfg.input_device = ADC_INPUT_LINE1;
21+
cfg.output_device = DAC_OUTPUT_ALL;
2222
cfg.i2s.bits = BIT_LENGTH_16BITS;
2323
cfg.i2s.rate = RATE_44K;
2424
// cfg.i2s.fmt = I2S_NORMAL;

examples/custom/custom-standard/custom-standard.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ void setup() {
1212

1313
// configure codec
1414
CodecConfig cfg;
15-
cfg.input_device = input_device_LINE1;
16-
cfg.output_device = output_device_ALL;
15+
cfg.input_device = ADC_INPUT_LINE1;
16+
cfg.output_device = DAC_OUTPUT_ALL;
1717
cfg.i2s.bits = BIT_LENGTH_16BITS;
1818
cfg.i2s.rate = RATE_44K;
1919
// cfg.i2s.fmt = I2S_NORMAL;

src/Common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ typedef enum {
120120
I2S_LEFT = 1, /*!< set all left format */
121121
I2S_RIGHT = 2, /*!< set all right format */
122122
I2S_DSP = 3, /*!< set dsp/pcm format */
123+
TDM = 4, /*!< set tdm format */
123124
} i2s_format_t;
124125

125126
/**

src/Driver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ class AudioDriverAC101Class : public AudioDriver {
297297
protected:
298298
bool init(codec_config_t codec_cfg) {
299299
return ac101_init(&codec_cfg, getI2C(),getI2CAddress()) == RESULT_OK;
300-
};
300+
}
301301
bool deinit() { return ac101_deinit() == RESULT_OK; }
302302
bool controlState(codec_mode_t mode) {
303303
return ac101_ctrl_state_active(mode, true) == RESULT_OK;

0 commit comments

Comments
 (0)