Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8542724imu; Fri, 28 Dec 2018 21:39:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN5qccWaFxeoGOuks/Q0ShLlsEK2B0vJalLPftH0FpxEya9UWoDOJyaar4lxwPHvuL2kyeiz X-Received: by 2002:a17:902:bc44:: with SMTP id t4mr29869994plz.260.1546061988366; Fri, 28 Dec 2018 21:39:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546061988; cv=none; d=google.com; s=arc-20160816; b=xjREEFaf1tOy/ja0q9jpPqJwA9m4E6IoBRBVi3i8eGOHX6vXVhYI2hGpfMwh05c9K3 flDS24wuQUI0MkeuhNc3hXfn2+1weHpG7xhXsCZugkpGX7mH4k+nBKAYZ32lzyzbyOlN C6pNUaWm+nPfgYY0R7qKV9nlmGED0sDW0bxWQmnyRCTcJz5lGyCCJ6+AI2MI+ubZmx1l yX9jvqUImT4+okVhceZdBtpp1BqnkF/1LG7Z9UhidqnMcxtYgsOxAs4FtnU/gdFsbeh5 omQAU/urdTR3dmc14g2OJ/hy5MkDBBb/NJD1uLUSOGASxSwZwa56UBTrQfXQNtdJK7Lu gGjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bDHG4WxsQ4XcgMtdWfJAeEhz4qeg/bC5OHWrj6fBTQ4=; b=I3Mdg7wU4actdLe2dYFYIcrFnTB2O2yphW50IgeYSrZgsuyfyWa7fTKN8NL2MPJsB/ LhxtBOtxCenifdt9UHEQS8Bqnef4y2r0OkgObnjTrL7cAiwteTNObjq8hSw8pncYzsai 3KRv7rAWN/cni+wbgqkgsI35PVKEXG09prG/M0nsdWYh1KLHt8Yma+HBCgWhyJ0yvmvg gPG7kNngvjKUFpcGaJ8gL6mQedd0ELkB8xCjPJ9nWIvyWcTp7e0ZzJ10dSkv7AMDw7Z0 Cc8sKaYD8gX+2VMzRmhkRExzepBvBHSb7Qdjbx39wpGPnwE39xE854hFq3f2VKeKXQ8m aGgw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si24193199pgm.216.2018.12.28.21.39.33; Fri, 28 Dec 2018 21:39:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727629AbeL1Xc3 (ORCPT + 99 others); Fri, 28 Dec 2018 18:32:29 -0500 Received: from mail-it1-f196.google.com ([209.85.166.196]:38220 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726113AbeL1Xc3 (ORCPT ); Fri, 28 Dec 2018 18:32:29 -0500 Received: by mail-it1-f196.google.com with SMTP id h65so28604658ith.3; Fri, 28 Dec 2018 15:32:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=bDHG4WxsQ4XcgMtdWfJAeEhz4qeg/bC5OHWrj6fBTQ4=; b=QIRiDYvdCRB2a7S1ZfN4VaSfJh4Pqov8rOfD8sIWWIr51QZ6s6BNgY9FdzujyO39wu d5A+ZSEJ0Pt1PzDCxf0+ElF6CayKUUm9PjumqAL+NPqo34Urg1DWmDkQ6w+ulOtteDfU nIcxZmiOXiMaEAHnevOcrMmMhjfjoUvXfaRnmXfof/7HrK1SM6sYp7QJyVjv0OKLeZjO SemNwx54xymCURSTL3UDXt2zDwa490mF6Qrsu7D1OFkEp2cUAU1K075iU29/n0yd4Q4n 0ELUIKasUtzcsHtxbjWT8//kkng94OiXuBFb7jZC6AoznfLQvjdC/H0skY95CDVr2MZq +9Bg== X-Gm-Message-State: AA+aEWb64GvPVWf8Qu+nETaNvtfK/4Kx6kiQ/8y0asKN1R2+/uIc4tAG dxYIJWQmBtyVY4TSa1YdgYnr4ck= X-Received: by 2002:a05:660c:741:: with SMTP id a1mr17915815itl.100.1546039948287; Fri, 28 Dec 2018 15:32:28 -0800 (PST) Received: from localhost ([24.51.61.172]) by smtp.gmail.com with ESMTPSA id w16sm17487750ita.38.2018.12.28.15.32.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 28 Dec 2018 15:32:27 -0800 (PST) Date: Fri, 28 Dec 2018 17:32:26 -0600 From: Rob Herring To: Viorel Suman Cc: Liam Girdwood , Mark Brown , Mark Rutland , Jaroslav Kysela , Takashi Iwai , Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Daniel Baluta , "alsa-devel@alsa-project.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , dl-linux-imx Subject: Re: [RFC PATCH] ASoC: fsl: Add Audio Mixer CPU DAI driver Message-ID: <20181228233226.GA11728@bogus> References: <1545150569-14897-1-git-send-email-viorel.suman@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1545150569-14897-1-git-send-email-viorel.suman@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 18, 2018 at 04:30:01PM +0000, Viorel Suman wrote: > This patch implements Audio Mixer CPU DAI driver for NXP iMX8 SOCs. > The Audio Mixer is a on-chip functional module that allows mixing of > two audio streams into a single audio stream. > > Audio Mixer datasheet is available here: > https://www.nxp.com/docs/en/reference-manual/IMX8DQXPRM.pdf > > Signed-off-by: Viorel Suman > --- > .../devicetree/bindings/sound/fsl,amix.txt | 45 ++ This should be a separate patch. > sound/soc/fsl/Kconfig | 7 + > sound/soc/fsl/Makefile | 3 + > sound/soc/fsl/fsl_amix.c | 554 +++++++++++++++++++++ > sound/soc/fsl/fsl_amix.h | 101 ++++ > 5 files changed, 710 insertions(+) > create mode 100644 Documentation/devicetree/bindings/sound/fsl,amix.txt > create mode 100644 sound/soc/fsl/fsl_amix.c > create mode 100644 sound/soc/fsl/fsl_amix.h > > diff --git a/Documentation/devicetree/bindings/sound/fsl,amix.txt b/Documentation/devicetree/bindings/sound/fsl,amix.txt > new file mode 100644 > index 0000000..049144f > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/fsl,amix.txt > @@ -0,0 +1,45 @@ > +NXP Audio Mixer (AMIX). > + > +The Audio Mixer is a on-chip functional module that allows mixing of two > +audio streams into a single audio stream. Audio Mixer has two input serial > +audio interfaces. These are driven by two Synchronous Audio interface > +modules (SAI). Each input serial interface carries 8 audio channels in its > +frame in TDM manner. Mixer mixes audio samples of corresponding channels > +from two interfaces into a single sample. Before mixing, audio samples of > +two inputs can be attenuated based on configuration. The output of the > +Audio Mixer is also a serial audio interface. Like input interfaces it has > +the same TDM frame format. This output is used to drive the serial DAC TDM > +interface of audio codec and also sent to the external pins along with the > +receive path of normal audio SAI module for readback by the CPU. > + > +The output of Audio mixer can be selected from any of the three streams > + - serial audio input 1 > + - serial audio input 2 > + - Mixed audio > + > +Mixing operation is independent of audio sample rate but the two audio > +input streams must have same audio sample rate with same number of channels > +in TDM frame to be eligible for mixing. > + > +Device driver required properties: > +================================= > + - compatible : Compatible list, contains "fsl,imx8qm-amix" > + > + - reg : Offset and length of the register set for the device. > + > + - clocks : Must contain an entry for each entry in clock-names. > + > + - clock-names : Must include the "ipg" for register access. Humm, no audio related clocks? > + > + - power-domains : Must contain the phandle to the AMIX power domain node > + > +Device driver configuration example: > +====================================== > + amix: amix@59840000 { > + compatible = "fsl,imx8qm-amix"; > + reg = <0x0 0x59840000 0x0 0x10000>; > + clocks = <&clk IMX8QXP_AUD_AMIX_IPG>; > + clock-names = "ipg"; > + power-domains = <&pd_amix>; > + }; > +