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 03B0C368D66 for ; Mon, 29 Jun 2026 14:16:50 +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=1782742612; cv=none; b=JY8j/jUhxk3AtqSEzfWF+aPq4aS43vPNUkPM6y4EWJ9+ZJlNdFZ/kXU+B9R3D/HEXVrTDllhZ6XrHJ018erwiGH5MNfDEM75afiyqAl7qNl7c+xrFULojIkYkocIYM864yFPG4Q9VGz8hCtUogidj6w9WrTGLGcxpBk/KaZUC3k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782742612; c=relaxed/simple; bh=ujKFGrBXfqzzTWYWiLZhzbg8yaOGSF7iUYvN9/dYiJI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=mLaY+mVaYVaR8XLeI5uSg4Mfj4Mt58jn7JQQKgrvdzgjfPG63iY2X21S3A7dQrfd5WwlPKz5JPu0H19/YLz4k0T4A4LbiATugD9gUvFBPvLzl8bwlL5cc/4mqlZRYz5mSF++Q2aWyDopOM77Oe3gmWz3lo7JiFYPJd6R+vwA0uE= 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=I4V20ZYJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=L+2h7g6H; 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="I4V20ZYJ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="L+2h7g6H" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 65TATZD92592988 for ; Mon, 29 Jun 2026 14:16:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=qcppdkim1; bh=3BPlLjvuawkSXnix132EPJTzuTnANMmOQWr ZnYK/bR8=; b=I4V20ZYJlZ/zhQTKKzMSOaOyTstEz3yCPBg6wZ6zBt8aRQFHWUH lBTeXK3WiaqJD62QP901tGkPKZtv0Nq6IFrq5ufLqW97azJ9esbh4QjjQRnStlZc U2VmZb/3RIeHiooJGn6+wN00thfpi27kPive5H6n42G1yvXmJbK+enjYRja9D69V yW0ljbT84UNCTH+oCXBsZBIJQwCGROKdZBQyENcRs3gathxHMBE2NAnha/RXDdjX qFdzge/q3W5WpRhUs0ePGcj+OBwqFZyXDCGx5ZiPFcD8dIK+e0SRx7rdXEQ6NLqd wUUenp65p6ULMEkY8yQS1BelpZp9s6LODVw== Received: from mail-ot1-f71.google.com (mail-ot1-f71.google.com [209.85.210.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f3k7vj1qw-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 29 Jun 2026 14:16:50 +0000 (GMT) Received: by mail-ot1-f71.google.com with SMTP id 46e09a7af769-7e9dee2f7b5so1301228a34.1 for ; Mon, 29 Jun 2026 07:16:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1782742609; x=1783347409; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3BPlLjvuawkSXnix132EPJTzuTnANMmOQWrZnYK/bR8=; b=L+2h7g6HbgditjzHzvybO00yEw9leQSKFiQsj8NrRZu0/Bg5Tg/fg9bHgFHVZtILcG eTY0HFUr0rKUr+5hGq72R8R7Zbdh2TibSV1B5zNrgm8VSwzGfzGNWvn8+prmZ9UVofZW IFhjwmBYPnMHcxtO9Wew/3Swrf9Mc+/8RjGNrJn2FkJJ96ZmSVCQF8hF1XsQhqfVzdNT 9kVzu4yc8df5mWHsn4yCJbvyt4krOOC0Ffn1dHsJ68Gm3xK4CcL8ZKiy39tNcuQBt3/U GsXLH1IjjVhSk2nIpmQFJG2RKFTpkkcH8x9WL9z33IdL744iTFlybS/9OVdKrhE+3pNE iWYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782742609; x=1783347409; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3BPlLjvuawkSXnix132EPJTzuTnANMmOQWrZnYK/bR8=; b=ANnCjGbyqqxYzE5R/nULyUvSxHJh5D07w6C6pxDOMmW+l6dwI/QihbhhRA0Qpv3xJd 94tn5hGAuDg1AkyHQdMcOTC/SQQ0dfhArbg6iTUz9fXHWI4Eq8re7YmxKzLAZ9uxEh3n GMQawed1k9h/X/Q+cu2dj5LS56sGy84CQp8TgeJ4dTnr+ZByCNwmm6xUJLz+gSV9tvm/ 4MKeBQcpnXRZhQEwdjF/R34ukcZxdC3HI05mMiFkUd20D31eLWMRQX6AmOfdFJaTMP1P tLyGw30uMaQzU6EJWZhDzfW3C7dMMGih91tVpDY7q0a8ZZCmjZ2sQ/GmOBFDeZIfgNN0 n3Aw== X-Forwarded-Encrypted: i=1; AFNElJ+eQm5HPBUBmN7ryubjrC7UMCx/2FTGQtsLRwTGIu2VtwwN4NXUYAWf6l2ybDw1XHbyBlMztnIMTEU++14=@vger.kernel.org X-Gm-Message-State: AOJu0YzUUqUyMnG8d2sDFgbC8vfPn9ATRunVgVmF3BiA8yAktxkPUvZB 9Mjtr4Fd7fI7pQPuQcBbbjMq6cYZ6NSl9lWKoz2Tm6aeD1crv3zB//ZRZW3c8wAw17+jhnaZXXw 0iVP5lDUoVN3CMXUVNPSkqRsV0HJLLcJnfY4eT5KQzpj8VlDqNwVP43MKCw0jm9uD21Q= X-Gm-Gg: AfdE7ckjCoJzw8hkviRP/8LS1foqFbsnm2u9VAD592wrUSXtk4b40xYIwOKXaIWOJKl cTHgcylZGa/3+UQPbII6YFg4q6zk3e+5rXGUitodpRaFAJxF2y7MlGN7zEi4ctC/kTKXH3G2e32 pQDQIfo4udy3tJLwtOC+sWPQhZbX5GfVacYNc9rRlIzbSpu3lPCMTxIpsG3H+rdfiRiyIv4ZmAR mL7n1r9jKE6JPs3sEW3a1kf/USqvRs6OwF7sWpzEA9QcU3f0q8QZZd/NKybRSJI8hCZOar3mldB wFegonq3u6GR/YXulucC1PQbvWoxh9VnjlK9yeX3jfUeii/94OjwaNlpVZSuXJjEe2GTPcgPqIS XU6UD8yx8kuZ4mp88Bj4xmU+HA+TZTdwxi+LbiJG6tj3CDRo= X-Received: by 2002:a05:6830:f83:b0:7e9:eaf2:edff with SMTP id 46e09a7af769-7e9eaf2f456mr125051a34.26.1782742609391; Mon, 29 Jun 2026 07:16:49 -0700 (PDT) X-Received: by 2002:a05:6830:f83:b0:7e9:eaf2:edff with SMTP id 46e09a7af769-7e9eaf2f456mr125019a34.26.1782742608855; Mon, 29 Jun 2026 07:16:48 -0700 (PDT) Received: from hu-mohs-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7e9aa5d3500sm8584812a34.8.2026.06.29.07.16.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2026 07:16:48 -0700 (PDT) From: Mohammad Rafi Shaik To: 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 Subject: [PATCH v1 0/2] soundwire: qcom: Restore and fix set_channel_map support for SWR master Date: Mon, 29 Jun 2026 19:46:31 +0530 Message-Id: <20260629141633.86657-1-mohammad.rafi.shaik@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-GUID: F2WWcfL1zI0YHT6tA-JcZsfV6VDmrCPh X-Authority-Analysis: v=2.4 cv=CqCPtH4D c=1 sm=1 tr=0 ts=6a427e52 cx=c_pps a=OI0sxtj7PyCX9F1bxD/puw==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=pegW1h1avVakzY11HMUA:9 a=Z1Yy7GAxqfX1iEi80vsk:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNjI5MDExOCBTYWx0ZWRfX42Ob/udrf1zo Go+bqeHDhE7bfF9Mb4xJH9PAOFF7khl/z5TN+Tk8SlyqCGkl7USFh1zwZTSQEeyGKcZbduNoAvW 5ijtK7dZw7RJ0s+MvGHPWnnLB3oFhfU= X-Proofpoint-ORIG-GUID: F2WWcfL1zI0YHT6tA-JcZsfV6VDmrCPh X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjI5MDExOCBTYWx0ZWRfX/GuJtMMFSMWK t0Bc5lZ7wYFLy2Q9i1Mxd87JGpMvG+8BHtU/l8BF3VqoEKbK0tUyg1tOD9hNdQOcURfFnrapM7n LMdNTujNSFNm+AioICUc1lYOPTOH812y51gV8vAYLFYpyXwj4lNSwOFkTgfl44gOQaE1goN+C89 P/+cq1QEt7In8H7uL0xb5zgDBslUGkTYX0JX80zs8UbTjRsfPp3wvgcdz4wxKql+VE4D5Dh2lIR +T2ymr/LK2i8jGkCsHHf7w5U6ILm58sK1E/RuSk89GtL+kNjAdGWkQRuKaHzhMpytmp67jxrDrz tVtrX6Jf7/0JzI/e9V89+j25s7Lk85Yt/0wXoFscTNEWVwfwLcyiqRR0eel7rIMSS0DL+yZVwQT FcB2/ClpzquRua/svWXWnhFbqGTkHfqfih+S3Yyogs6NFJzEL+3JNTiqT4GXp9bjpLBIx0Plz0Z UAwuL7YwLBSnzgGwlpA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-29_03,2026-06-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 clxscore=1015 impostorscore=0 malwarescore=0 priorityscore=1501 spamscore=0 adultscore=0 suspectscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2606290118 The original support for set_channel_map in the Qualcomm SoundWire master commit 7796c97df6b1 ("soundwire: qcom: Add set_channel_map api support") was reverted due to multiple issues reported on sdm845 board, including kernel crashes and data structure corruption. The root causes included incorrect port indexing, array size mismatches, and improper handling of TX/RX channel information. This series reintroduces set_channel_map support with a corrected and safer implementation, and fixes the sdm845 machine driver to avoid misuse ofthe API. Add a robust qcom_swrm_set_channel_map() implementation that stores per-port TX/RX channel masks safely under controller lock. Ensure the configuration is only applied to valid ports and does not corrupt memory or overwrite unrelated data. Preserve existing behavior for ports that do not use set_channel_map, by falling back to the default SoundWire stream configuration. Fix the sdm845 machine driver to avoid applying SLIMbus channel maps to SoundWire DAIs by skipping DAIs that own an SDW stream (identified via .set_stream). Mohammad Rafi Shaik (2): ASoC: qcom: sdm845: skip set_channel_map for SDW stream DAIs soundwire: qcom: Add set_channel_map support to SWR master DAI drivers/soundwire/qcom.c | 54 ++++++++++++++++++++++++++++++++++++++++ sound/soc/qcom/sdm845.c | 27 ++++++++++++++------ 2 files changed, 74 insertions(+), 7 deletions(-) base-commit: 3d5670d672ae08b8c534b7beed6f57c8b44e7b43 -- 2.34.1