From 14b7a73d8d8e304911683a4bc9252cd54768b897 Mon Sep 17 00:00:00 2001 From: Deru Wang Date: Wed, 27 May 2020 11:51:24 +0800 Subject: [PATCH] asoc: msm: Add early chime marker Add marker for early chime KPI. Change-Id: I6e15dabfa333182539a8d0a1dde2e0ba57b9718c Signed-off-by: Deru Wang --- asoc/msm-pcm-q6-v2.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/asoc/msm-pcm-q6-v2.c b/asoc/msm-pcm-q6-v2.c index c8114054d4d8..893cd49e7439 100644 --- a/asoc/msm-pcm-q6-v2.c +++ b/asoc/msm-pcm-q6-v2.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved. +/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. */ @@ -31,6 +31,9 @@ #include #include #include +#ifdef CONFIG_MSM_BOOT_TIME_MARKER +#include +#endif #include "msm-pcm-q6-v2.h" #include "msm-pcm-routing-v2.h" @@ -640,11 +643,18 @@ static int msm_pcm_trigger(struct snd_pcm_substream *substream, int cmd) int ret = 0; struct snd_pcm_runtime *runtime = substream->runtime; struct msm_audio *prtd = runtime->private_data; + static int first_time = 1; switch (cmd) { case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_RESUME: case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + if (first_time) { +#ifdef CONFIG_MSM_BOOT_TIME_MARKER + place_marker("K - Early chime"); +#endif + first_time = 0; + } pr_debug("%s: Trigger start\n", __func__); ret = q6asm_run_nowait(prtd->audio_client, 0, 0, 0); break;