Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1877126lqp; Mon, 15 Apr 2024 23:37:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3ro9b0nBLCSVG4TfJEmFySEszVn2WDSmMqgY+fFuXQ+nTsic46GreFA9GMlohCtbWn6xTbUdyeHC7rdm1S+PglVZZ5KcUqtv8m8ACEQ== X-Google-Smtp-Source: AGHT+IGASp71P5MJbu/uJxRoCU/2OA548QEPAoG84bQ9LwlFwHETLkwX3yWHCrqU+0j5bnYCdVhb X-Received: by 2002:a50:c043:0:b0:56b:d013:a67e with SMTP id u3-20020a50c043000000b0056bd013a67emr1056538edd.18.1713249422221; Mon, 15 Apr 2024 23:37:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713249422; cv=pass; d=google.com; s=arc-20160816; b=l4WK+HFvaWk/gfFn+1EmGR5tJf2oCRUS7HHM//UycBzFaS3ZxdXbwSsRoJlZwACK66 hk1SJmFNuZHOetNiAbhDcx2YbstQLv4XM09cmsDR0H5fWQ7PWkxcyyHLePyHWoJsUWGu 2ZdkdU6bQH3vqgWABFr8j1bTio7qIn+eVe2LiyIMwfppEiZENFzKhcu3yp0KSKRfGPWO NwLgq5hYpOIFHm7aLOPz5FNbA5gCzZOjnCXse2NfNocKBtD5YugDtH5fNbWnzNyrb059 fNcgQoYbjGcOYXeqntHzGUjOM+H3ykPFrL4c/sl8H1ZWiIGZ6AQPugy+EanQt75KrIaA bAuA== 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=UeKcPO/ODOIZ1nq+8daZBpYFzGCc0viJZ7fkS9Zr3RQ=; fh=RZGL9QkT1KDtHi2BtdmE8j4WTQ8TVfVDoEV2YPPBAw0=; b=Xc4Taju3MzTM6a4O/PObO4rU1LvHIVcPg/LRmrwo3EWoH7j1CLdfTwqY21KSue8sLR XzrFX6e+Nz/nHfp7JrkA18WN6JRlZU4CZRyUs7OJycD89BK8Mm/HRhMp7KiX8ickHxfh XbZ+3CDonAYoszGUOkY0HWcZjlOXABZVQeL3yvaUx8wHu93SqYF1d5hUGZnE/WlZoiZo yzrc5dmI7tdU3PfIhamN+t6tirSNehdHncZs+oYSfAxojZA903nxUWl7Dmjgp5KOS0Ix fKo5rSxarkRFmXCkoKWSjQPEpIUhWAhMCo7yAwKWnYMb7HETLgc1BP0aLQt+39VlpZaC SSzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=KS0USu8F; 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-146351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146351-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ig1-20020a056402458100b0056b9701a913si5364114edb.456.2024.04.15.23.37.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 23:37:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-146351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=KS0USu8F; 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-146351-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-146351-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EEC7C1F217B1 for ; Tue, 16 Apr 2024 06:37:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 238966D1B5; Tue, 16 Apr 2024 06:36:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="KS0USu8F" 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 D96C3ED8; Tue, 16 Apr 2024 06:36:51 +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=1713249413; cv=none; b=E8VtVe3tNFe6hmFsA2kkUTPqmywUv7UuP0VT8pjiKbreKeK8GMWzZEbFnolsHF5Pxa0aYiUOeBW4y2PDxA2ZTbI73Bx4o6bcb89BuPGnE2ONJW/tRl4IfxTTzK6KLcluNQv1jL9HNgQTq4f886XGT1OsH++mgQHcarCu/OdqPIY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713249413; c=relaxed/simple; bh=M5Wa6crHEkD3a3VHlCsqpO4QfRC6Cok5qz9sFUaseHU=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=uJ8cymA1zgN7jk7fzPjsy8uMVg1hUgiuRNUvjCD3TBxyKh3oXkwti3zIhYl6TTYDvVGm+RpmLX1EQC9e2XL7A96CtXxxRfNA1wU/xaxyA93VqMXKGlTIVt986Ku1OSWNO8rnZjuhSVZprkuHdWp3aMCXOfLCrBs/ApRJKAp7h/g= 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=KS0USu8F; 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 (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 43G4MRN3016812; Tue, 16 Apr 2024 06:36:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=UeKcPO/ ODOIZ1nq+8daZBpYFzGCc0viJZ7fkS9Zr3RQ=; b=KS0USu8F9pio3Gk/BNguhwh n/NduuOtIAxq1ogIj1deEo2iMs6LSDDHi+ZVF84Nlo/fd8q4KQFU524Xn1Ob8FlM TMdD3mKnfLDJZwmjgCcZyNQ1MCs/ZlegyLebrq44QQ6VjUw+ljFu7GFEdIxHPXRp 5+xitfMZy4cv8wBzgSKnaA3iEIJOYkBhXPwWwgKZp6LtlFVqnkIpMkepUfaq+gZn k1vB2otheU1HbGirFjCxZHxO/iyGBwhQR9DDK3n4+2BwaKnsTbYDqDviFXxh3Mao jeAVKezIL48C8OuhKu8zZMdWpoH64HGQ2Z2mIAunL9TQN/1e/QMj2/QSj5GkUfw= = Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xhftw0n2h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Apr 2024 06:36:32 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43G6aVf7027581 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 Apr 2024 06:36:31 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, 15 Apr 2024 23:36:27 -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: [PATCH v2 0/8] ASoC: codecs: wcd937x: add wcd937x audio codec support Date: Tue, 16 Apr 2024 12:05:52 +0530 Message-ID: <20240416063600.309747-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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-GUID: T6emtMP2KZbr0mCYMBjhZWrN2laHjJYw X-Proofpoint-ORIG-GUID: T6emtMP2KZbr0mCYMBjhZWrN2laHjJYw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-16_04,2024-04-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 mlxscore=0 phishscore=0 clxscore=1015 suspectscore=0 bulkscore=0 mlxlogscore=624 adultscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404160039 This patchset adds support for Qualcomm WCD937X 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 v8: - 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 (8): ASoC: dt-bindings: wcd937x: add bindings for wcd937x ASoC: codecs: wcd937x: add wcd937x codec driver ASoC: dt-bindings: wcd937x-sdw: add bindings for wcd937x-sdw ASoC: codecs: wcd937x-sdw: add SoundWire 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 | 71 + .../bindings/sound/qcom,wcd937x.yaml | 119 + sound/soc/codecs/Kconfig | 20 + sound/soc/codecs/Makefile | 7 + sound/soc/codecs/wcd937x-sdw.c | 1148 +++++++ sound/soc/codecs/wcd937x.c | 3036 +++++++++++++++++ sound/soc/codecs/wcd937x.h | 655 ++++ 7 files changed, 5056 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: 6bd343537461b57f3efe5dfc5fc193a232dfef1e -- 2.25.1