From patchwork Mon Jul 23 15:53:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10540535 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 26C27157A for ; Mon, 23 Jul 2018 15:58:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11A7C28C33 for ; Mon, 23 Jul 2018 15:58:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0384828CDC; Mon, 23 Jul 2018 15:58:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D52D28C33 for ; Mon, 23 Jul 2018 15:58:22 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0AC272675D4; Mon, 23 Jul 2018 17:58:21 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 8E49F2675FC; Mon, 23 Jul 2018 17:58:18 +0200 (CEST) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by alsa0.perex.cz (Postfix) with ESMTP id 6EA3A26720C for ; Mon, 23 Jul 2018 17:58:16 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id z13-v6so1733746wma.5 for ; Mon, 23 Jul 2018 08:58:16 -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; bh=uOSHNGuwMIQPaOng5qdIAcC0fCSRyc9ISZGk86LG6+c=; b=GwwVnft5qHo7WIdXv4bdoFEk+uTepqDVQxIE7DhTPyHqWrNY4fIkZld9sgeXatrvu6 sZXovjeKd109qebG7Imtfu1xzsffG5npy1/6uXCy4DRRMFly2COZRSA7ey91lLdQVFeA suc/xvtG3Erb0UWtaG8Jx6057fFfOz0Flghog= 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; bh=uOSHNGuwMIQPaOng5qdIAcC0fCSRyc9ISZGk86LG6+c=; b=GbADJG8YqGQ4vZ8i7XRl3z31AMjI2lGDH28whxKP3j/WOlKb7HSgUR8A5Xrz9TQeYw cj4mZydle25rDBVNVzk0QpCrQQajjfLeWXnnwn4qCqdh0rWqW/Fz2bQCdlF+ptxIky7o m7a1nJ9Gg8t1/GPInXP4NbJM5iGfUIlfeBEEl0JwB1RdVO0nLCCTY6bSq3vdUF2sPbqB 97lO7xmS4dqmB5CHprmCfOaaNrgu1rN+QkFLF7jligb7wxJbJdIrPb00/Z8zoqio9V3I mWcYebExPzbdNyHLZsiEx1s5yeRAN1nKuoBg9RPJQ2VvrxogLMuegO/sx9fU5BmxxVAt 1ANA== X-Gm-Message-State: AOUpUlEB5bMi+1FZjnGZqUHHm/AndTy22klfGW64R2QjcDbkIym22gkh 7pTFGMsMCjmzi5awcRC+1TVsvA== X-Google-Smtp-Source: AAOMgpedSOTSp/eOXwQ+e8JqJQRylDbnSuScZf461xzb8ftFvBB6b8PPHOp+Cm6EAq2AEYuSO7jn2g== X-Received: by 2002:a1c:4143:: with SMTP id o64-v6mr8372905wma.123.1532361495830; Mon, 23 Jul 2018 08:58:15 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id 14-v6sm206385wmt.1.2018.07.23.08.58.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 23 Jul 2018 08:58:15 -0700 (PDT) From: Srinivas Kandagatla To: lee.jones@linaro.org, robh+dt@kernel.org, broonie@kernel.org Date: Mon, 23 Jul 2018 16:53:58 +0100 Message-Id: <20180723155410.9494-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, bgoswami@codeaurora.org, tiwai@suse.com, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, vkoul@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH 00/12] mfd: Add support to WCD9335 Audio Codec X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Qualcomm WCD9335 Codec is a standalone Hi-Fi audio codec IC. It is integrated in multiple Qualcomm SoCs like: MSM8996, MSM8976, and MSM8956 chipsets. WCD9335 had multiple functional blocks, like: Soundwire controller, interrupt mux, pin controller, Audio codec, MBHC, MAD(Mic activity Detection), Ultrasonic proximity and pen detection, Battery-voltage monitoring and Codec processing engine. Currently this patchset has been only tested with SLIMbus interface due to hardware avaiablity, but it can be easily made to work with both SLIMbus and I2C/I2S. This patchset adds very basic playback and capture support witout much fancy features. New features will be added once the basic support is in. This patchset is tested on top of linux-next on DB820c for both playback and capture paths. This patchset also depends on the SLIMbus Stream apis which is already merged via char-misc tree for 4.19. Some parts of the code has been inherited from Qualcomm andriod kernel, so credits to various authors. WCD9335 can be interfaced via I2S/I2C or SLIMbus. Here is my test branch incase someone want to try this out: https://git.linaro.org/people/srinivas.kandagatla/linux.git/log/?h=wcd9335 Thanks, Srini Srinivas Kandagatla (12): mfd: dt-bindings: Add wcd9335 mfd bindings mfd: wcd9335: add support to wcd9335 core mfd: wcd9335: add wcd irq support ASoC: dt-bindings: add dt bindings for wcd9335 audio codec ASoC: core: add support to snd_soc_dai_get_channel_map() ASoC: wcd9335: add support to wcd9335 codec ASoC: wcd9335: add CLASS-H Controller support ASoC: wcd9335: add basic controls ASoC: wcd9335: add playback dapm widgets ASoC: wcd9335: add capture dapm widgets ASoC: wcd9335: add audio routings ASoC: apq8096: Add support to Analog audio via WCD9335 slim .../devicetree/bindings/mfd/qcom,wcd9335.txt | 130 + .../devicetree/bindings/sound/qcom,wcd9335.txt | 21 + drivers/mfd/Kconfig | 18 + drivers/mfd/Makefile | 4 + drivers/mfd/wcd9335-core.c | 278 ++ drivers/mfd/wcd9335-irq.c | 172 + include/dt-bindings/mfd/wcd9335.h | 43 + include/linux/mfd/wcd9335/registers.h | 580 +++ include/linux/mfd/wcd9335/wcd9335.h | 43 + include/sound/soc-dai.h | 8 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/wcd-clsh.c | 1010 ++++ sound/soc/codecs/wcd-clsh.h | 69 + sound/soc/codecs/wcd9335.c | 4981 ++++++++++++++++++++ sound/soc/qcom/apq8096.c | 68 + sound/soc/soc-core.c | 22 + 17 files changed, 7454 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/qcom,wcd9335.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd9335.txt create mode 100644 drivers/mfd/wcd9335-core.c create mode 100644 drivers/mfd/wcd9335-irq.c create mode 100644 include/dt-bindings/mfd/wcd9335.h create mode 100644 include/linux/mfd/wcd9335/registers.h create mode 100644 include/linux/mfd/wcd9335/wcd9335.h create mode 100644 sound/soc/codecs/wcd-clsh.c create mode 100644 sound/soc/codecs/wcd-clsh.h create mode 100644 sound/soc/codecs/wcd9335.c