Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad99d1b1 authored by Meng Wang's avatar Meng Wang
Browse files

ASoC: wcd9335: Add support to enable ANC



ANC(Active Noise Cancellation) is used to reduce surround
noise that arrives at user's ear-drum by capturing background noise
through microphones and actively projecting anti-noise through
receiver or headset.
Enable ANC functionality for handset and headset on WCD9335 codec.

Change-Id: I512e045ff0d4b39238bbfa86f521eb55a4ebb625
Signed-off-by: default avatarMeng Wang <mwang@codeaurora.org>
parent d80ce5a5
Loading
Loading
Loading
Loading
+653 −7

File changed.

Preview size limit exceeded, changes collapsed.

+5 −0
Original line number Diff line number Diff line
@@ -125,6 +125,11 @@ struct wcd_mad_audio_cal {
	struct wcd_mad_rms_ultrasound_info ultrasound_info;
} __packed;

struct wcd9xxx_anc_header {
	u32 reserved[3];
	u32 num_anc_slots;
};

extern void wcd_clsh_fsm(struct snd_soc_codec *codec,
		struct wcd_clsh_cdc_data *cdc_clsh_d,
		u8 clsh_event, u8 req_state,
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -20,7 +20,7 @@
#include "wcdcal-hwdep.h"

const int cal_size_info[WCD9XXX_MAX_CAL] = {
	[WCD9XXX_ANC_CAL] = 8192,
	[WCD9XXX_ANC_CAL] = 16384,
	[WCD9XXX_MBHC_CAL] = 4096,
	[WCD9XXX_MAD_CAL] = 4096,
};