mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
ASoC: bolero: Update init registers for tx and rx paths
Update init registers for tx and rx paths in an array. Change-Id: I2738af7639ffec05b5c93e86a2a3f4cf7ccb36fe Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
This commit is contained in:
parent
40e928840f
commit
72fef48d6b
2 changed files with 31 additions and 14 deletions
|
|
@ -3532,6 +3532,15 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static const struct rx_macro_reg_mask_val rx_macro_reg_init[] = {
|
||||
{BOLERO_CDC_RX_RX0_RX_PATH_SEC7, 0x07, 0x02},
|
||||
{BOLERO_CDC_RX_RX1_RX_PATH_SEC7, 0x07, 0x02},
|
||||
{BOLERO_CDC_RX_RX2_RX_PATH_SEC7, 0x07, 0x02},
|
||||
{BOLERO_CDC_RX_RX0_RX_PATH_CFG3, 0x03, 0x02},
|
||||
{BOLERO_CDC_RX_RX1_RX_PATH_CFG3, 0x03, 0x02},
|
||||
{BOLERO_CDC_RX_RX2_RX_PATH_CFG3, 0x03, 0x02},
|
||||
};
|
||||
|
||||
static void rx_macro_init_bcl_pmic_reg(struct snd_soc_component *component)
|
||||
{
|
||||
struct device *rx_dev = NULL;
|
||||
|
|
@ -3586,6 +3595,7 @@ static int rx_macro_init(struct snd_soc_component *component)
|
|||
int ret = 0;
|
||||
struct device *rx_dev = NULL;
|
||||
struct rx_macro_priv *rx_priv = NULL;
|
||||
int i;
|
||||
|
||||
rx_dev = bolero_get_device_ptr(component->dev, RX_MACRO);
|
||||
if (!rx_dev) {
|
||||
|
|
@ -3637,18 +3647,11 @@ static int rx_macro_init(struct snd_soc_component *component)
|
|||
snd_soc_dapm_ignore_suspend(dapm, "RX_TX DEC3_INP");
|
||||
snd_soc_dapm_sync(dapm);
|
||||
|
||||
snd_soc_component_update_bits(component, BOLERO_CDC_RX_RX0_RX_PATH_SEC7,
|
||||
0x07, 0x02);
|
||||
snd_soc_component_update_bits(component, BOLERO_CDC_RX_RX1_RX_PATH_SEC7,
|
||||
0x07, 0x02);
|
||||
snd_soc_component_update_bits(component, BOLERO_CDC_RX_RX2_RX_PATH_SEC7,
|
||||
0x07, 0x02);
|
||||
snd_soc_component_update_bits(component, BOLERO_CDC_RX_RX0_RX_PATH_CFG3,
|
||||
0x03, 0x02);
|
||||
snd_soc_component_update_bits(component, BOLERO_CDC_RX_RX1_RX_PATH_CFG3,
|
||||
0x03, 0x02);
|
||||
snd_soc_component_update_bits(component, BOLERO_CDC_RX_RX2_RX_PATH_CFG3,
|
||||
0x03, 0x02);
|
||||
for (i = 0; i < ARRAY_SIZE(rx_macro_reg_init); i++)
|
||||
snd_soc_component_update_bits(component,
|
||||
rx_macro_reg_init[i].reg,
|
||||
rx_macro_reg_init[i].mask,
|
||||
rx_macro_reg_init[i].val);
|
||||
|
||||
rx_priv->component = component;
|
||||
rx_macro_init_bcl_pmic_reg(component);
|
||||
|
|
|
|||
|
|
@ -119,6 +119,12 @@ enum {
|
|||
VA_MCLK,
|
||||
};
|
||||
|
||||
struct tx_macro_reg_mask_val {
|
||||
u16 reg;
|
||||
u8 mask;
|
||||
u8 val;
|
||||
};
|
||||
|
||||
struct tx_mute_work {
|
||||
struct tx_macro_priv *tx_priv;
|
||||
u32 decimator;
|
||||
|
|
@ -2013,6 +2019,10 @@ undefined_rate:
|
|||
return dmic_sample_rate;
|
||||
}
|
||||
|
||||
static const struct tx_macro_reg_mask_val tx_macro_reg_init[] = {
|
||||
{BOLERO_CDC_TX0_TX_PATH_SEC7, 0x3F, 0x0E},
|
||||
};
|
||||
|
||||
static int tx_macro_init(struct snd_soc_component *component)
|
||||
{
|
||||
struct snd_soc_dapm_context *dapm =
|
||||
|
|
@ -2092,8 +2102,12 @@ static int tx_macro_init(struct snd_soc_component *component)
|
|||
}
|
||||
tx_priv->component = component;
|
||||
|
||||
snd_soc_component_update_bits(component,
|
||||
BOLERO_CDC_TX0_TX_PATH_SEC7, 0x3F, 0x0E);
|
||||
for (i = 0; i < ARRAY_SIZE(tx_macro_reg_init); i++)
|
||||
snd_soc_component_update_bits(component,
|
||||
tx_macro_reg_init[i].reg,
|
||||
tx_macro_reg_init[i].mask,
|
||||
tx_macro_reg_init[i].val);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue