From patchwork Mon Sep 17 00:57:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10601947 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 7E9E513AD for ; Mon, 17 Sep 2018 00:58:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C14A290C4 for ; Mon, 17 Sep 2018 00:58:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D26F290D2; Mon, 17 Sep 2018 00:58:05 +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 A23EE290C4 for ; Mon, 17 Sep 2018 00:58:04 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 8E82026780A; Mon, 17 Sep 2018 02:58:02 +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 CCC1826780A; Mon, 17 Sep 2018 02:58:00 +0200 (CEST) Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by alsa0.perex.cz (Postfix) with ESMTP id 7BEBA2676AA for ; Mon, 17 Sep 2018 02:57:58 +0200 (CEST) Received: by mail-it0-f65.google.com with SMTP id h23-v6so8894195ita.5 for ; Sun, 16 Sep 2018 17:57:58 -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=fmaXJem1u+BE9/4vZE6vncVsavp9C4jAYD9xOClR9Ws=; b=j55spvxVALibpBjYKZ95Xh7msT3+fcBOUwE0xIpQQRNAl65DwFA9J+6Hq/horkzlJq u+XdmzsBuVcnJfAvdnVFJ/d1vsbMb+OS6PN87paPYFMax4oJ6RTFCcKULJMnKUc9hpBe jS8tCzocYnhkd3KXu/j/hNSHSOiwGA3N1b62o= 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=fmaXJem1u+BE9/4vZE6vncVsavp9C4jAYD9xOClR9Ws=; b=c455XUSmFK5kRhhGPhPMoien+aD5RR2vFtzYEU8NB1MzZQ+l5W4YQNs68xxEdVblpb iD2KW6hLdHyuEKKFIbMELZtBw2FH2nKQFsv7KSS3B1/3O7mMaaTtsjBXQE2z5YMH1DhF D3wMcpbMs1Vj5PnpnyPlAVW2m/i8MbdB9MKM4nOBBhopDtJ/lrp3oNM1MUri9qjMoq2H ytMBG77De2DbSN588xHHAZ0vK2SijxD35ZxowVQPhszZkaWmO1D44TcVYqzlCV3DXx6b u6DaWyLtwYGvMJadowmbUVXfGbwKTower1++rf0qiNojZDajEofh5YGSVanHFgopTz7H yGgw== X-Gm-Message-State: APzg51A1kBeTp9Uq+ZZu4wJ3RXTQQJbw9zfr326Hfg1w+9wYVOVFBeGV FfvP2YNR9QyYaxRDDqaqo0aYyQ== X-Google-Smtp-Source: ANB0VdZ7DCJElnnbt0SCXqRF2wjD0+DUlBWOrQPTPBagvXu5hY6VugmGc2VJiCQeujngZLJf8wgMAw== X-Received: by 2002:a24:bcc4:: with SMTP id n187-v6mr10370044ite.144.1537145876925; Sun, 16 Sep 2018 17:57:56 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id f64-v6sm829972ite.4.2018.09.16.17.57.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Sep 2018 17:57:56 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: lee.jones@linaro.org, robh+dt@kernel.org, broonie@kernel.org Date: Sun, 16 Sep 2018 17:57:13 -0700 Message-Id: <20180917005727.32728-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, bgoswami@codeaurora.org, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, vkoul@kernel.org, Srinivas Kandagatla Subject: [alsa-devel] [PATCH v4 00/14] ASoC: 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 From: Srinivas Kandagatla Thankyou for reviewing v3 patchset, here is v4 addressing comments from v3. 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 , capture paths and MBHC. 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 Changes since v3 (https://lkml.org/lkml/2018/9/4/318/) - Updated mbhc dt bindings according to Robs Comments. - Added a cleanup patch to common up fixups. - Addressed various comments on mfd driver by Lee Jones. - Added acks on bindings and irq support. - fixed module loading Srinivas Kandagatla (14): ASoC: dt-bindings: update wcd9335 bindings. mfd: wcd9335: add support to wcd9335 core mfd: wcd9335: add wcd irq support 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: dt-bindings: Add WCD9335 MBHC specific properties ASoC: wcd9335: add mbhc support ASoC: apq8096: add slim support ASoC: apq8096: add headset JACK support ASoC: qcom: common: move be_hw_fixup to common .../devicetree/bindings/sound/qcom,wcd9335.txt | 30 +- drivers/mfd/Kconfig | 13 + drivers/mfd/Makefile | 4 + drivers/mfd/wcd9335-core.c | 394 ++ include/linux/mfd/wcd9335/registers.h | 640 +++ include/linux/mfd/wcd9335/wcd9335.h | 81 + sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/wcd-clsh-v2.c | 577 +++ sound/soc/codecs/wcd-clsh-v2.h | 49 + sound/soc/codecs/wcd9335.c | 5241 ++++++++++++++++++++ sound/soc/qcom/apq8096.c | 128 +- sound/soc/qcom/common.c | 17 + sound/soc/qcom/sdm845.c | 22 +- 14 files changed, 7168 insertions(+), 35 deletions(-) create mode 100644 drivers/mfd/wcd9335-core.c 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-v2.c create mode 100644 sound/soc/codecs/wcd-clsh-v2.h create mode 100644 sound/soc/codecs/wcd9335.c