File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,10 @@ class CS42448 {
154
154
this ->i2c_address = i2cAddress;
155
155
}
156
156
157
+ if (is_active){
158
+ setMuteADC (true );
159
+ setMuteDAC (true );
160
+ }
157
161
setPowerAll (false );
158
162
159
163
// slave mode, MCLK 25.6 MHz max
@@ -168,13 +172,15 @@ class CS42448 {
168
172
setMuteDAC (true );
169
173
170
174
// power on requested devices
171
- return setPowerDevices (true );
175
+ is_active = setPowerDevices (true );
176
+ return is_active;
172
177
}
173
178
174
179
// / Mute ADC and DAC and then power down
175
180
bool end () {
176
181
setMuteADC (true );
177
182
setMuteDAC (true );
183
+ is_active = false ;
178
184
return setPowerDevices (false );
179
185
}
180
186
@@ -538,6 +544,7 @@ class CS42448 {
538
544
codec_config_t codec_config;
539
545
i2c_bus_handle_t i2c;
540
546
int i2c_address = 0x48 ;
547
+ bool is_active = false ;
541
548
542
549
// / Set I2S format based on codec_config
543
550
bool setFormat () {
You can’t perform that action at this time.
0 commit comments