ASoC: Add driver support for lpass digital codec

Add driver support to enable lpass digital codec for
audio playback and capture usecases.

Change-Id: I3d31d31f340db79334700e8fd495f40479e0ec6c
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
This commit is contained in:
Sudheer Papothi
2020-09-03 12:29:17 +05:30
committed by Gerrit - the friendly Code Review server
parent b3cfeef661
commit e3ab630202
16 changed files with 20166 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
*/
#ifndef LPASS_CDC_WSA_MACRO_H
#define LPASS_CDC_WSA_MACRO_H
/*
* Selects compander and smart boost settings
* for a given speaker mode
*/
enum {
LPASS_CDC_WSA_MACRO_SPKR_MODE_DEFAULT,
LPASS_CDC_WSA_MACRO_SPKR_MODE_1, /* COMP Gain = 12dB, Smartboost Max = 5.5V */
};
/* Rx path gain offsets */
enum {
LPASS_CDC_WSA_MACRO_GAIN_OFFSET_M1P5_DB,
LPASS_CDC_WSA_MACRO_GAIN_OFFSET_0_DB,
};
#if IS_ENABLED(CONFIG_WSA_MACRO)
extern int lpass_cdc_wsa_macro_set_spkr_mode(struct snd_soc_component *component,
int mode);
extern int lpass_cdc_wsa_macro_set_spkr_gain_offset(struct snd_soc_component *component,
int offset);
#else /* CONFIG_WSA_MACRO */
static inline int lpass_cdc_wsa_macro_set_spkr_mode(struct snd_soc_component *component,
int mode)
{
return 0;
}
static inline int lpass_cdc_wsa_macro_set_spkr_gain_offset(
struct snd_soc_component *component,
int offset)
{
return 0;
}
#endif /* CONFIG_WSA_MACRO */
#endif