From patchwork Thu Dec 14 17:33:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 121994 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp7105269qgn; Thu, 14 Dec 2017 09:36:29 -0800 (PST) X-Google-Smtp-Source: ACJfBouMZvu0L6vLekUZvuI9rhZjGITgx3gavceWsjAxXMaJd3ujaRLmxoDx4JDsLIFdeaau7nF7 X-Received: by 10.84.232.141 with SMTP id i13mr10338624plk.315.1513272989628; Thu, 14 Dec 2017 09:36:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513272989; cv=none; d=google.com; s=arc-20160816; b=SGVTkZb3JqGDXAnmbzgpnqOxmOxO4K/nmB33S3NQLMFTU0TBQmcIgxSP+2oza6VNyV sjN2wphhmbgsXFq/wc3avAqJ6SHYqbRI6vlp709w+81YPwfA9vWlSUpzWjEw2uVPlXvU IxNt/OGTVeJY4S3WPpjkBtS4llsv2bdMndjpZ8pGxuY67hWJhT9cmwJSzYoRuj+u/aVE ZUrfZQF9oT+Nef/qXRJtzHwy5UVD3guVd2IjK5QFZ7MPUrZK08fOexgw5OCz/4vsaPNm xIcd5T3xnyj5hJ1vedM0BlLGYprTXHN3paCtIUCTYRujpMeFmlluK9zL2NJi7IQmhrGz e+Dg== 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=GVsYZ3kGPzaaCmn6lSgMcXO+BnGW1aGR6EDrABWKrMhOcgvIXJhFHwCBBFPjds1qLk katySZBSFIOcK3Jkt30L+pktkhDNQ8cAQJEUkrv5lFsxYThWJBx83qlqAl0lAnDtO5IW bQB5W81nvHQDVwAMeGWwSv5byrCIflFw574slRLb8MnBqlD+ScuHgfCos9lr1jS+AW/L 7zB9X/Q0P+kR7VDJWbqEhATvZk/WBR2yk0TZ5QpvhZaelpBNCplOI6a1GSm/zDjxOhA+ 3s+QAqEZ2FRhYcRpnIYb5ntimPd/vz3wNOG5r37wCWd5TH1mMdrSP7IdBagqOo0bUh6n 82Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=hHFjyWx8; 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 a16si3181496pgn.797.2017.12.14.09.36.29; Thu, 14 Dec 2017 09:36:29 -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=hHFjyWx8; 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 S1753727AbdLNRg2 (ORCPT + 10 others); Thu, 14 Dec 2017 12:36:28 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:43915 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753693AbdLNRg0 (ORCPT ); Thu, 14 Dec 2017 12:36:26 -0500 Received: by mail-wm0-f67.google.com with SMTP id n138so12842989wmg.2 for ; Thu, 14 Dec 2017 09:36:26 -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=hHFjyWx8NmHGOHzPYawzZFPxB88XC4mXWXKRDdwbpFhS2NU1NlmHu6syQxGwmzi64X 3JBHcNHVu6/+SkhmfIap7mZB92TFyWwitB5sWOBPT8UGnbmtQuc5mTvosZcEtClFLK1a ifAfZmMP4fZk99M2MJP6OOldGdautl6H3GJ3w= 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=Fp/CVyalXVWGT5Z8ZdjY5CiEDnJgsnEAVPHvpckTjMHFJqU5exJEmwoa0Wh07Scv/T qEVLzryqR8irU+2ur7vNk+/0hWI1aDsxyknoXp33B+W+J8dQIUe4RFMTWo+lGVW7TeQ+ jpK5mmKISYfQQ59oJjkhU74XxHVqPNE9UsvSAQiGK97adPmL7QfRqIsbLhY7EpBY7QoJ JPt+OnoBnJduQkDClxqZuxNRg6esaHZiT9hMrnPb/udMCGy6HTSyw/8oCwxtmcpRCgAj 7P/P+knUNp03d/KxSJd2mmgnG0o5VPJIB/T34cZld5lhwmx3ghXNCQ489k/swlY+2M5P cAYQ== X-Gm-Message-State: AKGB3mIj4/nPvdIF8/tNzDLKlloHE52p9aLO5JD+cDItr/jVnuC/SQVg NY/47GBcvxi6+FT6NdGwygkNOw== X-Received: by 10.28.147.8 with SMTP id v8mr3345237wmd.136.1513272985196; Thu, 14 Dec 2017 09:36:25 -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 r82sm1741757wme.31.2017.12.14.09.36.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Dec 2017 09:36:24 -0800 (PST) From: srinivas.kandagatla@linaro.org To: Andy Gross , Mark Brown , linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org Cc: David Brown , Rob Herring , Mark Rutland , Liam Girdwood , Patrick Lai , Banajit Goswami , Jaroslav Kysela , Takashi Iwai , linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sboyd@codeaurora.org, Srinivas Kandagatla Subject: [RESEND PATCH v2 00/15] ASoC: qcom: Add support to QDSP6 based audio Date: Thu, 14 Dec 2017 17:33:47 +0000 Message-Id: <20171214173402.19074-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