From patchwork Fri Jun 23 08:58:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Herve Codina X-Patchwork-Id: 111987 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp5629368vqr; Fri, 23 Jun 2023 02:00:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4rY9Rk6oTm0s9KsuvXAAzEOMhjBOEBHnRa+rnvCLX3ZT00KYmQ41NrujWYA4D6tQz2nF/W X-Received: by 2002:a05:6358:6a49:b0:12f:91cd:2d07 with SMTP id c9-20020a0563586a4900b0012f91cd2d07mr13435419rwh.28.1687510830973; Fri, 23 Jun 2023 02:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687510830; cv=none; d=google.com; s=arc-20160816; b=ZdCNm8qppDYA8twBNL9v8jBfVap3eoVh8R2DhP2AHW3IQiyKXY1o5mU1hhjcfX/Wz6 VJLk/uBgRX9YPtaAtEpzSJUCcW0cT3UscKIDCzR00xmwg7yjTSMwC23Iy72hKg0246M5 iP1XzN2QhGtm9VaqYX3UYOhJOsPVwurYu6BpANVhH1BSsXg1GBrWZ9EBo96mylY137II CfBiESkTy5fCvFXQBKbM+ISyoOGqWNUNQ1mNMSD1rnnNVc0VxuvuyN9QzsMbgMI5QMXA QOxJmvDtd1hqkTIiJPuoY/bXogLAeZOyph9VbIB/dMEEtOAJ3OPk0/iga2tR4NVM/LcD E1ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EEEy793cjGF4C1unCyddxor7imGVvD+ZiP6bKckvbw4=; b=tF1qeNN+MCwfH2QkE8uTGULJSAWF5/PZIIsojABqF/FNA9Hj55s6Vjmoue5+m+0NwT ELZoxpc7Sya7I3P3Tzup2oHNviOeI3cZWKuP3/VQnFlNT/AzUZetna08TgMd6rgDiTbW b+u4hIkglkt7WVhUQvQkc1j09GXBpijP7qmFTKELbtREp/i07zP4erv63Ole6JBlisDW 7hMRKbCZndFe0Gp2HPel0G7GEAHfkvuSB50NsldyxJjlzjBv94Ay7OCdWo6gC5QaQNVW GJznFRifXjZN4ku3CepODTD+Y6xTzDITeoEyuLYpP5PXr5W1vGB2Zb8nsOMYngDa6EUX AgPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=UotQHbaA; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b005538fca55f5si8344511pgq.874.2023.06.23.02.00.18; Fri, 23 Jun 2023 02:00:30 -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=@bootlin.com header.s=gm1 header.b=UotQHbaA; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231591AbjFWI6t (ORCPT + 99 others); Fri, 23 Jun 2023 04:58:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230260AbjFWI6o (ORCPT ); Fri, 23 Jun 2023 04:58:44 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C2942136; Fri, 23 Jun 2023 01:58:41 -0700 (PDT) X-GND-Sasl: herve.codina@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1687510720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EEEy793cjGF4C1unCyddxor7imGVvD+ZiP6bKckvbw4=; b=UotQHbaAJeNXasLN9mk7ePmGKLlGqSP5Pk+4e4/5oGOhcBkWTqdISJTeO8zYXONumIYwR3 Od7Qd/WgRSMRq1o45te8iI48HzGRLT3mSf6jYm6zPkG4p27aPt4paAiWNd0i5xUJq42pb0 5Ig4LySjXqz/dZF2avcsX4oFRD/8Fp5XbV/S+GP1Mi86Jvo96Vd3Ler343LhhDOcUGyCes Mbyd0W6rRpuFVbLHZrkiUtHfrSl7TL/0jBeIvKdf0a5SuEzFhYXwvXKyQZ3sKQviNgVvm5 c5lHEslDQAjzYHT95A7JsL+v/jRe40vpqTWvd/r2I9ADxZAWcfhF6xFCtWwP7A== X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com X-GND-Sasl: herve.codina@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPA id A0B9CE000C; Fri, 23 Jun 2023 08:58:38 +0000 (UTC) From: Herve Codina To: Herve Codina , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , Lars-Peter Clausen , Jaroslav Kysela , Takashi Iwai , Kuninori Morimoto , Andy Shevchenko Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, Wojciech Ziemba , Christophe Leroy , Thomas Petazzoni , Jonathan Cameron , Rob Herring Subject: [PATCH v6 01/13] ASoC: dt-bindings: Add audio-iio-aux Date: Fri, 23 Jun 2023 10:58:18 +0200 Message-Id: <20230623085830.749991-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230623085830.749991-1-herve.codina@bootlin.com> References: <20230623085830.749991-1-herve.codina@bootlin.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769483357225439485?= X-GMAIL-MSGID: =?utf-8?q?1769483357225439485?= Industrial I/O devices can be present in the audio path. These devices needs to be viewed as audio components in order to be fully integrated in the audio path. audio-iio-aux allows to consider these Industrial I/O devices as auxliary audio devices. Signed-off-by: Herve Codina Reviewed-by: Jonathan Cameron Reviewed-by: Rob Herring Reviewed-by: Christophe Leroy Reviewed-by: Christophe Leroy --- .../bindings/sound/audio-iio-aux.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/audio-iio-aux.yaml diff --git a/Documentation/devicetree/bindings/sound/audio-iio-aux.yaml b/Documentation/devicetree/bindings/sound/audio-iio-aux.yaml new file mode 100644 index 000000000000..d3cc1ea4a175 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/audio-iio-aux.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/audio-iio-aux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Audio IIO auxiliary + +maintainers: + - Herve Codina + +description: + Auxiliary device based on Industrial I/O device channels + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + const: audio-iio-aux + + io-channels: + description: + Industrial I/O device channels used + + io-channel-names: + description: + Industrial I/O channel names related to io-channels. + These names are used to provides sound controls, widgets and routes names. + + snd-control-invert-range: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + A list of 0/1 flags defining whether or not the related channel is + inverted + items: + enum: [0, 1] + default: 0 + description: | + Invert the sound control value compared to the IIO channel raw value. + - 1: The related sound control value is inverted meaning that the + minimum sound control value correspond to the maximum IIO channel + raw value and the maximum sound control value correspond to the + minimum IIO channel raw value. + - 0: The related sound control value is not inverted meaning that the + minimum (resp maximum) sound control value correspond to the + minimum (resp maximum) IIO channel raw value. + +required: + - compatible + - io-channels + - io-channel-names + +unevaluatedProperties: false + +examples: + - | + iio-aux { + compatible = "audio-iio-aux"; + io-channels = <&iio 0>, <&iio 1>, <&iio 2>, <&iio 3>; + io-channel-names = "CH0", "CH1", "CH2", "CH3"; + /* Invert CH1 and CH2 */ + snd-control-invert-range = <0 1 1 0>; + };