Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09cd2ac5 authored by Xiaojun Sang's avatar Xiaojun Sang
Browse files

asoc: codecs: set boost state to MAX_STATE_2 for WSA8815



WSA8815 requires default boost state of MAX_STATE_2, when
speaker protection feature is disabled. Set boost state to
MAX_STATE_2 in all cases for WSA8815.

Change-Id: Ic700d9a206e94a4cdd1d99f8547bed9df1e759e8
Signed-off-by: default avatarXiaojun Sang <xsang@codeaurora.org>
parent 9cb7bc20
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-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
@@ -82,8 +82,8 @@ static const struct msm_sdw_reg_mask_val msm_sdw_spkr_default[] = {
	{MSM_SDW_COMPANDER8_CTL3, 0x80, 0x80},
	{MSM_SDW_COMPANDER7_CTL7, 0x01, 0x01},
	{MSM_SDW_COMPANDER8_CTL7, 0x01, 0x01},
	{MSM_SDW_BOOST0_BOOST_CTL, 0x7C, 0x50},
	{MSM_SDW_BOOST1_BOOST_CTL, 0x7C, 0x50},
	{MSM_SDW_BOOST0_BOOST_CTL, 0x7C, 0x58},
	{MSM_SDW_BOOST1_BOOST_CTL, 0x7C, 0x58},
};

static const struct msm_sdw_reg_mask_val msm_sdw_spkr_mode1[] = {
@@ -1699,8 +1699,8 @@ static const struct msm_sdw_reg_mask_val msm_sdw_reg_init[] = {
	{MSM_SDW_BOOST1_BOOST_CFG1, 0x3F, 0x12},
	{MSM_SDW_BOOST1_BOOST_CFG2, 0x1C, 0x08},
	{MSM_SDW_COMPANDER8_CTL7, 0x1E, 0x18},
	{MSM_SDW_BOOST0_BOOST_CTL, 0x70, 0x50},
	{MSM_SDW_BOOST1_BOOST_CTL, 0x70, 0x50},
	{MSM_SDW_BOOST0_BOOST_CTL, 0x70, 0x58},
	{MSM_SDW_BOOST1_BOOST_CTL, 0x70, 0x58},
	{MSM_SDW_RX7_RX_PATH_CFG1, 0x08, 0x08},
	{MSM_SDW_RX8_RX_PATH_CFG1, 0x08, 0x08},
	{MSM_SDW_TOP_TOP_CFG1, 0x02, 0x02},
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2016-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
@@ -65,11 +65,11 @@ static const struct reg_default msm_sdw_defaults[] = {
	{ MSM_SDW_RX8_RX_PATH_MIX_SEC1, 0x00 },
	/* Page #12 registers */
	{ MSM_SDW_BOOST0_BOOST_PATH_CTL, 0x00 },
	{ MSM_SDW_BOOST0_BOOST_CTL, 0xb2 },
	{ MSM_SDW_BOOST0_BOOST_CTL, 0xba },
	{ MSM_SDW_BOOST0_BOOST_CFG1, 0x00 },
	{ MSM_SDW_BOOST0_BOOST_CFG2, 0x00 },
	{ MSM_SDW_BOOST1_BOOST_PATH_CTL, 0x00 },
	{ MSM_SDW_BOOST1_BOOST_CTL, 0xb2 },
	{ MSM_SDW_BOOST1_BOOST_CTL, 0xba },
	{ MSM_SDW_BOOST1_BOOST_CFG1, 0x00 },
	{ MSM_SDW_BOOST1_BOOST_CFG2, 0x00 },
	{ MSM_SDW_AHB_BRIDGE_WR_DATA_0, 0x00 },
+3 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-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
@@ -1213,11 +1213,11 @@ static const struct reg_default wcd9335_defaults[] = {
	{ WCD9335_CDC_CLSH_TEST1,                         0x00 },
	{ WCD9335_CDC_CLSH_OVR_VREF,                      0x00 },
	{ WCD9335_CDC_BOOST0_BOOST_PATH_CTL,              0x00 },
	{ WCD9335_CDC_BOOST0_BOOST_CTL,                   0xb2 },
	{ WCD9335_CDC_BOOST0_BOOST_CTL,                   0xba },
	{ WCD9335_CDC_BOOST0_BOOST_CFG1,                  0x00 },
	{ WCD9335_CDC_BOOST0_BOOST_CFG2,                  0x00 },
	{ WCD9335_CDC_BOOST1_BOOST_PATH_CTL,              0x00 },
	{ WCD9335_CDC_BOOST1_BOOST_CTL,                   0xb2 },
	{ WCD9335_CDC_BOOST1_BOOST_CTL,                   0xba },
	{ WCD9335_CDC_BOOST1_BOOST_CFG1,                  0x00 },
	{ WCD9335_CDC_BOOST1_BOOST_CFG2,                  0x00 },
	{ WCD9335_SWR_AHB_BRIDGE_WR_DATA_0,               0x00 },
+5 −5
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-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
@@ -845,8 +845,8 @@ static const struct tasha_reg_mask_val tasha_spkr_default[] = {
	{WCD9335_CDC_COMPANDER8_CTL3, 0x80, 0x80},
	{WCD9335_CDC_COMPANDER7_CTL7, 0x01, 0x01},
	{WCD9335_CDC_COMPANDER8_CTL7, 0x01, 0x01},
	{WCD9335_CDC_BOOST0_BOOST_CTL, 0x7C, 0x50},
	{WCD9335_CDC_BOOST1_BOOST_CTL, 0x7C, 0x50},
	{WCD9335_CDC_BOOST0_BOOST_CTL, 0x7C, 0x58},
	{WCD9335_CDC_BOOST1_BOOST_CTL, 0x7C, 0x58},
};

static const struct tasha_reg_mask_val tasha_spkr_mode1[] = {
@@ -12405,8 +12405,8 @@ static const struct tasha_reg_mask_val tasha_codec_reg_init_common_val[] = {
	{WCD9335_CDC_CLSH_K2_MSB, 0x0F, 0x00},
	{WCD9335_CDC_CLSH_K2_LSB, 0xFF, 0x60},
	{WCD9335_CPE_SS_DMIC_CFG, 0x80, 0x00},
	{WCD9335_CDC_BOOST0_BOOST_CTL, 0x70, 0x50},
	{WCD9335_CDC_BOOST1_BOOST_CTL, 0x70, 0x50},
	{WCD9335_CDC_BOOST0_BOOST_CTL, 0x70, 0x58},
	{WCD9335_CDC_BOOST1_BOOST_CTL, 0x70, 0x58},
	{WCD9335_CDC_RX7_RX_PATH_CFG1, 0x08, 0x08},
	{WCD9335_CDC_RX8_RX_PATH_CFG1, 0x08, 0x08},
	{WCD9335_ANA_LO_1_2, 0x3C, 0X3C},
+3 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-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
@@ -1248,11 +1248,11 @@ static const struct reg_default wcd934x_defaults[] = {
	{ WCD934X_CDC_CLSH_TEST1,                          0x00 },
	{ WCD934X_CDC_CLSH_OVR_VREF,                       0x00 },
	{ WCD934X_CDC_BOOST0_BOOST_PATH_CTL,               0x00 },
	{ WCD934X_CDC_BOOST0_BOOST_CTL,                    0xb2 },
	{ WCD934X_CDC_BOOST0_BOOST_CTL,                    0xba },
	{ WCD934X_CDC_BOOST0_BOOST_CFG1,                   0x00 },
	{ WCD934X_CDC_BOOST0_BOOST_CFG2,                   0x00 },
	{ WCD934X_CDC_BOOST1_BOOST_PATH_CTL,               0x00 },
	{ WCD934X_CDC_BOOST1_BOOST_CTL,                    0xb2 },
	{ WCD934X_CDC_BOOST1_BOOST_CTL,                    0xba },
	{ WCD934X_CDC_BOOST1_BOOST_CFG1,                   0x00 },
	{ WCD934X_CDC_BOOST1_BOOST_CFG2,                   0x00 },
	{ WCD934X_CDC_VBAT_VBAT_PATH_CTL,                  0x00 },
Loading