asoc: codecs: Change WSA config params acquisition
Update WSA rload, system gain, bat_cfg to get from wsa_macro device tree. WSA Bat_cfg change to read from VPHX_SYS_EN_STATUS reg. Add device tree parsing for these params in WSA macro and WSA driver. Remove machine driver method of sending the parameters. Add default_dev_mode (spkr vs rcv) from device tree for WSA. Move code from spkr event to userspace controls or probe. Change system_gain and affected params when switching between dev_modes. These changes simplify configuration data and code and allow more registers to be written during bootup or before playback. Change-Id: I79966c704adfac1bf2d85aa6519ea574764c7a8b Signed-off-by: Matthew Rice <quic_mrice@quicinc.com>
这个提交包含在:

提交者
Gerrit - the friendly Code Review server

父节点
6086cb0692
当前提交
311264875e
@@ -1,6 +1,7 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef WSA884X_INTERNAL_H
|
||||
@@ -86,6 +87,12 @@ enum {
|
||||
ENABLE,
|
||||
};
|
||||
|
||||
enum {
|
||||
SPEAKER,
|
||||
RECEIVER,
|
||||
MAX_DEV_MODE
|
||||
};
|
||||
|
||||
enum {
|
||||
SWR_DAC_PORT = 0,
|
||||
SWR_COMP_PORT,
|
||||
@@ -142,10 +149,13 @@ struct wsa884x_priv {
|
||||
int version;
|
||||
u8 pa_gain;
|
||||
u8 bat_cfg;
|
||||
u8 rload;
|
||||
u32 rload;
|
||||
u8 system_gain;
|
||||
u32 sys_gains[MAX_DEV_MODE * 2];
|
||||
bool default_dev_mode;
|
||||
int min_gain;
|
||||
int pa_aux_gain;
|
||||
u8 dev_index;
|
||||
struct irq_domain *virq;
|
||||
struct wcd_irq_info irq_info;
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
@@ -156,7 +166,9 @@ struct wsa884x_priv {
|
||||
unsigned int read_data;
|
||||
#endif
|
||||
struct device_node *parent_np;
|
||||
struct device_node *macro_np;
|
||||
struct platform_device *parent_dev;
|
||||
struct platform_device *macro_dev;
|
||||
struct notifier_block parent_nblock;
|
||||
void *handle;
|
||||
int (*register_notifier)(void *handle,
|
||||
|
在新工单中引用
屏蔽一个用户