From patchwork Fri Aug 11 13:29:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 109863 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp916514qge; Fri, 11 Aug 2017 06:30:09 -0700 (PDT) X-Received: by 10.223.149.146 with SMTP id p18mr10400033wrp.160.1502458208874; Fri, 11 Aug 2017 06:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502458208; cv=none; d=google.com; s=arc-20160816; b=pQSDlRozcKtPIqsZH0DkibFZt/y/f98UnL0zmic77xdrUQ/EsYLYd9MNC6q6Lm+1sN f/OateEu2yroWQK7WLl7gBpxK4MyxHm5nhYyyuGWDitoW6Umy0dmoicTjsoxROxxVkgU 34zBXihK68dIVkJo6VnK87n5sct+THanh9MRPc36O1zwmU0KD/tO+xI0I3R7M7cUuESq tDXRXOKeLQ+2kKZXftgSm2s7rejmT6HecZrp//3oQeC+Bk9vQCm9PNAVDib25nfVinKA 7a1rT8ZS3VBjjp7om4wBSJASmhnLMbPcIsgRAsSQPXLXvL9/Puh2GnqxynqWHCbELgbl ZHXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=o6d1AjsJk1bA4+hLwLT66YQCeVfrjMEfn3vFBiL/VD0=; b=SXdYzBij23Syn0bOPYpDvnPa3/vjXQWxOM+qBPfAf25jbdd85vv1uBUkL8ehVL11nf cRPMMF/8iQ0RO7HpODecs3Upy3CrNVwrnNxVyiqQhw8UHpgALoBkqNhIXp5KOd0K7qZO 0LgdzVcCn35dVmUH8fTBw7oJyLMJHFoNt7z2N5JVgQwxzGf4fkrzUc6eDzdKemxWQIAi wH8/qFYPM33UiXqYqpo51q7I/B6ZJGC0RILXPdbB+/9dSmhmmONG3K+Ma+bvqRmvImVy nZA4CWmGZUIi3Lomq0UTj3QhOqu214ER9ld9QRL76Y0LALAqjIvo7a/wQP3zX1Nq8Plp zI9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UgBRhYLp; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id q21si687893wra.478.2017.08.11.06.30.08; Fri, 11 Aug 2017 06:30:08 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=UgBRhYLp; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 0E1FA267634; Fri, 11 Aug 2017 15:30:07 +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 2546726762D; Fri, 11 Aug 2017 15:30:06 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=disabled version=3.4.0 Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) by alsa0.perex.cz (Postfix) with ESMTP id 4828926762D for ; Fri, 11 Aug 2017 15:30:02 +0200 (CEST) Received: by mail-io0-f176.google.com with SMTP id j32so20182866iod.0 for ; Fri, 11 Aug 2017 06:30:02 -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=Mg7aCH8WwoGC8eysgYU/AxzKm3QCCOkwSwcP6z/ZDAY=; b=UgBRhYLpkJO/aRF0b+40e7voObMrSOnMB1SkxSlprDLXrh0HDSuNz63BTfO16EZ9ua hHyU4llV1pEnPrRKbHxDEjuZXR1z8SkHJEzM8u70IJlWS5DSDoLeYsHaznsKFDczLyTu tZufhYPeroykoC+irb+fGUtv2iuAXdAbaNKyQ= 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=Mg7aCH8WwoGC8eysgYU/AxzKm3QCCOkwSwcP6z/ZDAY=; b=PJm/8lFKbp5Ctli5mlQ5A4Vcaa/WPaI8Pc6eDQ4Nl2jyw+YP31H7EUvm1JkBeL5dqO hYrVCoeLL1CTBRDP4NvjoFehdn3HhtSieHhIR+vF2rR8KvmxiO1cC0xilMOWm2T0zr0G awiAPhuff/CyGXFys+vdOtF6/KAdaGKl1gsIzlphLfDGpce5qK1sn2QqpLIvqF42JxRu /ntLE3GgvdOiqTzoXSqw+t/sLiEV3lRK+qEwvCJW42pGaYtm8QvXQceCXk/pzbbg0uk8 wVRAKWU1hM5/13dZCbBWDF3MGpjXeClfmx38AtNIxa53nvL8z/GOEB5KuRLCj2/cFXUm Aiwg== X-Gm-Message-State: AHYfb5gBQ991sDNWwudFUyuoYdkWVTXQLiySc+DGzNNQNMiz6VOtpd54 bU5KUV04IxADIcxe X-Received: by 10.107.5.77 with SMTP id 74mr11836727iof.221.1502458200816; Fri, 11 Aug 2017 06:30:00 -0700 (PDT) Received: from localhost.localdomain (static.8.26.4.46.clients.your-server.de. [46.4.26.8]) by smtp.gmail.com with ESMTPSA id y72sm398422iod.40.2017.08.11.06.29.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Aug 2017 06:30:00 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: Mark Brown , Banajit Goswami , alsa-devel@alsa-project.org Date: Fri, 11 Aug 2017 15:29:43 +0200 Message-Id: <20170811132952.32572-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.11.0 Cc: kwestfie@codeaurora.org, linux-arm-msm@vger.kernel.org, Patrick Lai , sboyd@codeaurora.org, Takashi Iwai , linux-kernel@vger.kernel.org, Srinivas Kandagatla , lkasam@qti.qualcomm.com Subject: [alsa-devel] [RFC PATCH 0/9] ASoC: qcom: Add support to QDSP based HDMI audio 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 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-TX and will add support to other features as we move on. Why do we need this now: On All Qualcomm SOCs the audio services are usually provided by an on chip DSP using LPASS, however LPASS is mostly tied with a Q6DSP on most of the SOCs. So Bypassing the DSP is becoming almost impossible with new generation of QCOM SOCs. QDSP has 3 modules AFE (Audio FrontEnd), ADM (Audio Device Manager), and ASM(Audio Stream Manager) 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 with few additional patches. Here is block diagram to give a quick overview of the components +---------+ +---------+ +---------+ | q6pcm | |q6routing| | q6hdmi | | ASoC(FE | <------> | ASoC(BE | <-----> | ASoC(BE | | cpu dai)| |Platform)| | cpu dai)| | | | | | | +---------+ +---------+ +---------+ ^ ^ ^ | | | | +------------------+----------------+ | | | | | | v v v v v +---------+ +---------+ +---------+ | | | | | | | q6ASM | | q6ADM | | q6AFE | | | | | | | | | | | | | +---------+ +---------+ +---------+ ^ ^ ^ ^ | | | CPU Side | ------+---------------------+-------------------+-------- | | | | |APR(smd/glink) | | | | | | | | +------------------+----------------+ | | | | | +-----+--+-----------------------------------+--+------- | | | | QDSP Side | v v v v v +---------+ +---------+ +---------+ | | | | | | | ASM | <------> | ADM | <-----> | AFE | | | | | | | | | | | | | +---------+ +---------+ +---------+ ^ | +-------------------+ | ---------------------------+-------------------------- | Audio I/O | v v +--------------------------------------------------+ | Audio devices | | CODEC | HDMI-TX | PCM | SLIMBUS | I2S |MI2S |...| | | +--------------------------------------------------+ Srinivas Kandagatla (9): soc: qcom: add support APR driver ASoC: qcom: qdsp6v2: Add support to Q6AFE ASoC: qcom: qdsp6v2: Add support to Q6ADM ASoC: qcom: qdsp6v2: Add support to Q6ASM ASoC: qcom: qdsp6v2: Add support to q6 routing driver ASoC: qcom: qdsp6v2: Add support to q6 HDMI dai driver ASoC: qcom: qdsp6v2: Add support to q6 pcm driver ASoC: qcom: apq8096: Add db820c machine driver arm64: dts: msm8996: db820c: Add sound card support .../devicetree/bindings/soc/qcom/qcom,apr.txt | 66 ++ .../devicetree/bindings/sound/qcom,apq8096.txt | 85 ++ .../devicetree/bindings/sound/qcom,q6adm.txt | 15 + .../devicetree/bindings/sound/qcom,q6afe.txt | 15 + .../devicetree/bindings/sound/qcom,q6asm.txt | 15 + .../devicetree/bindings/sound/qcom,q6hdmi.txt | 27 + .../bindings/sound/qcom,q6pcm-routing.txt | 21 + .../devicetree/bindings/sound/qcom,q6pcm.txt | 21 + arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi | 37 + arch/arm64/boot/dts/qcom/msm8996.dtsi | 67 ++ drivers/soc/qcom/Kconfig | 8 + drivers/soc/qcom/Makefile | 1 + drivers/soc/qcom/apr.c | 406 ++++++++ include/dt-bindings/sound/qcom,afe.h | 8 + include/dt-bindings/sound/qcom,asm.h | 13 + include/linux/soc/qcom/apr.h | 163 ++++ sound/soc/qcom/Kconfig | 46 + sound/soc/qcom/Makefile | 5 + sound/soc/qcom/apq8096.c | 174 ++++ sound/soc/qcom/qdsp6v2/Makefile | 6 + sound/soc/qcom/qdsp6v2/common.h | 225 +++++ sound/soc/qcom/qdsp6v2/q6adm-v2.h | 76 ++ sound/soc/qcom/qdsp6v2/q6adm.c | 603 ++++++++++++ sound/soc/qcom/qdsp6v2/q6afe-v2.h | 62 ++ sound/soc/qcom/qdsp6v2/q6afe.c | 499 ++++++++++ sound/soc/qcom/qdsp6v2/q6asm-v2.h | 176 ++++ sound/soc/qcom/qdsp6v2/q6asm.c | 1008 ++++++++++++++++++++ sound/soc/qcom/qdsp6v2/q6hdmi.c | 258 +++++ sound/soc/qcom/qdsp6v2/q6pcm.c | 558 +++++++++++ sound/soc/qcom/qdsp6v2/q6routing-v2.h | 8 + sound/soc/qcom/qdsp6v2/q6routing.c | 403 ++++++++ 31 files changed, 5075 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 Documentation/devicetree/bindings/sound/qcom,q6adm.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6afe.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6hdmi.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6pcm-routing.txt create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6pcm.txt create mode 100644 drivers/soc/qcom/apr.c create mode 100644 include/dt-bindings/sound/qcom,afe.h create mode 100644 include/dt-bindings/sound/qcom,asm.h create mode 100644 include/linux/soc/qcom/apr.h create mode 100644 sound/soc/qcom/apq8096.c create mode 100644 sound/soc/qcom/qdsp6v2/Makefile create mode 100644 sound/soc/qcom/qdsp6v2/common.h create mode 100644 sound/soc/qcom/qdsp6v2/q6adm-v2.h create mode 100644 sound/soc/qcom/qdsp6v2/q6adm.c create mode 100644 sound/soc/qcom/qdsp6v2/q6afe-v2.h create mode 100644 sound/soc/qcom/qdsp6v2/q6afe.c create mode 100644 sound/soc/qcom/qdsp6v2/q6asm-v2.h create mode 100644 sound/soc/qcom/qdsp6v2/q6asm.c create mode 100644 sound/soc/qcom/qdsp6v2/q6hdmi.c create mode 100644 sound/soc/qcom/qdsp6v2/q6pcm.c create mode 100644 sound/soc/qcom/qdsp6v2/q6routing-v2.h create mode 100644 sound/soc/qcom/qdsp6v2/q6routing.c -- 2.9.3 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel