summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wcd939x.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wcd939x.h')
-rw-r--r--sound/soc/codecs/wcd939x.h24
1 files changed, 6 insertions, 18 deletions
diff --git a/sound/soc/codecs/wcd939x.h b/sound/soc/codecs/wcd939x.h
index 807cf3113d20..3204fb10b58d 100644
--- a/sound/soc/codecs/wcd939x.h
+++ b/sound/soc/codecs/wcd939x.h
@@ -91,11 +91,9 @@
#define WCD939X_ANA_MBHC_BTN7 (0x3021)
#define WCD939X_MBHC_BTN7_VTH GENMASK(7, 2)
#define WCD939X_ANA_MICB1 (0x3022)
-#define WCD939X_MICB1_ENABLE GENMASK(7, 6)
-#define WCD939X_MICB1_VOUT_CTL GENMASK(5, 0)
+#define WCD939X_MICB_ENABLE GENMASK(7, 6)
+#define WCD939X_MICB_VOUT_CTL GENMASK(5, 0)
#define WCD939X_ANA_MICB2 (0x3023)
-#define WCD939X_MICB2_ENABLE GENMASK(7, 6)
-#define WCD939X_MICB2_VOUT_CTL GENMASK(5, 0)
#define WCD939X_ANA_MICB2_RAMP (0x3024)
#define WCD939X_MICB2_RAMP_RAMP_ENABLE BIT(7)
#define WCD939X_MICB2_RAMP_MB2_IN2P_SHORT_ENABLE BIT(6)
@@ -103,11 +101,7 @@
#define WCD939X_MICB2_RAMP_SHIFT_CTL GENMASK(4, 2)
#define WCD939X_MICB2_RAMP_USB_MGDET_MICB2_RAMP GENMASK(1, 0)
#define WCD939X_ANA_MICB3 (0x3025)
-#define WCD939X_MICB3_ENABLE GENMASK(7, 6)
-#define WCD939X_MICB3_VOUT_CTL GENMASK(5, 0)
#define WCD939X_ANA_MICB4 (0x3026)
-#define WCD939X_MICB4_ENABLE GENMASK(7, 6)
-#define WCD939X_MICB4_VOUT_CTL GENMASK(5, 0)
#define WCD939X_BIAS_CTL (0x3028)
#define WCD939X_BIAS_VBG_FINE_ADJ (0x3029)
#define WCD939X_LDOL_VDDCX_ADJUST (0x3040)
@@ -848,9 +842,6 @@
#define WCD939X_DSD_HPHR_CFG5 (0x35a6)
#define WCD939X_MAX_REGISTER (WCD939X_DSD_HPHR_CFG5)
-#define WCD939X_MAX_SWR_PORTS (6)
-#define WCD939X_MAX_RX_SWR_PORTS (6)
-#define WCD939X_MAX_TX_SWR_PORTS (4)
#define WCD939X_MAX_SWR_CH_IDS (15)
struct wcd939x_sdw_ch_info {
@@ -869,6 +860,7 @@ enum wcd939x_tx_sdw_ports {
WCD939X_ADC_DMIC_1_2_PORT,
WCD939X_DMIC_0_3_MBHC_PORT,
WCD939X_DMIC_3_7_PORT,
+ WCD939X_MAX_TX_SWR_PORTS = WCD939X_DMIC_3_7_PORT,
};
enum wcd939x_tx_sdw_channels {
@@ -894,6 +886,8 @@ enum wcd939x_rx_sdw_ports {
WCD939X_LO_PORT,
WCD939X_DSD_PORT,
WCD939X_HIFI_PCM_PORT,
+ WCD939X_MAX_RX_SWR_PORTS = WCD939X_HIFI_PCM_PORT,
+ WCD939X_MAX_SWR_PORTS = WCD939X_MAX_RX_SWR_PORTS,
};
enum wcd939x_rx_sdw_channels {
@@ -909,21 +903,15 @@ enum wcd939x_rx_sdw_channels {
WCD939X_HIFI_PCM_R,
};
-enum {
- WCD939X_SDW_DIR_RX,
- WCD939X_SDW_DIR_TX,
-};
-
struct wcd939x_priv;
struct wcd939x_sdw_priv {
struct sdw_slave *sdev;
struct sdw_stream_config sconfig;
struct sdw_stream_runtime *sruntime;
struct sdw_port_config port_config[WCD939X_MAX_SWR_PORTS];
- struct wcd939x_sdw_ch_info *ch_info;
+ const struct wcd939x_sdw_ch_info *ch_info;
bool port_enable[WCD939X_MAX_SWR_CH_IDS];
int active_ports;
- int num_ports;
bool is_tx;
struct wcd939x_priv *wcd939x;
struct irq_domain *slave_irq;