Skip to content

Commit

Permalink
Make ARM Audio max volume configurable (qmk#4540)
Browse files Browse the repository at this point in the history
* Make ARM Audio max volume configurable

* Update docs/feature_audio.md

Co-Authored-By: drashna <[email protected]>

* Update docs/feature_audio.md

Co-Authored-By: drashna <[email protected]>
  • Loading branch information
drashna authored and mechmerlin committed Dec 4, 2018
1 parent da1afe1 commit 3a0f3a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/feature_audio.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ The available keycodes for audio are:
* `AU_OFF` - Turn audio mode off
* `AU_TOG` - Toggle audio mode

## ARM Audio Volume

For ARM devices, you can adjust the DAC sample values. If your board is too loud for you or your coworkers, you can set the max using `DAC_SAMPLE_MAX` in your `config.h`:

```c
#define DAC_SAMPLE_MAX 65535U
```
## Music Mode
Expand Down
2 changes: 2 additions & 0 deletions quantum/audio/audio_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ float startup_song[][2] = STARTUP_SONG;
static void gpt_cb8(GPTDriver *gptp);

#define DAC_BUFFER_SIZE 720
#ifndef DAC_SAMPLE_MAX
#define DAC_SAMPLE_MAX 65535U
#endif

#define START_CHANNEL_1() gptStart(&GPTD6, &gpt6cfg1); \
gptStartContinuous(&GPTD6, 2U)
Expand Down

0 comments on commit 3a0f3a5

Please sign in to comment.