Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1984360lqb; Mon, 27 May 2024 04:21:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU/CYqSLv8iuTvO8V0ZHw7ui4TQXp19zg9a1Tu83vk36J9aVz8tcBnjhTMxJFSlC40v83XMWwjhLG7ZNOfg0SE4LhNUy+ujgfAstmmt7A== X-Google-Smtp-Source: AGHT+IF0tlGX4B1b+8iuRUTcHVj0M4Hd+j/XX6omJ1OwdHwaH2dyKiLLX/KHFOpHG7pXPs5BNMQb X-Received: by 2002:a05:6358:592a:b0:196:cd67:b48e with SMTP id e5c5f4694b2df-197e5100820mr1156047955d.9.1716808909346; Mon, 27 May 2024 04:21:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716808909; cv=pass; d=google.com; s=arc-20160816; b=kkg85ND8RQMhOJ/Ave/oJce77W77iZCKLvfK0svDls0MTXXaS+iTQcPg/F396ZcQy/ B/LjgHSz+wausCyc6ZHWZFM33HLdGyKkpSW0hhZOpLs6jOuqEOsqjS2pa2CV0SaZbSlE 0x0S13V3TW6HjD3eWM7dUIFF9+nSOyhXSzV4O1DXp+fgBlBX62eD248i8KdUvF8k48Oy t9uZXIpOfKYVySszwcEVXSEUeSLv1RkFvd1LY/LCloJOZP1BvYSDkKxABPkMzPnFf1FJ iHeny9IkKJlAPq+7U2u60htWEVeJg7dQak8toq6vcugh+g/8PsCkuiU3cJOn4ysmwsWe xo3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=/1ZklVoOrwSkd4lzSC4LbuJU2W9DLkXEvjmiVexwaWA=; fh=RZGL9QkT1KDtHi2BtdmE8j4WTQ8TVfVDoEV2YPPBAw0=; b=qD6CNGU/nsV3C9E5bQO+L9wHB+X55Z8RwxGW+Ma+5VUY7jbJwsIU/hawSK3fn+myeD m54PvLHiJqPCo43aZ1BxUUBUl6gmDqiu0xdlKiOcV/npy6nqWHve+5vVRD0V/si2nFrq 92w3UWq1oG3UmUpyuqZFc7V9sVQwUJB1Fq6bROyWqUSdxgREKBU4g6sIfg0e8IgHz2fA G6tfdMHymgbtt7RsNPORzQ6G/nqXf5URfyJkXuP6ZVXsd8dbb4F3HWazKgayuqRp6zU4 6VpL0PTT1OvbieNZxmDAPdvTGbECR2gv6h8HSQqiul+GbTeZkENAWxu5qoMHkVa7pv6z GHYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=niLM22zF; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-190474-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190474-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-697cc79e8d2si2856400a12.5.2024.05.27.04.21.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 04:21:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190474-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=niLM22zF; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-190474-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190474-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 48B02284214 for ; Mon, 27 May 2024 11:21:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E18A213C906; Mon, 27 May 2024 11:20:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="niLM22zF" 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 57D4E13BC2B; Mon, 27 May 2024 11:20:39 +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=1716808841; cv=none; b=WdnazdJZ21qWiNeQtgh+/YM7ZHv4ZnY1+HlIJkRofBt8kypKGfw26iyRq63LJDqb3r8AaN6143NiPv1ldJF5lbRGszEN6kmzBXg+HEqJf2ELNrl48pQsW6PxZUzYlOZbOGcY8TKUl9mJUq3A7hYyTA0QfHIH4KtHIWo3EBFBRWU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716808841; c=relaxed/simple; bh=x3PCC0y6uaaeDTE8kkDcP+KwrqIGNwLnAeqUptXq5tk=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=RlGoxlbngcMDXjVPm+jUlzcfjmxXR0cM6Y2cMAUgK6fD8Wn5+aIP2Yg0KTq0Ww2r+9wCHnER/H2p+aSVvEy6Q74ogOMJjfLNi66RYICF3/SQ+ayjEmoMcDuw4oLB1bmZelKorJFAhDdwraJUk/KuPP6U0CQRYpnDvK7yvwIxU3M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=niLM22zF; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44RB5gDB010181; Mon, 27 May 2024 11:20:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=/1ZklVoOrwSkd4lzSC4Lbu JU2W9DLkXEvjmiVexwaWA=; b=niLM22zFp8Oj13S/66UYFITWTVfq/Gy693KsJH 8+TC+ijVNoeuw+Exh6CdBsL+c/v5RP2iefx5cZqJQtS+DuvngTGlAgOY4JaBoJed vjh8p9U97lxfooPBx15zEEYvHM+hE48072NwdPHI3Pt7QkbkGXa4xK89p9ARLOqY wNkbmzMe1z51GX+8zXwihRrG9pGT3M2CI73eXGcmIWrdFHSnCn/btNV6QXDGYlMi lkTC04W0YCr39LiurqEAbKwGmUawxhj/LTXISHBgHNeGjfxKABVcr1Lcz6imd9UA MHFEPw3ptq4c1T2nkiTw+DOh+hS+ANX3Qnv90tZKZ1szhIXQ== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yba0pkjp3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 May 2024 11:20:17 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44RBKGX5030159 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 27 May 2024 11:20:16 GMT Received: from hu-mohs-hyd.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 27 May 2024 04:20:11 -0700 From: Mohammad Rafi Shaik To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jaroslav Kysela , Takashi Iwai CC: , , , , , , , Mohammad Rafi Shaik Subject: [RESEND v5 0/7] ASoC: codecs: wcd937x: add wcd937x audio codec support Date: Mon, 27 May 2024 16:49:49 +0530 Message-ID: <20240527111956.444425-1-quic_mohs@quicinc.com> X-Mailer: git-send-email 2.25.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 Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: fc-T6zG3bIrWgESAa0gINxkXbYu-Hsz3 X-Proofpoint-GUID: fc-T6zG3bIrWgESAa0gINxkXbYu-Hsz3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-27_01,2024-05-24_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=558 bulkscore=3 suspectscore=0 clxscore=1015 lowpriorityscore=3 priorityscore=1501 mlxscore=0 spamscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2405270093 This patchset adds support for Qualcomm WCD9370/WCD9375 codec. Qualcomm WCD9370/WCD9375 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire devices, RX and TX respectively supporting 3 x ADCs, ClassH, Ear, Aux PA, 2xHPH, 6 DMICs and MBHC. For codec driver to be functional it would need both tx and rx Soundwire devices to be up and this is taken care by using device component framework and device-links are used to ensure proper pm dependencies. Ex tx does not enter suspend before rx or codec is suspended. This patchset along with other SoundWire patches on the list have been tested on QCM6490 IDP device. Changes since v4: - Removed volatile/read-only registers from defaults list - Added wcd939x_volatile_register() with only volatile registers - Added a wcd939x_readable_register() with read-only and read-write registers, so cache does it's job - Fixed Spurious events for mixer controls and validated with mixer selftest tool - Used TLV instead of enum for ear_pa_gain mixer control - Used enum constraints instead of OneOf in dt-binding patch - Added vdd-px supply property as non optional in dt-binding patch - Reworked and done driver cleanup Changes since v3: - Fixed dt binding check errors. - Added constraints on values in v4-0001 binding patch as suggested by Krzysztof - Change the patch sequence soundwire driver first then codec driver - Added missing .remove soundwire driver function - Reworked and done driver cleanup Changes since v2: - Used common qcom,wcd93xx-common.yaml. removed duplicate properties. - Merged bindings patches "v2-0001" and "v2-0003" in single patch for easy review. - Fixed dt binding check errors. - Added missing "qcom,wcd9375-codec" in v3-0001 dt binding patch. - Added constraints on values in v3-0001 binding patch as suggested by Krzysztof - Fix the typo mistake in v2 cover letter Changes since v1: - Split the patch per driver for easier review as suggested by Krzysztof - Used devm_gpiod_get api to get reset gpio as suggested by Krzysztof Prasad Kumpatla (7): ASoC: dt-bindings: document wcd937x Audio Codec ASoC: codecs: wcd937x-sdw: add SoundWire driver ASoC: codecs: wcd937x: add wcd937x codec driver ASoC: codecs: wcd937x: add basic controls ASoC: codecs: wcd937x: add playback dapm widgets ASoC: codecs: wcd937x: add capture dapm widgets ASoC: codecs: wcd937x: add audio routing and Kconfig .../bindings/sound/qcom,wcd937x-sdw.yaml | 91 + .../bindings/sound/qcom,wcd937x.yaml | 82 + sound/soc/codecs/Kconfig | 20 + sound/soc/codecs/Makefile | 7 + sound/soc/codecs/wcd937x-sdw.c | 1139 +++++++ sound/soc/codecs/wcd937x.c | 3029 +++++++++++++++++ sound/soc/codecs/wcd937x.h | 653 ++++ 7 files changed, 5021 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd937x-sdw.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd937x.yaml create mode 100644 sound/soc/codecs/wcd937x-sdw.c create mode 100644 sound/soc/codecs/wcd937x.c create mode 100644 sound/soc/codecs/wcd937x.h base-commit: 3689b0ef08b70e4e03b82ebd37730a03a672853a -- 2.25.1