qmk

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.z3bra.org/qmk.git
Log | Files | Refs | Submodules | LICENSE

commit 3a0f3a5bd0aff18934431ad471b1db390c3b33d1
parent da1afe152af5a6dfb5c0bb28d86d34940162f960
Author: Drashna Jaelre <drashna@live.com>
Date:   Mon,  3 Dec 2018 16:42:57 -0800

Make ARM Audio max volume configurable (#4540)

* Make ARM Audio max volume configurable

* Update docs/feature_audio.md

Co-Authored-By: drashna <drashna@live.com>

* Update docs/feature_audio.md

Co-Authored-By: drashna <drashna@live.com>

Diffstat:
docs/feature_audio.md | 7+++++++
quantum/audio/audio_arm.c | 2++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/docs/feature_audio.md b/docs/feature_audio.md @@ -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 diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c @@ -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)