summaryrefslogtreecommitdiff
path: root/chip/npcx/wov_chip.h
diff options
context:
space:
mode:
authorScott Collyer <scollyer@google.com>2018-11-29 14:32:23 -0800
committerchrome-bot <chrome-bot@chromium.org>2018-12-06 22:06:29 -0800
commit5838aa7bb6edfb7cc02d08f35f22dd3783d4013e (patch)
tree24656c7267260a53bc3912e0c7d76699831adcba /chip/npcx/wov_chip.h
parent6b1c8f10329d1d335aa5c1a3365973d4250e2519 (diff)
downloadchrome-ec-5838aa7bb6edfb7cc02d08f35f22dd3783d4013e.tar.gz
wov: Add API method to retrieve the channel gain parameters
This CL adds a new function wov_get_gain() so the codec driver can query the current channel gain values. BRANCH=none BUG=b:116766596 TEST=On cheza verifed recording works using the following kernel commands and the loading the audio file into audacity. amixer -c 0 cset iface=MIXER,name='MultiMedia1 Mixer SEC_MI2S_TX' on amixer -c0 cset numid=27 30,30 arecord -D hw:0,0 -f dat /tmp/rec.wav -d 5 Change-Id: I5aab58a651d95727cf5c49149898f78ca25c78cf Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/1356184 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com>
Diffstat (limited to 'chip/npcx/wov_chip.h')
-rw-r--r--chip/npcx/wov_chip.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/chip/npcx/wov_chip.h b/chip/npcx/wov_chip.h
index dcc17dcf77..96bc03c2b8 100644
--- a/chip/npcx/wov_chip.h
+++ b/chip/npcx/wov_chip.h
@@ -336,6 +336,15 @@ enum wov_mic_source wov_get_mic_source(void);
void wov_mute(int enable);
/**
+ * Gets gain values
+ *
+ * @param left_chan_gain - address of left channel gain response.
+ * @param right_chan_gain - address of right channel gain response.
+ * @return None
+ */
+void wov_get_gain(int *left_chan_gain, int *right_chan_gain);
+
+/**
* Sets gain
*
* @param left_chan_gain - Left channel gain.