Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6008019pxv; Thu, 29 Jul 2021 04:15:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHvOSpwlmhskXDHaP5+1+oiTFoxFMSh6sWfLroIuLPNWxZcpPtnlQ6Rmay5nm7cr2fIeIw X-Received: by 2002:a92:b110:: with SMTP id t16mr3376640ilh.203.1627557356544; Thu, 29 Jul 2021 04:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627557356; cv=none; d=google.com; s=arc-20160816; b=DccyO1rS4goOoYEv8uApesQmj4sNzh/T6wpBfTLueROZ+3lZ7OrMK26b6xChqckcNE fpVboLIfbpTCx5fAkY/GfMMsnOiLj0cChSJaed8SZjs32qUmIQaj50Ov7dgEFjiZsnsM Itq/0WdMF0bXopbJ9KntxjrOCoG/ekMtyihxVVm7f2SlhN2LU+N3qFx4gZ2uLdsMU+g9 qdRjG6m7QaJGe5Ce7cL34GeMHHG3JeWRzQI8/Qu52iJ0Hq/F2t6SjAgnNHj8080JCKLl 24c5X1UyoJ86A+sntFvcU2rnOfYp21zexwQ1E2DDsbic76/IxDyl8zZQCyNdhBtF2zCo aUbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=OgPRYmU+IR2YH2KoEOplz2gr3qFYiLhj6xZKQTC/7d4=; b=BvYMldLcLsotY8tvc6jlfgVg34ovIO5HmasHiEg3ckrxBwn3F2wADfDvNqSas+dI3H HopPlXcwZP0ES27dQOPirrLoP5ERgblNzozqFzWQnLomX1AgGKfH9qsv158yKYzHiadn Ls+drXp+xHlz3O1O0zTQRc0w+EDNM50W7uwyGP7T98cWGnZP/3xW5Npj498b2KcmW/S7 wfX9FMraT86SDsWZzg+8uT8/TVbg//SYnvRIH9+W52IEELrFZ+bedGuWFfXAgtqC5H6y S/SALnLdnyWaBpJG9Obkw64NC88eQ01/nDPOnizAKf0kilp6xVA29Xgej6EL8XnvC0GC uE3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kV/G5VhW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d14si2902540ilq.43.2021.07.29.04.15.45; Thu, 29 Jul 2021 04:15:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="kV/G5VhW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236577AbhG2LNw (ORCPT + 99 others); Thu, 29 Jul 2021 07:13:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:34696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232195AbhG2LNw (ORCPT ); Thu, 29 Jul 2021 07:13:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D7FB160F21; Thu, 29 Jul 2021 11:13:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627557229; bh=MvtQ8xl4DaKhCl1w9NscHSGdK9FzdvJUFFdvS3LdjYQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kV/G5VhWVGkbjH584vznhhDCtFnZH1shb59Sl1uSR1HK2t+HhJ2M8mUZHXf/Z6mth hr4am4YazksiAwy/3K+Sg6606pRurMkdi8M1G1Y0LSHBRTSmkJi9CVp0FtgyR0IhIz xyqzhToyB2bDOieNdmFicurwFcrk10dr7tjr4ipX3j8P+Iy06bxrLkuQmsBQzyqvA8 36SWHlz0u0OegcnkaAZLbQVARTRKmMmTVg14UXMDLCj3AxMJGNfx4YjH2FagXsy0jn wDpyVBsUDltkKuaSHPBlBB7x8RQHBaBdlGvh6QU+7v7Ra6AJc6wPFyxWqhKGJseKan QEu3jpIZP2Mww== Date: Thu, 29 Jul 2021 12:13:38 +0100 From: Mark Brown To: Srinivas Kandagatla Cc: Rob Herring , bjorn.andersson@linaro.org, plai@codeaurora.org, tiwai@suse.de, devicetree@vger.kernel.org, perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, bgoswami@codeaurora.org Subject: Re: [PATCH v2 04/16] ASoC: qcom: dt-bindings: add bindings Audio Processing manager Message-ID: <20210729111338.GJ4670@sirena.org.uk> References: <20210714153039.28373-1-srinivas.kandagatla@linaro.org> <20210714153039.28373-5-srinivas.kandagatla@linaro.org> <20210728173649.GA1290628@robh.at.kernel.org> <092018be-50ae-6dda-73cd-6c7eb002dc19@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZkK3DH7HIvxYLwhR" Content-Disposition: inline In-Reply-To: <092018be-50ae-6dda-73cd-6c7eb002dc19@linaro.org> X-Cookie: Vini, vidi, Linux! User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ZkK3DH7HIvxYLwhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 29, 2021 at 10:18:28AM +0100, Srinivas Kandagatla wrote: > On 28/07/2021 18:36, Rob Herring wrote: > > This all looks fairly similar to the prior Qcom audio binding(s). It > > would be nice to not see this all re-invented. > AudioReach is a new DSP signal processing framework Which is different to > its previous DSP firmware(aka Elite). > It makes use of ASoC Topology to load audio graphs on to the DSP which is > then managed by APM (Audio Processing Manager) service. > So internals are not exactly same. > From device tree side we might end up with similar layout, but there are > some subtle differences like clocks are managed by q6prm service instead = of > q6afe service in old firmware, front-end pcm dais definitions come from A= SoC > topology. The software we're running on the hardware shouldn't impact how the hardware is described, it should be posible to switch DSP frameworks on the same hardware - look at what Intel have done with SoF. >=20 > Are you suggesting that we should reuse the old bindings (q6afe, q6asm) by > add new compatible strings along with differences ? >=20 >=20 > > >=20 > > > Signed-off-by: Srinivas Kandagatla > > > --- > > > .../devicetree/bindings/sound/qcom,q6apm.yaml | 87 ++++++++++++++++= +++ > > > include/dt-bindings/sound/qcom,q6apm.h | 8 ++ > > > 2 files changed, 95 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6a= pm.yaml > > > create mode 100644 include/dt-bindings/sound/qcom,q6apm.h > > >=20 > > > diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml = b/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml > > > new file mode 100644 > > > index 000000000000..6f27567523a9 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml > > > @@ -0,0 +1,87 @@ > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: "http://devicetree.org/schemas/sound/qcom,q6apm.yaml#" > > > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > > > + > > > +title: Qualcomm Audio Process Manager binding > > > + > > > +maintainers: > > > + - Srinivas Kandagatla > > > + > > > +description: | > > > + This binding describes the Qualcomm Audio Process Manager service = in DSP > > > + > > > +properties: > > > + compatible: > > > + const: qcom,q6apm > > > + > > > + reg: > > > + maxItems: 1 > > > + > > > + '#address-cells': > > > + const: 1 > > > + > > > + '#size-cells': > > > + const: 0 > > > + > > > +#APM Services > > > +patternProperties: > > > + 'apm@[0-9]+$': > >=20 > > This means '.*apm' for the node name. Did you need a '^'? > >=20 > yes we need begins with '^' , will add that in next version. >=20 > > > + type: object > > > + description: > > > + APM devices use subnodes for services. > > > + > > > + properties: > > > + compatible: > > > + enum: > > > + - qcom,q6apm-dais > > > + - qcom,q6apm-bedais > > > + > > > + iommus: > > > + maxItems: 1 > > > + > > > + "#sound-dai-cells": > > > + const: 1 > > > + > > > + reg: > > > + maxItems: 1 > > > + > > > + required: > > > + - compatible > > > + - reg > > > + - '#sound-dai-cells' > > > + > > > + additionalProperties: false > > > + > > > +required: > > > + - compatible > > > + - reg > > > + > > > +additionalProperties: false > > > + > > > +examples: > > > + - | > > > + gpr { > > > + #address-cells =3D <1>; > > > + #size-cells =3D <0>; > > > + gprservice@1 { > > > + compatible =3D "qcom,q6apm"; > > > + reg =3D <1>; > > > + > > > + #address-cells =3D <1>; > > > + #size-cells =3D <0>; > > > + > > > + apm@1 { > > > + compatible =3D "qcom,q6apm-dais"; > > > + #sound-dai-cells =3D <1>; > > > + reg =3D <1>; > > > + }; > > > + > > > + apm@2 { > > > + compatible =3D "qcom,q6apm-bedais"; > > > + #sound-dai-cells =3D <1>; > > > + reg =3D <2>; > > > + }; > > > + }; > > > + }; > > > diff --git a/include/dt-bindings/sound/qcom,q6apm.h b/include/dt-bind= ings/sound/qcom,q6apm.h > > > new file mode 100644 > > > index 000000000000..3c3987eb6e95 > > > --- /dev/null > > > +++ b/include/dt-bindings/sound/qcom,q6apm.h > > > @@ -0,0 +1,8 @@ > > > +/* SPDX-License-Identifier: GPL-2.0 */ > > > +#ifndef __DT_BINDINGS_Q6_APM_H__ > > > +#define __DT_BINDINGS_Q6_APM_H__ > > > + > > > +/* Audio Process Manager (APM) virtual ports IDs */ > > > +#include > >=20 > > Why add this indirection? Rename the file if you need something to cover > > both. >=20 > Thats a good idea, >=20 > These are basically audio endpoint device ids which should be same across > different audio firmwares. >=20 > I can rename this to dt-bindings/sound/qcom,adsp-audio-ports.h or somethi= ng > more generic to be able to reuse. >=20 > --srini > >=20 > > > + > > > +#endif /* __DT_BINDINGS_Q6_APM_H__ */ > > > --=20 > > > 2.21.0 > > >=20 > > >=20 --ZkK3DH7HIvxYLwhR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmECjWEACgkQJNaLcl1U h9C6dwf+PjJAuWxpbfcf4Wp0GacdzLYtni05DNXNG1JPg8AQQeCprQCUSRL2arDU QAzRvpaZ2ivgCxafbpCotVqw26j1NviN+NVv+67GSKw+zUASCxEnJh7FwGV7FoSY 0GwtwNTQ2LIlt8h2OTvQvBwV4AcMLPPbblCm5E5xy4riKvFcE+kizmpBszMNmoXD rYt+9yVoOUzi5JEgdTtCIayWucN2N3YyBBtt6iBw6ajBS0J/aJBdM/8O52CKuGdI mbI4+LoOWK2/NKMXTjETyN+4rxyhqSLdrHfeonLL3yikKi1Be3ShHqkja+rtAxXB 27Riss9bwhhhDtgBOynO1tdrh0h33A== =/zhk -----END PGP SIGNATURE----- --ZkK3DH7HIvxYLwhR--