Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix F303 audio output on A4 with the dac_basic driver #12480

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

sigprof
Copy link
Contributor

@sigprof sigprof commented Apr 4, 2021

Description

The dac_basic audio driver did not work properly with #define AUDIO_PIN A4 (instead of configuring the A4 pin, the driver actually was switching the A5 pin to analog mode, breaking any other usage of that pin in addition to emitting a distorted signal on the improperly configured A4 pin). Fix the code to configure the A4 pin as intended.

Tested on STM32F303CCT6. Without the fix an attempt to enable audio with #define AUDIO_PIN A4 also broke the basic keyboard functionality with #define MATRIX_COL_PINS { A5 } (the column pin was always seen as active); after applying the fix the A5 pin started working in the matrix again.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Issues Fixed or Closed by This PR

  • No Github issue; the problem was reported by @GKD#3464 in the QMK Discord.

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

The dac_basic driver did not work properly with `#define AUDIO_PIN A4`
(instead of configuring the A4 pin, the driver actually was switching
the A5 pin to analog mode, breaking any other usage of that pin in
addition to emitting a distorted signal on the improperly configured
A4 pin).  Fix the code to configure the A4 pin as intended.
@github-actions github-actions bot added the core label Apr 4, 2021
@drashna drashna requested a review from a team April 5, 2021 07:25
@drashna drashna merged commit fe9bd0a into qmk:master Apr 19, 2021
@drashna
Copy link
Member

drashna commented Apr 19, 2021

Thanks!

@sigprof sigprof deleted the audio-fix-dac-basic-pin-a4 branch April 19, 2021 19:50
makenova pushed a commit to makenova/qmk_firmware that referenced this pull request Apr 26, 2021
The dac_basic driver did not work properly with `#define AUDIO_PIN A4`
(instead of configuring the A4 pin, the driver actually was switching
the A5 pin to analog mode, breaking any other usage of that pin in
addition to emitting a distorted signal on the improperly configured
A4 pin).  Fix the code to configure the A4 pin as intended.
rizo pushed a commit to rizo/qmk_firmware that referenced this pull request May 10, 2021
The dac_basic driver did not work properly with `#define AUDIO_PIN A4`
(instead of configuring the A4 pin, the driver actually was switching
the A5 pin to analog mode, breaking any other usage of that pin in
addition to emitting a distorted signal on the improperly configured
A4 pin).  Fix the code to configure the A4 pin as intended.
toddyamakawa pushed a commit to toddyamakawa/qmk_firmware that referenced this pull request May 19, 2021
The dac_basic driver did not work properly with `#define AUDIO_PIN A4`
(instead of configuring the A4 pin, the driver actually was switching
the A5 pin to analog mode, breaking any other usage of that pin in
addition to emitting a distorted signal on the improperly configured
A4 pin).  Fix the code to configure the A4 pin as intended.
HokieGeek pushed a commit to HokieGeek/qmk_firmware that referenced this pull request Jul 11, 2021
The dac_basic driver did not work properly with `#define AUDIO_PIN A4`
(instead of configuring the A4 pin, the driver actually was switching
the A5 pin to analog mode, breaking any other usage of that pin in
addition to emitting a distorted signal on the improperly configured
A4 pin).  Fix the code to configure the A4 pin as intended.
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
The dac_basic driver did not work properly with `#define AUDIO_PIN A4`
(instead of configuring the A4 pin, the driver actually was switching
the A5 pin to analog mode, breaking any other usage of that pin in
addition to emitting a distorted signal on the improperly configured
A4 pin).  Fix the code to configure the A4 pin as intended.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants