
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>
52 lines
1.3 KiB
C
52 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
|
|
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
*/
|
|
|
|
#ifndef _WSA884X_H
|
|
#define _WSA884X_H
|
|
|
|
#include <linux/regmap.h>
|
|
#include <sound/soc.h>
|
|
#include <sound/info.h>
|
|
#include "wsa884x-registers.h"
|
|
#include "wsa884x-reg-masks.h"
|
|
#include "wsa884x-reg-shifts.h"
|
|
|
|
|
|
#define WSA884X_MAX_SWR_PORTS 6
|
|
|
|
#if IS_ENABLED(CONFIG_SND_SOC_WSA884X)
|
|
int wsa884x_set_channel_map(struct snd_soc_component *component,
|
|
u8 *port, u8 num_port, unsigned int *ch_mask,
|
|
unsigned int *ch_rate, u8 *port_type);
|
|
|
|
|
|
int wsa884x_codec_info_create_codec_entry(
|
|
struct snd_info_entry *codec_root,
|
|
struct snd_soc_component *component);
|
|
int wsa884x_codec_get_dev_num(struct snd_soc_component *component);
|
|
#else
|
|
static int wsa884x_set_channel_map(struct snd_soc_component *component,
|
|
u8 *port, u8 num_port, unsigned int *ch_mask,
|
|
unsigned int *ch_rate, u8 *port_type)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static int wsa884x_codec_info_create_codec_entry(
|
|
struct snd_info_entry *codec_root,
|
|
struct snd_soc_component *component)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static int wsa884x_codec_get_dev_num(struct snd_soc_component *component)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif /* _WSA884X_H */
|