Skip to content

Commit

Permalink
pwm with i2s sound driver volume fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xrip committed Dec 24, 2023
1 parent 96d558d commit 4453e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/audio/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void i2s_dma_write(i2s_config_t *i2s_config,const int16_t *samples) {
#ifdef AUDIO_PWM_PIN
for(uint16_t i=0;i<i2s_config->dma_trans_count*2;i++) {

i2s_config->dma_buf[i] = (65536/2+(samples[i]))>>(5+i2s_config->volume);
i2s_config->dma_buf[i] = (65536/2+(samples[i]))>>(3+i2s_config->volume);

}
#else
Expand Down

0 comments on commit 4453e1e

Please sign in to comment.