asoc: bolero: Add support for WSA macro driver
Add support for WSA digital portion to register as macro to bolero codec. ASoC dapm and dai functionality of WSA macro is associated to bolero codec itself. Change-Id: Ida9647274e6a0aa392e131a9b08f83b2520802e5 Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:
parent
89438f3ee8
commit
243e2754eb
2 changed files with 2236 additions and 0 deletions
2190
asoc/codecs/bolero/wsa-macro.c
Normal file
2190
asoc/codecs/bolero/wsa-macro.c
Normal file
File diff suppressed because it is too large
Load diff
46
asoc/codecs/bolero/wsa-macro.h
Normal file
46
asoc/codecs/bolero/wsa-macro.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
/* Copyright (c) 2018, 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
|
||||
* only version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
#ifndef WSA_MACRO_H
|
||||
#define WSA_MACRO_H
|
||||
|
||||
/*
|
||||
* Selects compander and smart boost settings
|
||||
* for a given speaker mode
|
||||
*/
|
||||
enum {
|
||||
SPKR_MODE_DEFAULT,
|
||||
SPKR_MODE_1, /* COMP Gain = 12dB, Smartboost Max = 5.5V */
|
||||
};
|
||||
|
||||
/* Rx path gain offsets */
|
||||
enum {
|
||||
RX_GAIN_OFFSET_M1P5_DB,
|
||||
RX_GAIN_OFFSET_0_DB,
|
||||
};
|
||||
|
||||
|
||||
#if IS_ENABLED(CONFIG_WSA_MACRO)
|
||||
extern int wsa_macro_set_spkr_mode(struct snd_soc_codec *codec, int mode);
|
||||
extern int wsa_macro_set_spkr_gain_offset(struct snd_soc_codec *codec,
|
||||
int offset);
|
||||
#else /* CONFIG_WSA_MACRO */
|
||||
static inline int wsa_macro_set_spkr_mode(struct snd_soc_codec *codec, int mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
static inline int wsa_macro_set_spkr_gain_offset(struct snd_soc_codec *codec,
|
||||
int offset);
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_WSA_MACRO */
|
||||
#endif
|
Loading…
Add table
Reference in a new issue