ソースを参照

soc: swr-mstr: Ignore device up during SSR

New audio session may be opened just before SSR
has occured. Ignore device up notification due to
new session during SSR as soundwire hardware is
not ready.

Change-Id: I06a558d0fa9e31ed6bbdfab80402ba7b337e7ad8
signed-off-by: Ramprasad Katkam <[email protected]>
Ramprasad Katkam 6 年 前
コミット
0fed92f477
1 ファイル変更7 行追加0 行削除
  1. 7 0
      soc/swr-mstr-ctrl.c

+ 7 - 0
soc/swr-mstr-ctrl.c

@@ -2132,6 +2132,13 @@ int swrm_wcd_notify(struct platform_device *pdev, u32 id, void *data)
 		break;
 		break;
 	case SWR_DEVICE_UP:
 	case SWR_DEVICE_UP:
 		dev_dbg(swrm->dev, "%s: swr master up called\n", __func__);
 		dev_dbg(swrm->dev, "%s: swr master up called\n", __func__);
+		mutex_lock(&swrm->devlock);
+		if (!swrm->dev_up) {
+			dev_dbg(swrm->dev, "SSR not complete yet\n");
+			mutex_unlock(&swrm->devlock);
+			return -EBUSY;
+		}
+		mutex_unlock(&swrm->devlock);
 		mutex_lock(&swrm->mlock);
 		mutex_lock(&swrm->mlock);
 		pm_runtime_mark_last_busy(&pdev->dev);
 		pm_runtime_mark_last_busy(&pdev->dev);
 		pm_runtime_get_sync(&pdev->dev);
 		pm_runtime_get_sync(&pdev->dev);