From 5ee54aee41b5536c4ce622fd764675eb8da09f4a Mon Sep 17 00:00:00 2001 From: Ramprasad Katkam Date: Wed, 19 Dec 2018 18:56:00 +0530 Subject: [PATCH] asoc: bolero: Call swr device down before setting ssr down Invoke swr device down callback to set soundwire master to reset state before setting ssr down flag. This is to ensure master is reset to proper state after ssr/pdr. Change-Id: Ifb5548f603ac03b772006314f4723c0ac0176928 Signed-off-by: Ramprasad Katkam --- asoc/codecs/bolero/rx-macro.c | 4 ++-- asoc/codecs/bolero/tx-macro.c | 4 ++-- asoc/codecs/bolero/wsa-macro.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/asoc/codecs/bolero/rx-macro.c b/asoc/codecs/bolero/rx-macro.c index bec125cfd870..1dd2559efa56 100644 --- a/asoc/codecs/bolero/rx-macro.c +++ b/asoc/codecs/bolero/rx-macro.c @@ -1177,10 +1177,10 @@ static int rx_macro_event_handler(struct snd_soc_component *component, rx_priv->dev_up = false; swrm_wcd_notify( rx_priv->swr_ctrl_data[0].rx_swr_pdev, - SWR_DEVICE_SSR_DOWN, NULL); + SWR_DEVICE_DOWN, NULL); swrm_wcd_notify( rx_priv->swr_ctrl_data[0].rx_swr_pdev, - SWR_DEVICE_DOWN, NULL); + SWR_DEVICE_SSR_DOWN, NULL); break; case BOLERO_MACRO_EVT_SSR_UP: rx_priv->dev_up = true; diff --git a/asoc/codecs/bolero/tx-macro.c b/asoc/codecs/bolero/tx-macro.c index ca9515387de4..c24307134645 100644 --- a/asoc/codecs/bolero/tx-macro.c +++ b/asoc/codecs/bolero/tx-macro.c @@ -312,10 +312,10 @@ static int tx_macro_event_handler(struct snd_soc_component *component, case BOLERO_MACRO_EVT_SSR_DOWN: swrm_wcd_notify( tx_priv->swr_ctrl_data[0].tx_swr_pdev, - SWR_DEVICE_SSR_DOWN, NULL); + SWR_DEVICE_DOWN, NULL); swrm_wcd_notify( tx_priv->swr_ctrl_data[0].tx_swr_pdev, - SWR_DEVICE_DOWN, NULL); + SWR_DEVICE_SSR_DOWN, NULL); break; case BOLERO_MACRO_EVT_SSR_UP: /* reset swr after ssr/pdr */ diff --git a/asoc/codecs/bolero/wsa-macro.c b/asoc/codecs/bolero/wsa-macro.c index e431a77db1f9..85417bc3df33 100644 --- a/asoc/codecs/bolero/wsa-macro.c +++ b/asoc/codecs/bolero/wsa-macro.c @@ -924,10 +924,10 @@ static int wsa_macro_event_handler(struct snd_soc_component *component, case BOLERO_MACRO_EVT_SSR_DOWN: swrm_wcd_notify( wsa_priv->swr_ctrl_data[0].wsa_swr_pdev, - SWR_DEVICE_SSR_DOWN, NULL); + SWR_DEVICE_DOWN, NULL); swrm_wcd_notify( wsa_priv->swr_ctrl_data[0].wsa_swr_pdev, - SWR_DEVICE_DOWN, NULL); + SWR_DEVICE_SSR_DOWN, NULL); break; case BOLERO_MACRO_EVT_SSR_UP: /* reset swr after ssr/pdr */