Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5002018pxj; Wed, 9 Jun 2021 07:05:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQk34XL0coo30hdpZp5sU70dr2BmMAvXHZ5zqF+FHOwsjlrj1Je8a6+WhcKdtToFPbgYEt X-Received: by 2002:aa7:d14d:: with SMTP id r13mr31085516edo.212.1623247528405; Wed, 09 Jun 2021 07:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623247528; cv=none; d=google.com; s=arc-20160816; b=mgAstKUsC2hm33QM0cUwuzGjt3za2JnEZGz5o5SjrjnNWxGjH4ZAzkeuhT8l4OgRiA 0JP64Fs4ZifnbdW0o8NWHYGWn33TReLahGl7j+zAp1rnNdhdal0m6db1a7uhkswo49mj ALP9W0Zy8iZW6RtOBQaNxCzgr+ZFnqeJz+W0WzLYA7tbKOZkWJoiG+kn6gOz1PbVihMX u5YuW3E9m3ieqjwCcKNAvD4eWiWZs9jEfAHz9R1XsP+1Gl/p/EGjY8EzPb9y28t72Ncv JivRemtLEqCaADX9AivdhYWK/7y1hfvpHKkFkosncfRPUfVSzLyXJTolYWdAugqZnpgj /+YA== 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=bRC0KkcvGK6dn/WWxvrMw56TbepPNYXAzMR1TFTLV7IvHfoc03lMfOWnjhCixe0J9C jN0qu3fumZvr9SEbwLnkPLTBvcih1OhgDYQxayHl/UaSi9Rp+OKk9MXT1RGXc4FI/mr/ i89YamsMKzio+0a340LKeMa7zapnrrGdpdQAxhIFkkzm+E3/KyrdKazTPyfm2ppjs20E AEM6ChZ+B1bptp4Ic9WvjVF92CPwYYJ+bOEADrHHneZueXs4ZJY/plrrYd5T92nmTMqx zY9foc31VTO0OY91R8xlhi9UXpzGr1Pe1j1acDcZ/bRwiWDsykGAtxrk8zccYAhBfr+H hFYQ== 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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 dn13si2454715edb.501.2021.06.09.07.05.04; Wed, 09 Jun 2021 07:05:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S233285AbhFIJNN (ORCPT + 99 others); Wed, 9 Jun 2021 05:13:13 -0400 Received: from mail-wm1-f44.google.com ([209.85.128.44]:56093 "EHLO mail-wm1-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237923AbhFIJNH (ORCPT ); Wed, 9 Jun 2021 05:13:07 -0400 Received: by mail-wm1-f44.google.com with SMTP id g204so3528612wmf.5 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=FDNsFDm2zlKTAB7b0v/tJvMa6Rm9Zfwpu2zyZYXC9qdHQcxJepA7ReCyTbOjzuFgUm x5k2GlJibG/r04y+Tr5ai/xjW3Qvgxeax9ZUUWc1tE9rXAE2wbEyCfgD3oUZFyTlLdhO mIrP85xPzr5VgfiJC5JyyOvWL7iU6gQZJJE0oDWXPuR7jrucevoxJ+AdCrsvHbdFptwO YRiz6l38IR4XJSQPz8V4Wzc5zlM4n7UCohZ57ivT2PIhtXVyPLfy+sAcHOHdOoXKt3W1 z11LAbfG2g7kKIaM+c/JamQG7yM6+d2T/9HTNKFovV2NXgHz0OZp6mw+0T4GbOOOlGRW bk0Q== X-Gm-Message-State: AOAM53164NCQVgGRiQxl7XhD20eMQ/yKIXHxRKs0unHN+K1OxioGLMgV U8AjntlgI6GMf7l8ZGY4tb/S6Q== 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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