From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 016792BE035 for ; Tue, 7 Jul 2026 04:35:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783398906; cv=none; b=WvkzDMkL9nLUu/faJyKF3s6HUOt4ZonGv5hSCPYcIq2dTBOKz2wHcHfG3OFrox1d3kQ0/j7TSu130tCBM9IxtsqzAZK4Qry7ZSf/7npvnsmkwIG6tyOv76Pb4AYfGi20ZNzID6pv74qI37/QXpwnnnEeaZVph2nSM+zHex8Os0M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783398906; c=relaxed/simple; bh=0ZDXcfZh/a8ozHKkJratTsK93XDJ1Omu/IMErKmyXOE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=VDXiAWO26l8MVsY6OSiSQBhBNLUJkCMrn5c+kZujV5fNOLOwQa/5EtPOoI4n/BLNwk63+KGbj2fWhXNivvi7/UNVn0KAjB3W0r976qL7ex9yQ55V1uGfIJkpLrU7Ar3wsHpLVYun8BAfuzO5WsxJzXAPnvz2xZhzLmqEEwGXBS0= 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=kEUHYdCl; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Foa3/5TT; arc=none smtp.client-ip=205.220.180.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="kEUHYdCl"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Foa3/5TT" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66749JQA2658352 for ; Tue, 7 Jul 2026 04:35:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= kyYq8sBYzFKE3ux1MlmqCOVytU/P+geB4TI6ffQ2Iu8=; b=kEUHYdClJ6JjwNI0 L3tpe27LIP3BusL1/hwEMnHLchU+QzLwjmeNryYtxVOTQgNmThgUaW0Rch1MU6Iv xgWP3QaKoz1JgOPJXKLd6yCtDpQbiiduduRotxQqCLQa93cObXcVJ7PAOX0xL4xz 1fxIJxfXb9c+QC/SwXo0vScd/tIN3tkjRUx3a1iWXw8+3ZLvHYvAG2Q9XVMw3crK SXG6kwcTZlFjw7htlACrFnr57Su50XC7M7iVCCMUjRXFKj9vwFf7IqoV86HmNdSB 0mWUmDca54VEb9XPWbUEvx0sd8lcnOY6aig1cg7tvenc+LLIFeSupo6s8hacQfh4 NPIl3A== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f8a3r421x-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 07 Jul 2026 04:35:03 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-37fca5f21b1so349081a91.0 for ; Mon, 06 Jul 2026 21:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783398903; x=1784003703; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=kyYq8sBYzFKE3ux1MlmqCOVytU/P+geB4TI6ffQ2Iu8=; b=Foa3/5TTIUMtkVOb1gdfp7DRex7NG5Zgdw30M319CQaDClRinAbsJDNB2dCdb22zWR d2vOXOTIe3UHQRrz4cOHT1u4EW83BwgTQ9nx6KUEo4c5MjNgR42qlxFxQKQt/bpUtzP0 wpmqAcgCwMhbWSQkcMtK9EqRxKhetmT4FEdKq4iAga1S4riAoKCwPpDBIrScrer+QVEM To+HRBjV60K/Oyg0Hq0dB0U9D0evWnBrZSLVQjIdAP/Qn2QvNZBSvgWhiCWvMo20CBKk 8VYXFLxIgEauhaeDzHUBNpOOCWsfrWo448fo2Bd9qyPJZeB88taK8aspUul1yWyFYZPp OciQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783398903; x=1784003703; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=kyYq8sBYzFKE3ux1MlmqCOVytU/P+geB4TI6ffQ2Iu8=; b=pJ92a4H6+WD/Dso85WkjFgibRVsKmJPMeJv1iyszyTU4y/v/PKFEGRke6sxNpFzlZu b116DN50A7XOc7vfbll8pyrG3ojdOlTnyDH7svPkUx2TSqtLpx0qO+LAQ1S5UWo2s4GR gLA5pbzcd8hg41+KT9kISFLFYC/zkmXeEEnqdU6fopIAWeVl940ISDDtHfUWdRCyr5Wy 4mvOT/5Bv26Smqp4gBvdQLJHMD8BmxOWU0V01gSK7uc2AX9UJ0kLI6lakkz3WiulwogS gBFYgRFxkluydWva/Ka3ZAeso1yVQH7TtQe8ESfvDSTdBeef6epfqA4GtiyMb+2gmzdC 1SlA== X-Forwarded-Encrypted: i=1; AHgh+RpUc3L8sCdVJZ0q1Lrqo6MYt91xuVy2pgTDmkw+wVVYCLfbgz0fa0mX1uCmayZ7Q6NdzgEL3cBMR+xDovQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yww/1eBWXjxsmrHWBjV/o19mQtMYIKX2vqzBZTjUHZMaDfcl3/o s6LhdW89qqx1/Q0VE06MpxceQ5RfWB3xeyFzSUi2zPvk7XFrYcRwPsQUHUFlhQ+gqqG6mrMkuCj 94mRG7Mv+7aeNKTJiyXOw51Bg+JHjshgSfcY61uBP/35zj76lRC2tTPP874aI79M2efw= X-Gm-Gg: AfdE7cnpPjfFDp7Jz7C/0RPPbeHe78Tl7JOGOsjg1XqA3dZ4Ia3vQWj1h40G7H4btAi n+LV6foWFQufi7fELIi+31OGief1DAj6OeKu06y7V4kwAp0BllljrrhGxRU+gjxbbC7bwC3pcKV Xugo67zRSwrgkt2SCL3toNEnEy2xpcXse90gGBesrLbBoWCyr1w7CBKgZL2sTlCfU5hOxQIu1Vm 0Aoy7ARNxmBflnBMSYGgr0X2rkuakMIUd/Q7RivAN6uZMLXRUeANkCAunet/TIrSjGtVkwAzs5q S2m27sIUaTu+XCkdj4yC2UBrHvUlevDvts85VqmZ6c7TFgJ4fzuL0ukpWriK9ayZ7xS/wKzsyGo o4Trxo0kIwSVku/QTKOD5BJOH52NvPv0bJWfTA49TTdPKv3x6YQ== X-Received: by 2002:a17:90b:3e46:b0:37c:8df2:9f58 with SMTP id 98e67ed59e1d1-387d7750f36mr1478166a91.7.1783398902878; Mon, 06 Jul 2026 21:35:02 -0700 (PDT) X-Received: by 2002:a17:90b:3e46:b0:37c:8df2:9f58 with SMTP id 98e67ed59e1d1-387d7750f36mr1478123a91.7.1783398902332; Mon, 06 Jul 2026 21:35:02 -0700 (PDT) Received: from [10.218.21.154] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3117462f5c7sm4147256eec.0.2026.07.06.21.34.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jul 2026 21:35:01 -0700 (PDT) Message-ID: <966a4aa9-ba4e-4f09-b151-29a77db4201a@oss.qualcomm.com> Date: Tue, 7 Jul 2026 10:04:55 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 1/2] ASoC: qcom: sdm845: skip set_channel_map for SDW stream DAIs To: Srinivas Kandagatla , Srinivas Kandagatla , Vinod Koul , Bard Liao , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Mohammad Rafi Shaik Cc: Pierre-Louis Bossart , linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260629141633.86657-1-mohammad.rafi.shaik@oss.qualcomm.com> <20260629141633.86657-2-mohammad.rafi.shaik@oss.qualcomm.com> <6cc41123-6d6e-4a93-91c2-5a2035dfccba@oss.qualcomm.com> Content-Language: en-US From: Mohammad Rafi Shaik In-Reply-To: <6cc41123-6d6e-4a93-91c2-5a2035dfccba@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzA3MDA0MCBTYWx0ZWRfX22Vx+YpG6Is6 F67/VfdhKeiPYgVf7F91BLLYbDzKTatfd5BtEZJTWfbY57t6A7v/w1DXTt9NpSZZdDXbsfnYBic SH47kNaXg3EzSD1ZEFPFi/HUc1jW9Nbjbdw1uBblc6BgJY4FPKPmhjARh5uqUm+qq+bDXmu36vi waFFf2Jr3h7P2GL5jrE/Mof1bUxMHQ7CrfNNGVnoMdAsGYaG5RInLORRfbNBUUXNUxSoGBIwAB7 i3izSyHtySrPihbVYUaq2RyxxU0kRoCBFwSCwrWTdVn6FG1Lq2TNuJzKxF9yLcp3nzUEYFlBKgH vkZJzYMEbYAimD9xJ6MjBfWR07alrU1gC7xP0AZzbBAB9tiqy9o2dPRrifkT5u3O8oZ1LRRFYjV B3DajoAbGapHVaevNnzRGcQaJJpNFyTD+gSKMPVjqtRIRLQxb6slIIIfCRK/ZtHzZ1j4RGj1geE P79RTENwkXh4ORbiVkg== X-Proofpoint-Spam-Info: AW1haW4tMjYwNzA3MDA0MCBTYWx0ZWRfX18ePN2js5Qzv ZLtbLFGd+Kx8RAex/RVLkKo79Bd0VHrFXgEs93uqxOL8tL97HFD+9JBHfMJpiEZr0bukXYFKK8J dMQKbTKgOehOQt4D8usIy7UMfkXv7s4= X-Proofpoint-GUID: Us2Fk3_Xo6ySHEuQiD1xcRfHdBAF2P1e X-Proofpoint-ORIG-GUID: Us2Fk3_Xo6ySHEuQiD1xcRfHdBAF2P1e X-Authority-Analysis: v=2.4 cv=OKcXGyaB c=1 sm=1 tr=0 ts=6a4c81f7 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=r7bdlasGZOuuhPoSvjYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-07_01,2026-07-06_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1015 suspectscore=0 spamscore=0 phishscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607070040 On 6/29/2026 7:59 PM, Srinivas Kandagatla wrote: > > > On 6/29/26 3:16 PM, Mohammad Rafi Shaik wrote: >> On sdm845 the SLIM Playback backend lists wcd934x alongside the qcom >> SoundWire master and its SWR slave speaker codecs as codec DAIs on the >> same link. sdm845_dai_init() was calling set_channel_map with hardcoded >> wcd934x SLIM channel numbers for every codec DAI on that link, including >> the SoundWire ones, corrupting their channel configuration. >> >> Skip set_channel_map for any DAI that implements .set_stream, as that op >> is the distinguishing marker of DAIs that own an SDW stream path — both >> the qcom SWR master and SWR slave codecs register it, while wcd934x does >> not. This confines the SLIM channel map to wcd934x where it belongs. >> >> Signed-off-by: Mohammad Rafi Shaik >> --- >> sound/soc/qcom/sdm845.c | 27 ++++++++++++++++++++------- >> 1 file changed, 20 insertions(+), 7 deletions(-) >> >> diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c >> index 0ce9dff4dc52..509d7a551397 100644 >> --- a/sound/soc/qcom/sdm845.c >> +++ b/sound/soc/qcom/sdm845.c >> @@ -294,13 +294,26 @@ static int sdm845_dai_init(struct snd_soc_pcm_runtime *rtd) >> return 0; >> >> for_each_rtd_codec_dais(rtd, i, codec_dai) { >> - rval = snd_soc_dai_set_channel_map(codec_dai, >> - ARRAY_SIZE(tx_ch), >> - tx_ch, >> - ARRAY_SIZE(rx_ch), >> - rx_ch); >> - if (rval != 0 && rval != -ENOTSUPP) >> - return rval; >> + component = codec_dai->component; >> + >> + if (!component || !component->dev) >> + continue; >> + >> + /* >> + * Only wcd934x (SLIM codec) needs these static channel maps. >> + * DAIs that own an SDW stream — the qcom SWR master and SWR >> + * slave speaker codecs — implement .set_stream; skip them. >> + */ >> + if (!codec_dai->driver || !codec_dai->driver->ops || >> + !codec_dai->driver->ops->set_stream) { > > This is totally a hack. > > --srini ACK, The intention was to apply the static channel mapping only for the WCD934x (SLIM codec) DAIs. The existing machine driver logic uses hardcoded channel maps which are only applicable to WCD934x, and this path was unintentionally applying them to the SoundWire master DAIs as well, which is not correct. I agree that the current approach is not ideal. I'll rework this and address it properly in the next version. Thanks & regards, Rafi >> + rval = snd_soc_dai_set_channel_map(codec_dai, >> + ARRAY_SIZE(tx_ch), >> + tx_ch, >> + ARRAY_SIZE(rx_ch), >> + rx_ch); >> + if (rval != 0 && rval != -ENOTSUPP) >> + return rval; >> + } >> >> snd_soc_dai_set_sysclk(codec_dai, 0, >> WCD934X_DEFAULT_MCLK_RATE, >