From patchwork Wed Jun 9 09:09:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 456808 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp5040131jae; Wed, 9 Jun 2021 02:11:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyceVueL1K7r+qg4iBxphaUckRv+X7e/jobWvg4UXOu1e5BtnBYF6PZr4P9TB5mrZzDyNJm X-Received: by 2002:a05:6402:1705:: with SMTP id y5mr29490609edu.232.1623229861074; Wed, 09 Jun 2021 02:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623229861; cv=none; d=google.com; s=arc-20160816; b=oa/NygXi3V/cqCmAI+DRMHB7/pks0YKwU6vQ8L9aI83ZLTJNaDL8oSqtH5KAyEoF6J 6cJ6DcTsmb4vTibWLq+cJH4lkXKHvov6i1+IsO7E250z1fRz6PtVdD/Kr5Bs6lwifhKr 5NTV/Ew2d69JCla6aA4BzfnKt5dWrtDpvz4g7HHJ3gyGKIf6B9ir3BI7DkMzTNSzOkzD bqO62PaZGZ35I/MN4bZpCUes4FZdLvMqJ9qdMPJ2AI5sA9sl/uvFRC07XSF1CbKjtmT2 jHiqtJOpwryNnuM4Y1BANkSlMmR51b6EX02qv4OOJA2BC2nt9Y+Hk6wtZZopbNzGl58X t74w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0qa4D2spX1g8yj7RaDUoK2ZQ8yrlEpkE/9jNnX7bJv8=; b=0ZQlAynIZvqjru++J6McLScCW4G4w/HgSEC2Oslj6SlJ7X86OGd7ALcc0B6a9kf6qr peduGhfrqkXDBfsgCyppVl1151REcEvO09FjEMSMUqS871iLX5d+aRglYjeJ9kFlFEwB mJ9Uh0/yVUZLdnZW9GnSwIIZtMu3qt1H8TCM0FBNlaxJe5F/z7UldZftMsOStlMGi1g6 i9bfADL1bw4RQu6p7tQ1UmU8BgPNM7vGgEQNYWtt0ZR1lb2YlUusrT4+OIz1xPvE4CnA Q7SiODc9VdyjUZtMWYpl2EM4D8iOb12X7s7iZ/ndrcQZ93vWpbueo9+UFg3fVzvsbufU Lntw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RPMbGrQT; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j11si2036670ejj.121.2021.06.09.02.11.00; Wed, 09 Jun 2021 02:11:01 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RPMbGrQT; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237835AbhFIJMy (ORCPT + 7 others); Wed, 9 Jun 2021 05:12:54 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:33295 "EHLO mail-wm1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237789AbhFIJMy (ORCPT ); Wed, 9 Jun 2021 05:12:54 -0400 Received: by mail-wm1-f44.google.com with SMTP id s70-20020a1ca9490000b02901a589651424so2843230wme.0 for ; Wed, 09 Jun 2021 02:10:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0qa4D2spX1g8yj7RaDUoK2ZQ8yrlEpkE/9jNnX7bJv8=; b=RPMbGrQTNf9/hpcQ8pAfoLnXzdUeu9Cvzr5SYmrRvOXTMg2nxNR0w9SY0Mtjih1MYR 521dJKRT3tmj3U4POI1m6TKDX6KxpmwhJ3U0EbQbqNffKriWuuS4BoQUqxp9saLqnifi 3OhSrkx0bpKB/GG/fylfKzRR//vyZdPHkXBcGMbditW8UYywUdPwgy7Bx95u4dt7Qs58 ihSpisFvuRQowRNQvDB158Bezlm8C44vqnFsR6IDi/x87+gXTu25bk8Bgr0jfkkeDTvQ gpSkY84jsFFooxjs1Bd626gcIDaFLbJXeoaaNTrL8mjcKWP23iAccN1DI/tYGpiuG1D4 a1UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0qa4D2spX1g8yj7RaDUoK2ZQ8yrlEpkE/9jNnX7bJv8=; b=tL/EkHw1Uw8MvnwhO0fmbQ9loVPE9rDSeHxripmbsilufATMvyjvFFLrYG4H7JgbWq zej6Ze9yHEmAPBe5SD/XGFNprCs9/sx7tJcMmIFRUS1LDZ4Omzmf3MS/e3sdP/PVEpe0 q1tDemLeVJFxGP+mMz+LGvcQphH1QW6Pv+ctFQvBiEYBZ65FPuZYF3UvWQ9akKqyPKHR VybFV9row2W1XDNVIU3QMN69p+yjHLnLj0Ylnw8DriyNsuETUNnTIex7meDtAKAq3dUk F01VPrRRoH1JJAtKcw8TZFkBjHgaBs0h2BHFo1HK+f1SIDYMw5W/83wgTj5Pu9V1jsKE /SmA== X-Gm-Message-State: AOAM5300zvVMf287l9HCTTtQeBSzKykJ6lD69cr3xLb4qioxYVzufoBK mW8C+dGUF/Mkv3za92kqT0XTCw== X-Received: by 2002:a05:600c:4e89:: with SMTP id f9mr6571431wmq.140.1623229799177; Wed, 09 Jun 2021 02:09:59 -0700 (PDT) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id v18sm25165385wrb.10.2021.06.09.02.09.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 02:09:58 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: robh@kernel.org, devicetree@vger.kernel.org, perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, Srinivas Kandagatla Subject: [PATCH v9 0/9] ASoC: codecs: add wcd938x support Date: Wed, 9 Jun 2021 10:09:34 +0100 Message-Id: <20210609090943.7896-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patchset adds support for Qualcomm WCD938X codec. Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC connected over SoundWire. This device has two SoundWire devices, RX and TX respectively supporting 4 x ADCs, ClassH, Ear, Aux PA, 2xHPH, 7 x TX diff inputs, 8 DMICs and MBHC. Eventhough this device has two SoundWire devices, only tx device has access to main codec Control/Status Registers! 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 SM8250 MTP device. Thanks, srini Changes since v8: - moved Kconfig and Makefile changes to last patch as suggested by Mark - removed array of enums and used static entries instead. Suggested by Mark - return true if put succeeds, Suggested by Mark - removed some unneeded semi-colons in switch Srinivas Kandagatla (9): ASoC: dt-bindings: wcd938x: add bindings for wcd938x ASoC: codecs: wcd-clsh: add new version support ASoC: codecs: wcd938x: add basic driver ASoC: dt-bindings: wcd938x-sdw: add bindings for wcd938x-sdw ASoC: codecs: wcd938x-sdw: add SoundWire driver ASoC: codecs: wcd938x: add basic controls ASoC: codecs: wcd938x: add playback dapm widgets ASoC: codecs: wcd938x: add capture dapm widgets ASoC: codecs: wcd938x: add audio routing and Kconfig .../bindings/sound/qcom,wcd938x-sdw.yaml | 70 + .../bindings/sound/qcom,wcd938x.yaml | 146 + sound/soc/codecs/Kconfig | 14 + sound/soc/codecs/Makefile | 4 + sound/soc/codecs/wcd-clsh-v2.c | 348 +- sound/soc/codecs/wcd-clsh-v2.h | 16 + sound/soc/codecs/wcd938x-sdw.c | 315 ++ sound/soc/codecs/wcd938x.c | 3753 +++++++++++++++++ sound/soc/codecs/wcd938x.h | 720 ++++ 9 files changed, 5376 insertions(+), 10 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x-sdw.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml create mode 100644 sound/soc/codecs/wcd938x-sdw.c create mode 100644 sound/soc/codecs/wcd938x.c create mode 100644 sound/soc/codecs/wcd938x.h -- 2.21.0