From patchwork Tue Dec 5 22:17:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 120759 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp6311219qgn; Tue, 5 Dec 2017 14:20:23 -0800 (PST) X-Google-Smtp-Source: AGs4zManfQn1oVDe5+9skmhfDXn+5aN2+c8rEIV4pQpOfFLPEzTDYQ55SOrJR5Xxf2GZWXIX38uM X-Received: by 10.98.73.142 with SMTP id r14mr458525pfi.223.1512512423183; Tue, 05 Dec 2017 14:20:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512512423; cv=none; d=google.com; s=arc-20160816; b=L+RtT5oPSw07IeM4dQYHkjUclCPrBr+ERf12U8FBs2gsJLrqKFZD0Un/WNKB63xh6Z UcBPhhMnqGh2WkpNialnzJKMFV6AbJoeYqfAzxCUxnhQe0qSs3f2ys00BtclC3K/ruVm 2EUNmrd+JABHmGsOpMro1rcnc70+mk66uX0jPuPAzRdsZid7bygu0hgDU6l55dhTvfcZ yh+vpgs7sKaI2s+l6oM+0FBq/stPLBvVYKnzhnNCA+BTYLeLeKC6hX5ydpCxI5W0FeXm 18Ed3skmLXcC3HZLa2NOWARZ7KTQFuy8KWNMk2jqB7ehSA759bBBTD6tFUzm6rF2X2LU L2AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=0gPYa9hCjmvPzvbxEaL6iXhJeiCGMTR5ulKD5iit2lo=; b=neZlKtqY3efclYyhWfv75HUI6RrYZxOM9NRzaHBgzGRvzCdT3jzE5c5ugev6YK50KM BhTNgYhUJQKgTdW6E0++ndCtV3Jw5rHu5h+0xsvpALihq5jGhv504IQka+sP7B8/xPuP m834K9AiOWmPBLTLtutUaXewsd2KoaQCjUxlWWDdCfd4U8O8IFLqs15WLAELvEKt7yby 6MXWOtawBn3kjc9+PKMxg4+ItgfV/BTg6F030kgNfLQ5i6aVOAeeuMBTadZnJb+PWd7b D52mMTGVM9kD8m1FSAMlSG6ZtEDwc/4CAo3iUeLMyhGqcA/z7Igt905YMNdb1JgrJeQ1 IXRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=dNrSJIzw; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o4si714097pgf.8.2017.12.05.14.20.22; Tue, 05 Dec 2017 14:20:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=dNrSJIzw; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145AbdLEWUV (ORCPT + 10 others); Tue, 5 Dec 2017 17:20:21 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33694 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751500AbdLEWUU (ORCPT ); Tue, 5 Dec 2017 17:20:20 -0500 Received: by mail-wm0-f68.google.com with SMTP id g130so20810901wme.0 for ; Tue, 05 Dec 2017 14:20:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=pgtsw0heiw1IIKo7vfScBbNWda5Mnej0e3zG5lETiFM=; b=dNrSJIzwWW+n2Ki23kG6HU6LciZgjTPUx9dodro+T1z+4+cm5Bg/m+8KWXHqefthZR KVbQIShZ/HaOHijlmJiSSaQnNL5ACzF6wo2C9fXsJVOZHdB4TdGzdONV3ACPjKaXETwT zr0l5G9C333BESER/XG6aYapvE2pG/ShHUXMA= 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=pgtsw0heiw1IIKo7vfScBbNWda5Mnej0e3zG5lETiFM=; b=EBPV3Y9zObtU6jomATLvsG9GJ6APEs9d77Ldy0xykDxuIC7kAHt4dnUeD5ziyIrUVW vFLQDBNZiAqTJcXWIqqABat8g7d8P984ahQhV37a6oNO6oqWfmGGQPoDx0QlDYVBTW9Y wPD4CCjB002tUn09Z3psnRc4lf/g/xz61aoSMJ9UAtpUMDmEKxtLJ2o6Qzl6HBaFnki7 8gRzBkEabBX6vQd8ACDq546c6bO7glscjOdfVxuX8dmWpqEed32ik3hqvjwIqkuRDFDI B+cKdQ7PlA9hk5CA6L75Vh2gBk4sSKbHBsAErLEnzzfZLvwYL0uCdnzdt9f7/jm4ZbyC r4uA== X-Gm-Message-State: AJaThX7NpcnDadV8NcHSunIteU1leeeKNc2wV5qhXVTc0kiEw4MKNCZr ke5aibp2TI4+eLLib4fuOApc3w== X-Received: by 10.28.216.196 with SMTP id p187mr10134571wmg.158.1512512419395; Tue, 05 Dec 2017 14:20:19 -0800 (PST) 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 t138sm1633154wme.16.2017.12.05.14.20.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Dec 2017 14:20:18 -0800 (PST) From: srinivas.kandagatla@linaro.org To: broonie@kernel.org, bgoswami@codeaurora.org Cc: alsa-devel@alsa-project.org, tiwai@suse.com, plai@codeaurora.org, kwestfie@codeaurora.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, lkasam@qti.qualcomm.com, Srinivas Kandagatla Subject: [PATCH v2 00/15] ASoC: qcom: Add support to QDSP6 based audio Date: Tue, 5 Dec 2017 22:17:57 +0000 Message-Id: <20171205221812.25641-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.15.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Srinivas Kandagatla This patchset aims to provide a very basic version of QCOM DSP based audio support which is available in downstream andriod kernels. This patchset only support Digital audio based for HDMI-RX and will add support to other features as we move on. QDSP has both static and dynamic modules. static modules like AFE (Audio FrontEnd), ADM (Audio Device Manager), ASM(Audio Stream Manager) and CORE to provide this audio services. All these services use APR (Asynchronous Packet Router) protocol via smd/glink transport to communicate with Application processor. More details on each module is availble in there respective patch. This patchset is tested on DB820c, with HDMI audio playback on top of mainline, also tested slimbus analog audio using wcd9355 with an additional small patch. Here is block diagram to give a quick overview of the components +---------+ +---------+ +---------+ | q6asm | |q6routing| | q6afe | | fedai | <------> | mixers | <-----> | bedai | +---------+ +---------+ +---------+ ^ ^ ^ | | | | +------------------+----------------+ | | | | | | v v v v v +---------+ +---------+ +---------+ | q6ASM | | q6ADM | | q6AFE | +---------+ +---------+ +---------+ ^ ^ ^ ^ | | | CPU Side | ------+---------------------+-------------------+-------- | | | | |APR(smd/glink) | | | | | +------------------+----------------+ | | | | | | +-----+--+-----------------------------------+--+------- | | | | | QDSP Side | v v v v v v +---------+ +---------+ +---------+ | ASM | <------> | ADM | <-----> | AFE | +---------+ +---------+ +---------+ ^ | +-------------------+ | ---------------------------+-------------------------- | Audio I/O | v v +--------------------------------------------------+ | Audio devices | | CODEC | HDMI-TX | PCM | SLIMBUS | I2S |MI2S |...| | | +--------------------------------------------------+ Changes since RFC: - Converted APR driver to proper bus driver - Added API version info to apr devices - Added q6core driver. - Fixed various issues spotted by Banajit and Kasam. - Added kernel doc to exported symbols. - renamed qdsp6v2 to qdsp6 as api version info can be used from apr device. - removed unnecessary dt bindings for apr devices. Srinivas Kandagatla (15): dt-bindings: soc: qcom: Add bindings for APR bus soc: qcom: add support to APR bus driver ASoC: qcom: qdsp6: Add common qdsp6 helper functions ASoC: qcom: qdsp6: Add support to Q6AFE ASoC: qcom: qdsp6: Add support to Q6ADM ASoC: qcom: qdsp6: Add support to Q6ASM ASoC: qcom: q6asm: Add support to memory map and unmap ASoC: qcom: q6asm: add support to audio stream apis ASoC: qcom: qdsp6: Add support to Q6CORE ASoC: qcom: qdsp6: Add support to q6routing driver ASoC: qcom: qdsp6: Add support to q6afe dai driver ASoC: qcom: qdsp6: Add support to q6asm dai driver dt-bindings: sound: qcom: Add devicetree bindings for apq8096 ASoC: qcom: apq8096: Add db820c machine driver arm64: dts: msm8996: db820c: Add sound card support .../devicetree/bindings/soc/qcom/qcom,apr.txt | 28 + .../devicetree/bindings/sound/qcom,apq8096.txt | 22 + arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 5 + arch/arm64/boot/dts/qcom/msm8996.dtsi | 33 + drivers/soc/qcom/Kconfig | 8 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/apr.c | 395 +++++++ include/linux/mod_devicetable.h | 13 + include/linux/soc/qcom/apr.h | 174 +++ sound/soc/qcom/Kconfig | 51 + sound/soc/qcom/Makefile | 5 + sound/soc/qcom/apq8096.c | 124 +++ sound/soc/qcom/qdsp6/Makefile | 7 + sound/soc/qcom/qdsp6/common.h | 225 ++++ sound/soc/qcom/qdsp6/q6adm.c | 602 +++++++++++ sound/soc/qcom/qdsp6/q6adm.h | 24 + sound/soc/qcom/qdsp6/q6afe-dai.c | 241 +++++ sound/soc/qcom/qdsp6/q6afe.c | 503 +++++++++ sound/soc/qcom/qdsp6/q6afe.h | 30 + sound/soc/qcom/qdsp6/q6asm-dai.c | 534 ++++++++++ sound/soc/qcom/qdsp6/q6asm.c | 1119 ++++++++++++++++++++ sound/soc/qcom/qdsp6/q6asm.h | 61 ++ sound/soc/qcom/qdsp6/q6core.c | 227 ++++ sound/soc/qcom/qdsp6/q6routing.c | 386 +++++++ sound/soc/qcom/qdsp6/q6routing.h | 9 + 25 files changed, 4827 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,apq8096.txt create mode 100644 drivers/soc/qcom/apr.c create mode 100644 include/linux/soc/qcom/apr.h create mode 100644 sound/soc/qcom/apq8096.c create mode 100644 sound/soc/qcom/qdsp6/Makefile create mode 100644 sound/soc/qcom/qdsp6/common.h create mode 100644 sound/soc/qcom/qdsp6/q6adm.c create mode 100644 sound/soc/qcom/qdsp6/q6adm.h create mode 100644 sound/soc/qcom/qdsp6/q6afe-dai.c create mode 100644 sound/soc/qcom/qdsp6/q6afe.c create mode 100644 sound/soc/qcom/qdsp6/q6afe.h create mode 100644 sound/soc/qcom/qdsp6/q6asm-dai.c create mode 100644 sound/soc/qcom/qdsp6/q6asm.c create mode 100644 sound/soc/qcom/qdsp6/q6asm.h create mode 100644 sound/soc/qcom/qdsp6/q6core.c create mode 100644 sound/soc/qcom/qdsp6/q6routing.c create mode 100644 sound/soc/qcom/qdsp6/q6routing.h -- 2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html