Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6284848rwr; Tue, 9 May 2023 12:57:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5+FB7fVr0hN/3CutJEnGWopofTupgvXJ9Myq2ERje8NAk2SwmE/DkCLG5McHUB25GcLisC X-Received: by 2002:a17:902:ec88:b0:1aa:fbaa:ee09 with SMTP id x8-20020a170902ec8800b001aafbaaee09mr20717679plg.49.1683662271684; Tue, 09 May 2023 12:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683662271; cv=none; d=google.com; s=arc-20160816; b=W+goorou1YN4a2FUEXxM9nS7fOQUGjqEAEtlRtMKK/V/YYv3Imcd5ECM1/bCZ5fA15 1kpz3UeanhqYOBFhYr6zyTrYZcP60GvzAEImv+gukkyu85BZB5sRYnYoMzS1DIfeFydh T9GcR013NMkaXzGJzuNKDkmM2Q36S7ETZyxTt+w1097i2Sabjgt1mlfIpb1/v6gzjz66 rwD0fvMpXXhOPM00IyRGtV/KnJayFisk0KmR05RhNt2rVVn/uA2RwrDw2ByNChFxXt7k CABgnu8vnHXdmFabWBP05KxEPhKy5sWRxJacgvNEckac+qbWT0zAQY7BdKLrPes1lrlV Z0wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=phU5h8y0oMRwi2ThZZnGKdLtQF3CnRbkMjIYN0/eHWI=; b=sZP4fcEv0avHD3uVKfofF3ldmAEOR00BM4O+rxIa4M4qyXSyjin252saK/yykwaZ9u lU9KS2prqxVfoVOrM8tXe6x3VsTH1vLhJN0qVw1FPQwYuIOPV1KTcBIVvu0zL1mh5x6O 6JihSXHtjGw8A3n50xeYNnx9HXydRrGvdQsQDc5blmcrWeXbWI94sspQOzjz9umNZ/Ne P7g3WDXa1ersbRmrCQbI6JjhiHA5XZ+WlfD9MH6EXLspTu3/yNWhH4irrd3egnRZjbaA 6Ux07YYqTyWuIs8jdweglYb2NxhH6uiFeSyj/j5DnfD/2RjAmogSUC5AbZ8ZgibybwJP K1bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=iMrlfDHQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a17090332c200b001a05347d092si2300796plr.642.2023.05.09.12.57.40; Tue, 09 May 2023 12:57:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=iMrlfDHQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235038AbjEITi7 (ORCPT + 99 others); Tue, 9 May 2023 15:38:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbjEITi5 (ORCPT ); Tue, 9 May 2023 15:38:57 -0400 Received: from hutie.ust.cz (hutie.ust.cz [185.8.165.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFCD349E4; Tue, 9 May 2023 12:38:49 -0700 (PDT) Content-Type: text/plain; charset=utf-8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1683661126; bh=phU5h8y0oMRwi2ThZZnGKdLtQF3CnRbkMjIYN0/eHWI=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=iMrlfDHQSCycs969tMDE/i71ih4h1OCAaIBdjXCG+X7OlAbzEvK6YBwS3w12gdsnY YG7Aux2+inDEd3XHCTKrxrFa+V9oyf8Lw/xBbA7p1mhWPKzIvUdp2n4fGrMF6gNgvB JngPMVGxtpaTa5f1XA1MHrOww6w+evnSb0GzLG0U= Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [PATCH 1/2] ASoC: dt-bindings: Add adi,ssm3515 amp schema From: =?utf-8?Q?Martin_Povi=C5=A1er?= In-Reply-To: <20230509-marxism-plug-759c99ac601c@spud> Date: Tue, 9 May 2023 21:38:46 +0200 Cc: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?Q?Nuno_S=C3=A1?= , asahi@lists.linux.dev, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Message-Id: <0216884B-A6F4-46B0-AEB9-AA16B3F24C8C@cutebit.org> References: <20230509163828.86003-1-povik+lin@cutebit.org> <20230509-marxism-plug-759c99ac601c@spud> To: Conor Dooley X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Conor, > On 9. 5. 2023, at 20:25, Conor Dooley wrote: >=20 > Hey Martin, >=20 > On Tue, May 09, 2023 at 06:38:27PM +0200, Martin Povi=C5=A1er wrote: >> Add a DT schema for the SSM3515 amp by Analog Devices. It's a simple >> mono amplifier with digital input. >>=20 >> Signed-off-by: Martin Povi=C5=A1er >> --- >> .../bindings/sound/adi,ssm3515.yaml | 66 = +++++++++++++++++++ >> 1 file changed, 66 insertions(+) >> create mode 100644 = Documentation/devicetree/bindings/sound/adi,ssm3515.yaml >>=20 >> diff --git a/Documentation/devicetree/bindings/sound/adi,ssm3515.yaml = b/Documentation/devicetree/bindings/sound/adi,ssm3515.yaml >> new file mode 100644 >> index 000000000000..19b7185ae8e2 >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/sound/adi,ssm3515.yaml >> @@ -0,0 +1,66 @@ >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >> +# Copyright (C) 2019-20 Texas Instruments Incorporated >=20 > Copyright here looks a little odd, copy & paste from the TI bindings = you > send patches for earlier, or intended? Yeah, that must have been a copypaste from the other schemas. Not = intended in any case. Thanks for the catch. >=20 >> +%YAML 1.2 >> +--- >> +$id: "http://devicetree.org/schemas/sound/adi,ssm3515.yaml#" >> +$schema: "http://devicetree.org/meta-schemas/core.yaml#" >=20 > Drop the quotes on these please. OK >> + >> + adi,ana-gain: >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + enum: [0, 1, 2, 3] >> + description: | >> + The value to be set in the ANA_GAIN register field on the = codec. This determines >> + the full voltage span of the codec's analog output. >> + >> + To quote the datasheet on the available options: >> + >> + 00: 8.4 V Full-Scale Gain Mapping >> + 01: 12.6 V Full-Scale Gain Mapping >> + 10: 14 V Full-Scale Gain Mapping >> + 11: 15 V Full-Scale Gain Mapping >=20 > Putting register values into the DT does not seem correct, although > I know nothing about sound and will have to defer to Krzysztof & Co. = on > that front. It=E2=80=99s an analog gain selection, it just seemed most honest and = convenient to defer to the register field in describing of what this property does. I thought this should be here, and not with the other gain controls to = be exported to userspace, since it relates to the supply voltage. You = probably can=E2=80=99t select a gain value close or over the amp=E2=80=99s supply = and expect proper functioning, so the value here should be the system=E2=80=99s integrator = choice. On second thought there doesn=E2=80=99t seem to be any risk of damage to = the amp itself, so the knowledge of what=E2=80=99s the optimal value could be = left up to ALSA use-case configuration, and there=E2=80=99s no real downside in = treating it like other gain controls. I think I will remove it in the next iteration. > Cheers, > Conor. Cheers, Martin=