Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1279474rwd; Thu, 15 Jun 2023 08:29:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5bTZf8MG0Q+1inuPRMF7ELqBT4HUnR9yxK2txN92XmNcHaiNWQUAr/zO66qhvGdVEfEsjD X-Received: by 2002:aca:2408:0:b0:39e:1d17:d67b with SMTP id n8-20020aca2408000000b0039e1d17d67bmr5820041oic.50.1686842987988; Thu, 15 Jun 2023 08:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686842987; cv=none; d=google.com; s=arc-20160816; b=y41ogs+J41FOT7Bz4HSfO6/nxP2RIkraZgTXQx8TmlGx7qwBl4dywxVPuJyMgugn59 SCqPawMJbQ9t7b8dzPB8g8ELXa1oe+UuaOSFxT03MHHoOYh8CFbWbVZvzjKw0nVQksrB xDoLV+aYXmucpizPc+PpR+4bSf1siHE1RrFIhdRWrUwayQ4ZcYYdQ3W+oZCyBU1oDoNS 2xw9nSvETAl8UhCkbYXpv6mJzLqAgD76iHT1YYPl+GPuFoTJ09VTqL8kJn2Bq2QHEnIa 2mMUCJGg1TJF369/uawAaRpnqWdE/Qhdaws4j0SHCY9cis1B63MoLyBsSVrMG8ZJdE5k 40Zw== 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=GyTXVmL/5teIh8xuYTUUi3ltQcCGVDf6AcEbfADS6og=; b=XvZDOz8+rTZGbhEpVGv2CqadqOcQGu/ZQwyk3cQy6VeO8veII4h2kBp1g0S0iniTQs i5e0/7ivAW0Qg5LyIIsR6j7ssnh8IGl9/IFjHcOp+3gNIm+TzlosPCkiLMwCr0P0IM5S gEyvo2xaqAlGH8HaSb3ML1vA1v4Tvn2Tg91winLLA3JHOWa3nbUGs0FLZ/I5qx49w7sh vCapy45R7ZpYOiXQCfj6Wu8HbLJrGD8eaTOB266It+mODsRQbyn3nhMysqjIY6AyMkXb ZP90Kpp0M8e1RXXqEYFw62MkYHk7ejPxxRWW9ntvQOVGcGUVHX8DB0HlDUvKciFZRPoR XnRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hEsTxs4F; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b18-20020a656692000000b005533c53f5cesi85879pgw.27.2023.06.15.08.29.32; Thu, 15 Jun 2023 08:29:47 -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=hEsTxs4F; 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 S1345183AbjFOP0v (ORCPT + 99 others); Thu, 15 Jun 2023 11:26:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345182AbjFOP0k (ORCPT ); Thu, 15 Jun 2023 11:26:40 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23D1E26A2; Thu, 15 Jun 2023 08:26:38 -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=1686842797; 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=GyTXVmL/5teIh8xuYTUUi3ltQcCGVDf6AcEbfADS6og=; b=hEsTxs4FYerXIh5EHWoQI0TmMEDx3dymBWYlPvN7qpgqMdrnMMFZFdm769O7M5RLmQr0TF cRf0g9gXPRGnaxOdrgoB3o3BMg4ApnEWCx8cR+y4SYzXz71U1AIBFTlmvpb81ifqwLgKRM Gxla0V3y744JELfZso8AtVer/OPRePbaEqaqzrUF3dY3AnR0CpuPGj2uXypOTJA7Y048zI gOSpAiNnC2xXhYW1NKyhQIBDxurSZbBv/w2qLdXoFBS8QIjCng0RiJfRQfaKYkyubOuE+d FR+z63B08sfCZW1ULYalGYslK1C3kCpImmPBpnqpa6K1kA3w1USE9PzdWEO+TA== 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 3E4FCFF807; Thu, 15 Jun 2023 15:26:36 +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, Christophe Leroy , Thomas Petazzoni Subject: [PATCH v5 01/13] ASoC: dt-bindings: Add audio-iio-aux Date: Thu, 15 Jun 2023 17:26:19 +0200 Message-Id: <20230615152631.224529-2-herve.codina@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230615152631.224529-1-herve.codina@bootlin.com> References: <20230615152631.224529-1-herve.codina@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 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 --- .../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>; + }; -- 2.40.1