Merge "soc: soundwire: fix for headset mic recording issue with wcd937x."

This commit is contained in:
qctecmdr 2020-09-03 18:06:23 -07:00 • committed by Gerrit - the friendly Code Review server
commit 9fd22f4064
2 changed files with 18 additions and 0 deletions

View file

@ -2583,6 +2583,7 @@ static int swrm_probe(struct platform_device *pdev)
int ret = 0;
struct clk *lpass_core_hw_vote = NULL;
struct clk *lpass_core_audio = NULL;
u32 is_wcd937x = 0;
/* Allocate soundwire master driver structure */
swrm = devm_kzalloc(&pdev->dev, sizeof(struct swr_mstr_ctrl),
@ -2615,6 +2616,14 @@ static int swrm_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "%s: failed to get master id\n", __func__);
goto err_pdata_fail;
}
/* update the physical device address if wcd937x. */
ret = of_property_read_u32(pdev->dev.of_node, "qcom,is_wcd937x",
&is_wcd937x);
if (ret)
dev_dbg(&pdev->dev, "%s: failed to get wcd info\n", __func__);
else if (is_wcd937x)
swrm_phy_dev[1] = 0xa01170223;
ret = of_property_read_u32(pdev->dev.of_node, "qcom,dynamic-port-map-supported",
&swrm->dynamic_port_map_supported);
if (ret) {

View file

@ -23,12 +23,21 @@ static struct port_params tx_dummy[SWR_MSTR_PORT_LEN] = {
};
/* AMIC 9.6 MHz clock */
#ifdef CONFIG_SND_SOC_HOLI
static struct port_params tx_wcd_9p6MHz[SWR_MSTR_PORT_LEN] = {
{3, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX1 */
{3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX2 */
{7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
{7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX4 */
};
#else
static struct port_params tx_wcd_9p6MHz[SWR_MSTR_PORT_LEN] = {
{3, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0x00, 0x00}, /* TX1 */
{7, 5, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX2 */
{7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX3 */
{7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0x00, 0x00}, /* TX4 */
};
#endif
/* AMIC 4.8 MHz clock */
static struct port_params tx_wcd_4p8MHz[SWR_MSTR_PORT_LEN] = {