Open
Conversation
Define UUID 0x1410df99 for DMIC gain control characteristic. This allows BLE clients to adjust the ADAU1860 digital microphone gain over Bluetooth.
Add public methods mic_gain_write() and mic_gain_read() to safely access DMIC_VOL0 and DMIC_VOL1 registers. These methods encapsulate the private register access functions and allow external code to control microphone gain for channels 0 and 1.
Implement hw_codec_mic_gain_set(), hw_codec_mic_gain_get_left(), and hw_codec_mic_gain_get_right() functions. These provide a hardware abstraction layer for controlling ADAU186x DMIC_VOL registers with 0.375 dB step resolution across a +24 dB to mute range.
Add read_dmic_gain() and write_dmic_gain() handlers for the BT_UUID_DMIC_GAIN characteristic. This allows BLE clients to read and adjust DMIC gain for left and right channels using a 2-byte payload [left_reg, right_reg].
Add comprehensive documentation for DMIC microphone gain control including: - Hardware register mapping and gain calculations - BLE protocol specification - Usage examples - C/C++ API reference - Implementation details Replaces deprecated PDM terminology with DMIC to accurately reflect the ADAU1860 digital microphone interface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Bluetooth control for ADAU1860 digital microphone gain with 0.375 dB
step resolution across +24 dB to mute range.
Changes Made
To do
Notes