From nobody Mon Feb 9 17:58:42 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BD6D43D518 for ; Thu, 5 Feb 2026 17:14:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770311668; cv=none; b=QbFu1OiDuzGbwz4L5/SPiFpazy64YwS7qQIRWDt9wtOl7Jc/OSLonEe/BRu+0eKSjOskFRhbc+CEo2Yce6aUnBu9RwqLsWU2Uu9U02ZNw61Qdim8zdpr0GvT1UYEdYwodyiBb+k96u61GdL50bZtZU17b9qcH3BBqX9tB8FnMv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770311668; c=relaxed/simple; bh=jFJ7rXFjEEX2IgSJ4lsi92py1epN7EisVUgldVC1iLc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bDFcxjunSnW5e+37Y0bpKQN3S7sd2MPG+OdshyBICUCeRYzGIn/X51mlM1NjtlCDDIhxgfQfZlSs0YLi7R/yWDDxycBEknjlO0/6sbja/Yjo8DvDO2obU05M2ZiLcWZbiwkV/YG6/k4/NCqpFduykaUizg0KuBeksqW5ypx9k2c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=HUBGYboi; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=W4j0ZGLz; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="HUBGYboi"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="W4j0ZGLz" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 615B5pIe3237394 for ; Thu, 5 Feb 2026 17:14:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=QeXNPncWOQl n6sXzodfErITJ/YZ4Z4KW6LENrZa0q1c=; b=HUBGYboiAca+MaF2KpgoQ754iG8 TaJP67DuKvNlFtHQidrv/ilchPjgi3fCMb7ZjjkKnfVLmcVoP+mJhR1bDX6GSZsa b9QDjK+NQ0rMtf/XE1g+HANQ9PPUsWoq2dTZrhvTRRrRoQabMM/4pM8irFioQSO4 vswgACJOuqzOROEWR2eXpO74EQYh37MYPdHcpoiu4exk2qomzFxGx2SYY63p86FL sjN656t6wPoYk8sQrRxMeI2CjybTFB9eVjYZtJmROK+xNAuIUhPYS9WfAq5KzOJa PIdILhNIKa6i3CqdC/J38nJ2c1XTaSDIifJ/SeGL/hGfAXtH9va//6HEICA== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c4cp53h9t-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 05 Feb 2026 17:14:27 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-8c52f89b415so313379085a.0 for ; Thu, 05 Feb 2026 09:14:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770311667; x=1770916467; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QeXNPncWOQln6sXzodfErITJ/YZ4Z4KW6LENrZa0q1c=; b=W4j0ZGLzdKAubAYmDHsyhZj2+Ueqy/0p69kFIQvVy4pYtt5a2qGhK59UTKCiPEQeYC CiDnn7dRrQVX4RthzfREMdawTsnftTI2BNFper30hlOKlR3LRoDuncjF2iq7JcBjXOGr S2thPPEv3IJNRsC8NSJWTatZpQQRSLgazcfwVp6vYEzdV1/f1VEhqt0FSTT6iTHoiDeM ZUeBkhmblCEupJ1TAizQbjwm4UyrW9duHFa19W88oT/fE8FwqNIlJLWvucks26DC/TAF 1HnNSwyPbvQ3Es72AId/ZUIK6SvnoZesbkf8bVka3EM4+aev6mzHRAU8W+jG+FS8p+x1 7ZZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770311667; x=1770916467; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QeXNPncWOQln6sXzodfErITJ/YZ4Z4KW6LENrZa0q1c=; b=JzCrwTm2oO7s2/D5VBulph9L8ByJKaCbqD3J4bW+M08F/su4bxWGkxNBb5A+9Houaw eiSw0o3+BeCZO8GPkrj5fKdmGJduHmPKWmEeWo2SojqNhmXsuLUJSEMzdpCr5vBpwKPZ ZYwXYM0bnr9Nw9T3L/H1MrC10uDHYkwWMAiGfBx94hhzrjkA/+JNh3epz7Udqdj+3WQH meSOKCJO2JGjh84lBFXE5PBQFhoEz0E84dPdVD5f61LoNAZrLh6Ae8i2TI36dGjmC6RJ VGUQE4HlMSwl/wRw9YBNzT1v2DlBlm3OzUSnVLplVfm6szZdwOVThbuIe4a4Y2obf9U4 BvmQ== X-Forwarded-Encrypted: i=1; AJvYcCUuuP4UzTFNTJbpX0TnIyao8b7hZLqBVz5yo1z5AXRGe7p2iIZuXVvYNnZtd5IH/0DGV7NWlmUGZi7HQvU=@vger.kernel.org X-Gm-Message-State: AOJu0YxzMVPyXPSHgi+01g1F/KBgxgC/qtL9x9iy/SD4OOA64OKyGiZI Lr802Eh5DKM9EKtjXlXCZ0JknKK+PIkDXcDHQgXbO57sGzPEo75YQ5I77JF9v+geK3UaUSpxco4 KIjFld0cToFntQNUbzXIvSLgmIcExw7vJKzmO1dMV2BIhgWGt/glUhUJGjD+RfXCVJds= X-Gm-Gg: AZuq6aKGypxCq0CqNuAm9lgu2BnlkdM3b99T7xf1wHeP0IEu0EMafNpMctTKYxb4/IZ UGBG+w1YIDCs96/lONgjMi7LttPV3WTUzZLkc7a9vLANqWbHiG2AZSs1SHgCANx6nB5VAbVcGHl b2gOuOoQcR+KTJ+NS87vkaChN16Vxbd5zLaw7cTALEtLIrS6vofzs/f+FlZWoNmnzMGb7auxS3U tjXEGFQWwJrgnoK3d3CHtQjKMu2yZdVr08U8NazQIZk+GDAtkNesoywD2sCYEGnzilSjXk6YCao LnaF7omM1a5WzXX/qIFxnvzmgtORun2h01+K0+Dgp0zh9PTbkjIKoiWekV6xYaqRGpuZgq9g1kJ KIjkFi3CnhW3cx/lnd8d5BjwH+GGsnNxeT7nSHBWV2Gc= X-Received: by 2002:a05:620a:1902:b0:8a9:ef98:6835 with SMTP id af79cd13be357-8ca2f8675bamr889402785a.33.1770311666947; Thu, 05 Feb 2026 09:14:26 -0800 (PST) X-Received: by 2002:a05:620a:1902:b0:8a9:ef98:6835 with SMTP id af79cd13be357-8ca2f8675bamr889398985a.33.1770311666447; Thu, 05 Feb 2026 09:14:26 -0800 (PST) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43618057f87sm14802849f8f.21.2026.02.05.09.14.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Feb 2026 09:14:26 -0800 (PST) From: Srinivas Kandagatla To: broonie@kernel.org Cc: lgirdwood@gmail.com, robh@kernel.org, krzk+dt@kernel.org, cnor+dt@kernel.org, srini@kernel.org, perex@perex.cz, tiwai@suse.com, alexey.klimov@linaro.org, mohammad.rafi.shaik@oss.qualcomm.com, quic_wcheng@quicinc.com, johan@kernel.org, dmitry.baryshkov@oss.qualcomm.com, konrad.dybcio@oss.qualcomm.com, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 08/10] ASoC: qcom: q6apm-lpass-dai: move graph start to trigger Date: Thu, 5 Feb 2026 12:14:09 -0500 Message-ID: <20260205171411.34908-9-srinivas.kandagatla@oss.qualcomm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260205171411.34908-1-srinivas.kandagatla@oss.qualcomm.com> References: <20260205171411.34908-1-srinivas.kandagatla@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=Oc2VzxTY c=1 sm=1 tr=0 ts=6984cff3 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=ZsC4DHZuhs/kKio7QBcDoQ==:17 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=D19gQVrFAAAA:8 a=EUspDBNiAAAA:8 a=nXfEiGUnzg8titmCROQA:9 a=NFOGd7dJGGMPyQGDc5-O:22 a=W4TVW4IDbPiebHqcZpNg:22 X-Proofpoint-ORIG-GUID: QIoz0lpM5thP8GLLg8cfVJ_1_tEviNV3 X-Proofpoint-GUID: QIoz0lpM5thP8GLLg8cfVJ_1_tEviNV3 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjA1MDEzMCBTYWx0ZWRfX41GUXFhnZqvL 5UIrFMTNVvZ5m+Nd0JieZdYVnLMV2FVaMY8NlB7Stcwrf3v6VkZrPx+Ogn7NDXQWefndExyiqvP sd1vIjde7KdLHcMq80FUlJAJOfsxpcn08z5+ul4p5gij0VMemVn4un2RLm8mPeVMpUEYFH4rMjH B7ko0ZJK5JpoJNkCSZLw3I/Ksn9p3AKJN0Y8jsfKqpQ6zuGRkycgeviTctfmzTssM3ApREJlyUU ONyR30P12kdykna9RM6XaIJBw2QusGRoxOcWm8ZWiOf9Adxq1b4M/K4Mz2aIM0jcjumVWb9arvG O0Sogo9PsX8vCD8r3INUMjv1lRibGAX+HbQhdFfHC80v2Qs/2fZgJNkYSa18CgXWqwLeHxvogxC jg21OacI0urOgK7F1q8E/4KdWsHef3fmMroei5Yghhvk1XKlo0SufWi28ntGn3S2/hKGr3Y3s9g 2RPmOI+m/huIzDFwZhw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-05_04,2026-02-05_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 bulkscore=0 priorityscore=1501 spamscore=0 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602050130 Content-Type: text/plain; charset="utf-8" Start the graph at trigger callback. Staring the graph at prepare does not make sense as there is no data transfer at this point. Moving this to trigger will also helps fix some of the issues seen with pipewire and display port. This should also fix some of the Qualcomm DP cod= ec issues discussed at https://lkml.org/lkml/2025/5/29/102 CC: Dmitry Baryshkov Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/q6apm-lpass-dais.c | 39 +++++++++++++++++-------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c b/sound/soc/qcom/qdsp6= /q6apm-lpass-dais.c index fc246485e326..21624a2803a6 100644 --- a/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c +++ b/sound/soc/qcom/qdsp6/q6apm-lpass-dais.c @@ -159,6 +159,30 @@ static void q6apm_lpass_dai_shutdown(struct snd_pcm_su= bstream *substream, struct } } =20 +static int q6apm_lpass_dai_trigger(struct snd_pcm_substream *substream, in= t cmd, struct snd_soc_dai *dai) +{ + struct q6apm_lpass_dai_data *dai_data =3D dev_get_drvdata(dai->dev); + int ret =3D 0; + + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + case SNDRV_PCM_TRIGGER_RESUME: + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + if (!dai_data->is_port_started[dai->id]) { + ret =3D q6apm_graph_start(dai_data->graph[dai->id]); + if (ret < 0) + dev_err(dai->dev, "Failed to start APM port %d\n", dai->id); + else + dai_data->is_port_started[dai->id] =3D true; + } + break; + default: + break; + } + + return ret; +} + static int q6apm_lpass_dai_prepare(struct snd_pcm_substream *substream, st= ruct snd_soc_dai *dai) { struct q6apm_lpass_dai_data *dai_data =3D dev_get_drvdata(dai->dev); @@ -171,10 +195,6 @@ static int q6apm_lpass_dai_prepare(struct snd_pcm_subs= tream *substream, struct s q6apm_graph_stop(dai_data->graph[dai->id]); dai_data->is_port_started[dai->id] =3D false; =20 - if (substream->stream =3D=3D SNDRV_PCM_STREAM_PLAYBACK) { - q6apm_graph_close(dai_data->graph[dai->id]); - dai_data->graph[dai->id] =3D NULL; - } } =20 /** @@ -203,14 +223,6 @@ static int q6apm_lpass_dai_prepare(struct snd_pcm_subs= tream *substream, struct s dev_err(dai->dev, "Failed to prepare Graph %d\n", rc); goto err; } - - rc =3D q6apm_graph_start(dai_data->graph[dai->id]); - if (rc < 0) { - dev_err(dai->dev, "Failed to start APM port %d\n", dai->id); - goto err; - } - dai_data->is_port_started[dai->id] =3D true; - return 0; err: if (substream->stream =3D=3D SNDRV_PCM_STREAM_PLAYBACK) { @@ -254,6 +266,7 @@ static const struct snd_soc_dai_ops q6dma_ops =3D { .shutdown =3D q6apm_lpass_dai_shutdown, .set_channel_map =3D q6dma_set_channel_map, .hw_params =3D q6dma_hw_params, + .trigger =3D q6apm_lpass_dai_trigger, }; =20 static const struct snd_soc_dai_ops q6i2s_ops =3D { @@ -263,6 +276,7 @@ static const struct snd_soc_dai_ops q6i2s_ops =3D { .set_channel_map =3D q6dma_set_channel_map, .hw_params =3D q6dma_hw_params, .set_fmt =3D q6i2s_set_fmt, + .trigger =3D q6apm_lpass_dai_trigger, }; =20 static const struct snd_soc_dai_ops q6hdmi_ops =3D { @@ -271,6 +285,7 @@ static const struct snd_soc_dai_ops q6hdmi_ops =3D { .shutdown =3D q6apm_lpass_dai_shutdown, .hw_params =3D q6hdmi_hw_params, .set_fmt =3D q6i2s_set_fmt, + .trigger =3D q6apm_lpass_dai_trigger, }; =20 static const struct snd_soc_component_driver q6apm_lpass_dai_component =3D= { --=20 2.47.3