From patchwork Wed Nov 24 22:00:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 518114 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75677C433EF for ; Wed, 24 Nov 2021 22:14:45 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8B41F1878; Wed, 24 Nov 2021 23:13:53 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8B41F1878 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637792083; bh=xS8ddv4zKX2JunJZdPjwJglEBs8rVDsumpZkEpy607I=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=i+xzPcW1CnkYyWkYfwWJmA1jvtwRoJhb2AYcyitrTcjeZujEMfP8mBEJ0/GBOajiU XPxVKe0CAb0MULG9v58uVL+LUgkELodVhs5G/z9fGU+GkQdRnWTaRqsqA38g4HH5LI OD1CAzUHj2e3L4M4wGA0VP6H5RLupTfFN2X3aXqc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C9E8BF805A0; Wed, 24 Nov 2021 23:07:38 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4C914F801F7; Wed, 24 Nov 2021 23:07:36 +0100 (CET) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CC689F80245 for ; Wed, 24 Nov 2021 23:06:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CC689F80245 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qfW/HGnp" Received: by mail-lf1-x130.google.com with SMTP id c32so10997453lfv.4 for ; Wed, 24 Nov 2021 14:06:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2uuzWPY9rvjqfLr6fV1cmdNXd06jrQuuKD96OjbdPNQ=; b=qfW/HGnpwCJ+dlE2szaDZeKhas1KXNCAysUabq12Y4F5YGkDbHpghxFVOofzIK/kTC gElro/xsp2BmqhbbG3ukENdsXrM9TwUCWplBi6kH+whRJB8SDMaLZFjTvHm/8V03CJ++ RLRTk+bu7Y3J9gdjMza+jSJyJjieaKdSMxy+eD8wOGX3WLkHpww8wtwwMBsFJLUhrAH/ P4l/0QOWxp7sTeiB5tf21QhBm7/gvsft2MS/cFZlxQX+b45CW4ykPXboy/+9UXz7gz1W B5RpB040Vl27+liyU/91pUGKM5/H4jly777rmEfqoluq7zNJgdIPhoMtAPKruSeaH/P0 6MPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2uuzWPY9rvjqfLr6fV1cmdNXd06jrQuuKD96OjbdPNQ=; b=EBeBPb2W3T+dDetG70KQOnH5nWrMF1klkXSWUH9BzsfNZtuDw9l15B5zrL0p5CFzeV qw174eNIv/x9kbv/HtKsTNPl6+3yAzpTcOltLNaYF/7ZNv3TFfmEH49/VFGRFcAX+Wwz fmtOiLbLibV+fSNrrgWLd0F2XLapr8VoiDsHfUvdPPYbK4w0bH8ZIzHBlQnyfdqY0LSz Gfyf8j3qU8+3eGuTk+unOkUDxzOI1viwxrR0+ioIVMQVbXGNAwPHbKZjRAyYi9JJccBx 1K1gdCvmS+eXzu80J82Zs+N2D/kHaQD2qFQIMNvBi9JmIXEnrv++JN4v6P2SUJYPZxuw vGdA== X-Gm-Message-State: AOAM532mcYFB/XfrhtgDakL8llOYaXGQ7CY+Ft3r/5l9rTnw/hm7fzhA jDAGArZoHKNiveYFesgzawE= X-Google-Smtp-Source: ABdhPJzQ5wmPsf7MT2kOseSoWuXZrjMS2l8zY/SyQMJGCvCCrfyBLGpbOCXFy5OZHCgrTdnaiZanxQ== X-Received: by 2002:a05:6512:249:: with SMTP id b9mr19394202lfo.496.1637791590799; Wed, 24 Nov 2021 14:06:30 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id w17sm93266ljh.15.2021.11.24.14.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 14:06:30 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v1 01/20] ASoC: dt-bindings: Add binding for Tegra20 S/PDIF Date: Thu, 25 Nov 2021 01:00:38 +0300 Message-Id: <20211124220057.15763-2-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211124220057.15763-1-digetx@gmail.com> References: <20211124220057.15763-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Add device-tree binding for Tegra20 S/PDIF controller. Signed-off-by: Dmitry Osipenko --- .../bindings/sound/nvidia,tegra20-spdif.yaml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra20-spdif.yaml diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra20-spdif.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra20-spdif.yaml new file mode 100644 index 000000000000..4a2747d64772 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra20-spdif.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra20-spdif.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra20 S/PDIF Controller + +description: | + The S/PDIF controller supports both input and output in serial audio + digital interface format. The input controller can digitally recover + a clock from the received stream. The S/PDIF controller is also used + to generate the embedded audio for HDMI output channel. + +maintainers: + - Thierry Reding + - Jon Hunter + +properties: + compatible: + const: nvidia,tegra20-spdif + + reg: + maxItems: 1 + + resets: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + minItems: 2 + + clock-names: + items: + - const: spdif_out + - const: spdif_in + + dmas: + minItems: 2 + + dma-names: + items: + - const: rx + - const: tx + + "#sound-dai-cells": + const: 0 + + nvidia,fixed-parent-rate: + description: | + Specifies whether board prefers parent clock to stay at a fixed rate. + This allows multiple Tegra20 audio components work simultaneously by + limiting number of supportable audio rates. + type: boolean + + assigned-clocks: true + assigned-clock-parents: true + +required: + - compatible + - reg + - resets + - interrupts + - clocks + - clock-names + - dmas + - dma-names + - "#sound-dai-cells" + +additionalProperties: false + +examples: + - | + spdif@70002400 { + compatible = "nvidia,tegra20-spdif"; + reg = <0x70002400 0x200>; + interrupts = <77>; + clocks = <&tegra_car99>, <&tegra_car 98>; + clock-names = "spdif_out", "spdif_in"; + resets = <&tegra_car 10>; + dmas = <&apbdma 3>, <&apbdma 3>; + dma-names = "rx", "tx"; + #sound-dai-cells = <0>; + }; + +... From patchwork Wed Nov 24 22:00:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 518124 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2AB16C433F5 for ; Wed, 24 Nov 2021 22:07:35 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 94FB017BF; Wed, 24 Nov 2021 23:06:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 94FB017BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637791653; bh=UJPX5om0NpE0shZXifG9hhxCjt1/wWfpUvTiID01OUM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=D9F7KUwIF/GJwVXKe/UYWk7+usKWj9yDkxeYsHW1xoAyJIG6YgNNjwsnYheyaxM7d oQtRHMw/SUdh/BxDyrn8MzGh1wmjc52kTwbXKjmF/m0lXoDeuR919uuUIMYzU/N80x NyVwYDrZhbQybsoppLwaH5StHTtvCnl3kzuup95A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 21B30F8032D; Wed, 24 Nov 2021 23:06:43 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4D4AEF804AD; Wed, 24 Nov 2021 23:06:40 +0100 (CET) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 369AFF8013A for ; Wed, 24 Nov 2021 23:06:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 369AFF8013A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HhIn/DTx" Received: by mail-lf1-x130.google.com with SMTP id bu18so11106781lfb.0 for ; Wed, 24 Nov 2021 14:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MICB7mqmtHJVlNvBv+SpnWZStTf75CqEHyV3SkIQNcM=; b=HhIn/DTxG+D4VfSf2OQYzEE48im3KVlsU7kOnmsyyR9CmnJXYni1HO1NFe5pqJ4PTN OGXFX5iISFdbDHGQVbUJbgW4fGwJKApNGMWY5gPBxNJGZQS6JYzJ6x2l6+BuKBtv9qs6 kpWqN+BWZVOk94Cp31E2S/bI4cENe70RshvOHmyGWCMKT8BKM1g6CUYGRQAzJuzZjCP6 apIMCILOeJ1p+mReMRFK9M0GxBY2CI4pdDrdErVBmx4HGFUwvNYT8Wg6ECFz/SJU+91T QrV6I7hbKK8nHcstU0o86z9ffx8tvcOLhqlMk7aAphpdoExJ3exK+FQwizJyRGk5HCjS 5EzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MICB7mqmtHJVlNvBv+SpnWZStTf75CqEHyV3SkIQNcM=; b=iIvOl2qywIo+Lr1e2HyiIqBISByZp+YDgL7fa8olQsvAYcwH8eWVcyHqghSX30HvXZ nz8MM4ep2/M2KMP6gFzrljjgNJ/EEjgDfJSb449BozNQ4lYjTgufEZLE5tDyEWtVcWoH dgO/Dxb239HQ6V7EOA50FHap6LlnOsZZ32MZYmoJBO/UWTzXfduN5NwSoJQiIDZ+XuN5 RZyeFAQH5CjgXsjl5KxxLYVEkFebVJhk54B8LWQi4yIUJfQ2r33tjdwFf37gmq+opA2R 7fVc09wLH4UqJ9y2JDHhXEAIWPcWM0igDhUuJDMOPC7s7M3bF7t2meITRy3ZCl+wkkng CatA== X-Gm-Message-State: AOAM532aGVUC143NeiPW0WDA7jZwCP+UgIsayePZT8quNIMHVEn4unf0 dvdCumIMniSPIP3rH5abUOI= X-Google-Smtp-Source: ABdhPJwRcOg8FSHfX1XMSp6JKcqGsETM9PJXhUfm1mZ0N3DupGcSvfd54SIFkK8zcPH7ShULyXhhSw== X-Received: by 2002:a05:6512:2341:: with SMTP id p1mr18799257lfu.204.1637791591580; Wed, 24 Nov 2021 14:06:31 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id w17sm93266ljh.15.2021.11.24.14.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 14:06:31 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v1 02/20] ASoC: dt-bindings: tegra20-i2s: Convert to schema Date: Thu, 25 Nov 2021 01:00:39 +0300 Message-Id: <20211124220057.15763-3-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211124220057.15763-1-digetx@gmail.com> References: <20211124220057.15763-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Convert NVIDIA Tegra20 I2S binding to schema. Signed-off-by: Dmitry Osipenko --- .../bindings/sound/nvidia,tegra20-i2s.txt | 30 -------- .../bindings/sound/nvidia,tegra20-i2s.yaml | 71 +++++++++++++++++++ 2 files changed, 71 insertions(+), 30 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.yaml diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt deleted file mode 100644 index dc30c6bfbe95..000000000000 --- a/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.txt +++ /dev/null @@ -1,30 +0,0 @@ -NVIDIA Tegra 20 I2S controller - -Required properties: -- compatible : "nvidia,tegra20-i2s" -- reg : Should contain I2S registers location and length -- interrupts : Should contain I2S interrupt -- resets : Must contain an entry for each entry in reset-names. - See ../reset/reset.txt for details. -- reset-names : Must include the following entries: - - i2s -- dmas : Must contain an entry for each entry in clock-names. - See ../dma/dma.txt for details. -- dma-names : Must include the following entries: - - rx - - tx -- clocks : Must contain one entry, for the module clock. - See ../clocks/clock-bindings.txt for details. - -Example: - -i2s@70002800 { - compatible = "nvidia,tegra20-i2s"; - reg = <0x70002800 0x200>; - interrupts = < 45 >; - clocks = <&tegra_car 11>; - resets = <&tegra_car 11>; - reset-names = "i2s"; - dmas = <&apbdma 21>, <&apbdma 21>; - dma-names = "rx", "tx"; -}; diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.yaml b/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.yaml new file mode 100644 index 000000000000..cd87eb4ef995 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra20-i2s.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/nvidia,tegra20-i2s.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra20 I2S Controller + +description: | + The I2S Controller streams synchronous serial audio data between system + memory and an external audio device. The controller supports the I2S Left + Justified Mode, Right Justified Mode, and DSP mode formats. + +maintainers: + - Thierry Reding + - Jon Hunter + +properties: + compatible: + const: nvidia,tegra20-i2s + + reg: + maxItems: 1 + + resets: + maxItems: 1 + + reset-names: + const: i2s + + interrupts: + maxItems: 1 + + clocks: + minItems: 1 + + dmas: + minItems: 2 + + dma-names: + items: + - const: rx + - const: tx + +required: + - compatible + - reg + - resets + - reset-names + - interrupts + - clocks + - clock-names + - dmas + - dma-names + +additionalProperties: false + +examples: + - | + i2s@70002800 { + compatible = "nvidia,tegra20-i2s"; + reg = <0x70002800 0x200>; + interrupts = <45>; + clocks = <&tegra_car 11>; + resets = <&tegra_car 11>; + reset-names = "i2s"; + dmas = <&apbdma 21>, <&apbdma 21>; + dma-names = "rx", "tx"; + }; + +... From patchwork Wed Nov 24 22:00:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 518115 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AE442C433EF for ; Wed, 24 Nov 2021 22:14:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D20E617E7; Wed, 24 Nov 2021 23:13:14 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D20E617E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637792044; bh=LzzPOO+RM6FEOiFNwxVrD5niwYNDvz2u+GaEY3CfkBM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sLcIgvo6q3lz0TI3Dc6bdHnycyWYmSS0laj/VhtlyQlPkhJTJqx0fVeM4rlgmo18f cxix9F4VQPPWU01gcGPWkwnTipsFk8drHhOTMMnd3crgwXKw2ni1yHERVLr/kJ76kL TJpIguEHMK1pyc0GFOlMv6q7v5HJKQ0KYzB5lex0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6FDD6F80212; Wed, 24 Nov 2021 23:07:37 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 458FCF8058C; Wed, 24 Nov 2021 23:07:36 +0100 (CET) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 394C8F801F7 for ; Wed, 24 Nov 2021 23:06:35 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 394C8F801F7 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ARwTAJfT" Received: by mail-lf1-x12e.google.com with SMTP id bi37so10957617lfb.5 for ; Wed, 24 Nov 2021 14:06:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jZtmNInV251GqgFq3K9ZRWdCyBV26EPK8i39JKkeuGY=; b=ARwTAJfTqtelTIPULCHTr4G1ZuHUenvIBkuGFZhD92TpJknc06Pw4cc8Q0R4MkYvx6 ZrGOgymmMNeLJVRsE9/cc5Ab3/Isn6TJ/W0hPgcZwOEfa3j2FDIf0rCGr7KuMPBV59Si SJWeTuh6I7v7M09Q623XB87OkuNd+AwC4UztBJOpDnXF5/CBuHKP3gHgvGh5xNJ2QBbX 9lOkMvN8rkLKzWw1To+uJiANLdC1wZCXreMAsaQUt4OfMwVpVCDk7gxkrKflx3D4zStc heknKMF8Gd2Lhn0RUV5qxHSS/hp6xVdYYKOqg1/ycE7I2303I3dBEl5MG0m2eWG+ITKX nlug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jZtmNInV251GqgFq3K9ZRWdCyBV26EPK8i39JKkeuGY=; b=tl3QHxjeXP8tIw5R/xRBD5f4iGcny949vz3ysZIp3JyNsQAUTRYCkS2QaH+WHx87pr z+cnTHA4BH7Kev6eL79aJpR5V7LQy+2cTOlbd7eOa7lPDAONAQ2MDbUTHlMpmmISNo5W 2yT9WWys5U4xQdTkCkTB9FQLb3yDWfqBKR3DIojbTTims+GWWzMJIJfhnRmGKxia8BAg MJa7ya/MQHt1EASXKg4TEfeXK5QWIVctyrmjJcVqqbNUfkZaJLtHnqBI/WwTucamEVN3 SPvVOXW/7U5ki1Vqx8ZSV34An0RPoFEpte5uW4K3vUZx1jVucX3Otc1CMze/P2LtMc8/ QQPg== X-Gm-Message-State: AOAM530aZqrZQ33SfMBT/gTIGUWuFCXw4jVOkQV0RdBWIUfqol++tzML bI8Sp8hmMda0MhR6p4iQCYM= X-Google-Smtp-Source: ABdhPJzhi7UNU46047RRxIFY+qitxZ5+V78jiCA3Ag2Za0QxQcgCp2Ay3wCtMWWTnZuxJO6SBU4FjQ== X-Received: by 2002:a19:c308:: with SMTP id t8mr18436846lff.621.1637791593535; Wed, 24 Nov 2021 14:06:33 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id w17sm93266ljh.15.2021.11.24.14.06.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 14:06:33 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v1 04/20] dt-bindings: host1x: Document optional HDMI sound-dai-cells Date: Thu, 25 Nov 2021 01:00:41 +0300 Message-Id: <20211124220057.15763-5-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211124220057.15763-1-digetx@gmail.com> References: <20211124220057.15763-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Document new optional sound-dai-cells property of HDMI node. This node will be used as endpoint of HDMI sound DAI graph. Signed-off-by: Dmitry Osipenko --- .../devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt index e61999ce54e9..27b746f28f31 100644 --- a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt +++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt @@ -297,6 +297,7 @@ of the following host1x client modules: - nvidia,edid: supplies a binary EDID blob - nvidia,panel: phandle of a display panel - operating-points-v2: See ../bindings/opp/opp.txt for details. + - #sound-dai-cells: Should be 0. - tvo: TV encoder output From patchwork Wed Nov 24 22:00:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 518120 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31396C433EF for ; Wed, 24 Nov 2021 22:10:31 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5DDF217D4; Wed, 24 Nov 2021 23:09:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5DDF217D4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637791829; bh=yJLbY0Ibh5GGbjilTVPPqneyfq24PxZlF14d+djHmKE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JQYuCsgYmWmDvQor/Suz0qjCPT7D0NlHOcvYulBQQ62D1jzYQhFRKbHbR+KcL/S0O QlsW6f6NQOMbZcsNgV740jzuSNPefEO+oU4h7puj8Ev2x7Z7wOmaMZfQlC9kSPULky wUwkeyeeQKfGqa/FTN7rDnN3n04v/hYKMAYTRgGY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8BAF5F80524; Wed, 24 Nov 2021 23:06:57 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9E71AF80519; Wed, 24 Nov 2021 23:06:52 +0100 (CET) Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B50A9F804ED for ; Wed, 24 Nov 2021 23:06:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B50A9F804ED Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UqwzU78y" Received: by mail-lj1-x235.google.com with SMTP id 207so8350044ljf.10 for ; Wed, 24 Nov 2021 14:06:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1JU496kEAul2Xrq2ly7/mGbdp4YdTxxslXy87kjnkVE=; b=UqwzU78ytiFl6/Y/ntkoBchG3Lc6SXt6mrHGgPBCHW5nh9kTIg+ls1wTiTKE4yID3C we6f23L5TPwplR8LoL/OQ9Cp5QLkkALk6tyAMys6W6VkLak7/ZwmqIqbKtayFHFkxD31 LnTAE+RnHWBlZOGQrmklnFF1nUKQDd82jjO7PCZVmrcNOMS3Fz6Lvt3wSV0a+bSf4gOe VfNb0TCxamCV9LKcR2Rrf05Elmd04arCw0ITH9RiP7vPHuhjMzO4bisyW1gmlkl64Ctv GC8BtGu6I+eOvvfVohuGYchkVfQ5MRCz2ObBvNX7O4YGCtPv6Wug/RWU1+ySuc8hlE+c EWGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1JU496kEAul2Xrq2ly7/mGbdp4YdTxxslXy87kjnkVE=; b=hPpkr8K9/TwPSlB0DNtjAFOSd740KARKMg96tWh6L1LFcDdbZWbtKLkAa1nSG5UcXU 84Wzn/5dvx0+zZOwEjJ97o1c7bksc02Hq03CnFq3hgSZ0MOkFdJ4Xet8XIQUrznCTwtr tVEJEcQ3tGo7xBZbYI093k24TOuMKtwKY2mq3AXsqrk93hjsAPHbRPr65JY0rv6Ydcyz 8txVVkUUfG0FFNMYFbUgF9Iogak8tMBt6pwGEx8hfSHfYGa4vl3HKTeuXBq8blLZ4dPi Sz0b28dl2RHW3BCXkvuxaYNfMrVz38COdTS01LR4XRo4SXnjCSiiU3fSm3WckhIk8quj oaGw== X-Gm-Message-State: AOAM533zZOGZVWz2Em6LkbsHI1TcnnbNR88lH9UAMXdd+cM0201t/SR3 f1V6cA0zscDApBH40Dvrl8E= X-Google-Smtp-Source: ABdhPJyzNTbRmF53l+Iw649bJHHzEY01rJ+pkrDrJDSRRi2322Eki64x9PXyd93QePOA6hecAJIOhA== X-Received: by 2002:a2e:9450:: with SMTP id o16mr19173212ljh.444.1637791595711; Wed, 24 Nov 2021 14:06:35 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id w17sm93266ljh.15.2021.11.24.14.06.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 14:06:35 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v1 06/20] ASoC: tegra20: spdif: Support device-tree Date: Thu, 25 Nov 2021 01:00:43 +0300 Message-Id: <20211124220057.15763-7-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211124220057.15763-1-digetx@gmail.com> References: <20211124220057.15763-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Tegra20 S/PDIF driver was added in a pre-DT era and was never used since that time. Revive driver by adding device-tree support. Signed-off-by: Dmitry Osipenko --- sound/soc/tegra/tegra20_spdif.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index 57a6c576b91f..bd81df5378d1 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -332,10 +333,17 @@ static const struct dev_pm_ops tegra20_spdif_pm_ops = { tegra20_spdif_runtime_resume, NULL) }; +static const struct of_device_id tegra20_spdif_of_match[] = { + { .compatible = "nvidia,tegra20-spdif", }, + {}, +}; +MODULE_DEVICE_TABLE(of, tegra20_spdif_of_match); + static struct platform_driver tegra20_spdif_driver = { .driver = { .name = DRV_NAME, .pm = &tegra20_spdif_pm_ops, + .of_match_table = tegra20_spdif_of_match, }, .probe = tegra20_spdif_platform_probe, .remove = tegra20_spdif_platform_remove, @@ -346,4 +354,3 @@ module_platform_driver(tegra20_spdif_driver); MODULE_AUTHOR("Stephen Warren "); MODULE_DESCRIPTION("Tegra20 SPDIF ASoC driver"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:" DRV_NAME); From patchwork Wed Nov 24 22:00:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 518119 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC895C433F5 for ; Wed, 24 Nov 2021 22:11:06 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0E4C217BB; Wed, 24 Nov 2021 23:10:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0E4C217BB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637791865; bh=yR4SWGDnOGE7JcXvzMIkyeUl/mS53sfrAoF7+FU5BDE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WIWOm3NAcAN4jsYWveBWjNEqIXa/iHQ6fkUP0ap8MCNRwPMaXQZK5puWtjM9ppmzs wLYdNK7dydW4pWix2QveIJPaTqo28MM+4gdUYwmQmwleV4Pppwg/JFbEVNqgzgjW7T z6gl4QxCx77OKG8LwkufhL92loUadCnBmal3sPcE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5BE2CF80529; Wed, 24 Nov 2021 23:06:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 87663F8051E; Wed, 24 Nov 2021 23:06:55 +0100 (CET) Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 515D0F804EC for ; Wed, 24 Nov 2021 23:06:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 515D0F804EC Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NY/QaCjl" Received: by mail-lj1-x231.google.com with SMTP id l9so8412089ljq.5 for ; Wed, 24 Nov 2021 14:06:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d38MEEq+r0QwqDvnuwxQbfydxKTbgpiZ5kKyEJPIo+w=; b=NY/QaCjlj9jgK5URhmeklHM2EVr5Cj9FkC04T9ouxfXOI/ffv1uanSeMvRRUUpTJMs yF3wA3QA85B6jL+LSwahSV1YxMRGC/ddxjdid3UBFwoYu1dTQBBy9MISi8MCWoQtD0R2 XhKUeuiNCkCqUJwp7ZTES9DZGTf9sMdq5XdL2Paao7RFxLWYE0vPhtjrqdJrQb5uyRLF MKrYEcXGOPBU3pbDKHX7SbYYIe0gnm9nlkk3/ynK5oEwnUnfzSu1YWnWmdMgQoTQ3nJR Fo4tEdZ/FlnXzLv6sNB1CoMS/iMT02Gil98b83/0Yf4RzP2/cCE6XUDezUueY2X1Idad QVjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d38MEEq+r0QwqDvnuwxQbfydxKTbgpiZ5kKyEJPIo+w=; b=jBwL4PzE7DSkAR7eP+AYzQ9TV3UGF1CDH9yNtJdTK8I+YeiXgpAkJrxz0ev1HBDJ5D ibG+/Ih2RewPaVGyI+3y7FVeIkAE3hzCU71Ao8WU++NzawXheqiIG4WvOdkhDnYepzr1 KrsnQ8Zn2WeUM5/Bf6GlHUtcrtxYOjqdE2dHxiyOVVnEJVpiwY3yyu+DPjNWpqEI+Ad0 fC1t81fKyU4//McZL1l3ix1yUGAuMazmRPeYa9PSyiPLR7qnJ+ryUBeE5l+Cp8PEBif6 yDuVhUHL1iQUCIdOLc+4/nKDHMbF+d/p2X2FUy8ZSHDcwq9+sgmX1AbdHh5OKsDpgAjE tMFw== X-Gm-Message-State: AOAM5327gGNJvMxgsoxdztc/gHqSAlhnPuCl/ZPzlSfdPztLF/4bVV23 CPbdpSpXIQXmKmA0zaKyefg= X-Google-Smtp-Source: ABdhPJxMcR5/ecEUq7nU2V2k+gv9udFcA9YjKObt98jdvy73sHqkqgxre2x8TdIo01cmYWP4KfK0OA== X-Received: by 2002:a05:651c:49b:: with SMTP id s27mr19200524ljc.404.1637791597212; Wed, 24 Nov 2021 14:06:37 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id w17sm93266ljh.15.2021.11.24.14.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 14:06:36 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v1 08/20] ASoC: tegra20: spdif: Improve driver's code Date: Thu, 25 Nov 2021 01:00:45 +0300 Message-Id: <20211124220057.15763-9-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211124220057.15763-1-digetx@gmail.com> References: <20211124220057.15763-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" - Clean up whitespaces, defines and variables. - Remove obsolete code. - Adhere to upstream coding style. - Don't override returned error code. - Replace pr_err with dev_err. No functional changes are made by this patch. This is a minor code's refactoring that will ease further maintenance of the driver. Signed-off-by: Dmitry Osipenko --- sound/soc/tegra/tegra20_spdif.c | 49 ++++++++++++--------------------- 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index 6650875d2555..9383683aa4e9 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c @@ -23,8 +23,6 @@ #include "tegra20_spdif.h" -#define DRV_NAME "tegra20-spdif" - static __maybe_unused int tegra20_spdif_runtime_suspend(struct device *dev) { struct tegra20_spdif *spdif = dev_get_drvdata(dev); @@ -49,11 +47,10 @@ static __maybe_unused int tegra20_spdif_runtime_resume(struct device *dev) } static int tegra20_spdif_hw_params(struct snd_pcm_substream *substream, - struct snd_pcm_hw_params *params, - struct snd_soc_dai *dai) + struct snd_pcm_hw_params *params, + struct snd_soc_dai *dai) { - struct device *dev = dai->dev; - struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai); + struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); unsigned int mask = 0, val = 0; int ret, spdifclock; @@ -106,7 +103,7 @@ static int tegra20_spdif_hw_params(struct snd_pcm_substream *substream, ret = clk_set_rate(spdif->clk_spdif_out, spdifclock); if (ret) { - dev_err(dev, "Can't set SPDIF clock rate: %d\n", ret); + dev_err(dai->dev, "Can't set SPDIF clock rate: %d\n", ret); return ret; } @@ -127,9 +124,9 @@ static void tegra20_spdif_stop_playback(struct tegra20_spdif *spdif) } static int tegra20_spdif_trigger(struct snd_pcm_substream *substream, int cmd, - struct snd_soc_dai *dai) + struct snd_soc_dai *dai) { - struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai); + struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); switch (cmd) { case SNDRV_PCM_TRIGGER_START: @@ -151,7 +148,7 @@ static int tegra20_spdif_trigger(struct snd_pcm_substream *substream, int cmd, static int tegra20_spdif_probe(struct snd_soc_dai *dai) { - struct tegra20_spdif *spdif = snd_soc_dai_get_drvdata(dai); + struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); dai->capture_dma_data = NULL; dai->playback_dma_data = &spdif->playback_dma_data; @@ -160,26 +157,26 @@ static int tegra20_spdif_probe(struct snd_soc_dai *dai) } static const struct snd_soc_dai_ops tegra20_spdif_dai_ops = { - .hw_params = tegra20_spdif_hw_params, - .trigger = tegra20_spdif_trigger, + .hw_params = tegra20_spdif_hw_params, + .trigger = tegra20_spdif_trigger, }; static struct snd_soc_dai_driver tegra20_spdif_dai = { - .name = DRV_NAME, + .name = "tegra20-spdif", .probe = tegra20_spdif_probe, .playback = { .stream_name = "Playback", .channels_min = 2, .channels_max = 2, .rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | - SNDRV_PCM_RATE_48000, + SNDRV_PCM_RATE_48000, .formats = SNDRV_PCM_FMTBIT_S16_LE, }, .ops = &tegra20_spdif_dai_ops, }; static const struct snd_soc_component_driver tegra20_spdif_component = { - .name = DRV_NAME, + .name = "tegra20-spdif", }; static bool tegra20_spdif_wr_rd_reg(struct device *dev, unsigned int reg) @@ -260,7 +257,7 @@ static const struct regmap_config tegra20_spdif_regmap_config = { static int tegra20_spdif_platform_probe(struct platform_device *pdev) { struct tegra20_spdif *spdif; - struct resource *mem, *dmareq; + struct resource *mem; void __iomem *regs; int ret; @@ -273,27 +270,19 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) spdif->clk_spdif_out = devm_clk_get(&pdev->dev, "spdif_out"); if (IS_ERR(spdif->clk_spdif_out)) { - pr_err("Can't retrieve spdif clock\n"); - ret = PTR_ERR(spdif->clk_spdif_out); - return ret; + dev_err(&pdev->dev, "Could not retrieve spdif clock\n"); + return PTR_ERR(spdif->clk_spdif_out); } regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(regs)) return PTR_ERR(regs); - dmareq = platform_get_resource(pdev, IORESOURCE_DMA, 0); - if (!dmareq) { - dev_err(&pdev->dev, "No DMA resource\n"); - return -ENODEV; - } - spdif->regmap = devm_regmap_init_mmio(&pdev->dev, regs, - &tegra20_spdif_regmap_config); + &tegra20_spdif_regmap_config); if (IS_ERR(spdif->regmap)) { dev_err(&pdev->dev, "regmap init failed\n"); - ret = PTR_ERR(spdif->regmap); - return ret; + return PTR_ERR(spdif->regmap); } spdif->playback_dma_data.addr = mem->start + TEGRA20_SPDIF_DATA_OUT; @@ -306,7 +295,6 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) &tegra20_spdif_dai, 1); if (ret) { dev_err(&pdev->dev, "Could not register DAI: %d\n", ret); - ret = -ENOMEM; goto err_pm_disable; } @@ -349,14 +337,13 @@ MODULE_DEVICE_TABLE(of, tegra20_spdif_of_match); static struct platform_driver tegra20_spdif_driver = { .driver = { - .name = DRV_NAME, + .name = "tegra20-spdif", .pm = &tegra20_spdif_pm_ops, .of_match_table = tegra20_spdif_of_match, }, .probe = tegra20_spdif_platform_probe, .remove = tegra20_spdif_platform_remove, }; - module_platform_driver(tegra20_spdif_driver); MODULE_AUTHOR("Stephen Warren "); From patchwork Wed Nov 24 22:00:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 518121 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC899C433EF for ; Wed, 24 Nov 2021 22:09:48 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EC6AA17E2; Wed, 24 Nov 2021 23:08:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EC6AA17E2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637791787; bh=L+wkMXZmldTuXsHQy8SCCSvRec8VY7bSCXi2lDMNsJY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mtPYUSlTPrcUIfHZjrZMXhGP03esn0SSqX0vpsbyWo4k+XoiWqWApt8D7/68vTA6N 7rKJgw+G4VgRLLYJAw+Fjx9RsALMCrESZNcza3JLTimrKU2WcTb6JoEn8VGcKILSsN tK70jI5xGmawjWvKdwc1IBvlUFPj2oM4+T0XHwKU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1B32AF8051D; Wed, 24 Nov 2021 23:06:54 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9E0E3F804FD; Wed, 24 Nov 2021 23:06:47 +0100 (CET) Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CA328F8011F for ; Wed, 24 Nov 2021 23:06:41 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CA328F8011F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nJAo4iPf" Received: by mail-lj1-x234.google.com with SMTP id u22so8382522lju.7 for ; Wed, 24 Nov 2021 14:06:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XQZdihin90lA7efVTDzu3CsDg/xeb8H7EeSD4A6ITqg=; b=nJAo4iPfwBFY1ROe3048h1ybqQlX//p3YjSX7Pe0idWjl7D5Xl7cOhLCOiOdeHEVtw i1TsPOsnewcD5UwgabPKGc1V8ufc2Zd+FJV0+A0q6BgfW74cgH0ysttiHo0JEuKO06Rf oSinD/HXvoSsQPpiGhkH5NiAnlXw69WbXOkSEmz5iXw1DnlDdAz0TEcgI6GlEiPRdKb/ o069dFlaoy5lyEDSGze4gA+OToJs1MdOl69LwnbHH6fpJD3OU8yGdMtR7rBHQx5ehabg p1FSHjplifcYroZVsJCoW1Pl7SCG52FqXEMBlrRcXhVCQLxFhlKVMSxxPb7NXXuUNqPG 2orA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XQZdihin90lA7efVTDzu3CsDg/xeb8H7EeSD4A6ITqg=; b=AMeObhn6yKuOe5xF2vz8mP8XwBXO4yMuGiSwGD4JFzqbQ2Jd8PJUms62yrpUstVMQt srO9ufjwjZQPeASUvXbxKWW+9ZIoHLFNeJkG0fDvhk+cQVaxU3C6KWzLux5wOacf1VGo NUsTRwc8veqUQrAzFTcAytNaH1F+vb6VIAPgUTgvOXrlcxCBmRDhqQ1byy24nFmKfaFT da5kwI7aXzgNugBgEBViOzWzJookc+1Nq+0qTjwpAUxocSyO8YXW2BMLRvdG7mBZS7mC Vaup74gCgbEKLcJMDs+Lo8Ni5aoV69QHApYRxnF/zJpmdQktutk/OHcGVf8g56uDF7tG i6/A== X-Gm-Message-State: AOAM530iWJ4PvRFK40evze3ZsNBJdlK+BcbeZGsIf7Ar/bl2lT+8PzvG 3b7v49bbJDhk8Ny+mM6pgZbnzbXqg0o= X-Google-Smtp-Source: ABdhPJz7K2sn4O/88yaV122GJMihQ39VL0qbxsHYUBy+2XB+hcfq/s90uDVNIgFsxMF0NuDwPmYVYw== X-Received: by 2002:a2e:b5d2:: with SMTP id g18mr19708991ljn.354.1637791599934; Wed, 24 Nov 2021 14:06:39 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id w17sm93266ljh.15.2021.11.24.14.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 14:06:39 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v1 11/20] ASoC: tegra20: spdif: Support system suspend Date: Thu, 25 Nov 2021 01:00:48 +0300 Message-Id: <20211124220057.15763-12-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211124220057.15763-1-digetx@gmail.com> References: <20211124220057.15763-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Support system suspend by enforcing runtime PM suspend/resume. Now there is no doubt that h/w is indeed stopped during suspend and that h/w state will be properly restored after resume. Signed-off-by: Dmitry Osipenko --- sound/soc/tegra/tegra20_spdif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index 8b9bac30d5cd..89f7fc5c8aad 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c @@ -345,6 +345,8 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev) static const struct dev_pm_ops tegra20_spdif_pm_ops = { SET_RUNTIME_PM_OPS(tegra20_spdif_runtime_suspend, tegra20_spdif_runtime_resume, NULL) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) }; static const struct of_device_id tegra20_spdif_of_match[] = { From patchwork Wed Nov 24 22:00:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 518122 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9D158C433F5 for ; Wed, 24 Nov 2021 22:09:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id AC4D717F5; Wed, 24 Nov 2021 23:08:24 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AC4D717F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637791754; bh=YdMWroKNp4gtmpv9BTvYCm2Zi5Q+CG8GZ4Ztzlp1794=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Jza7U1cN6WbHQMXH0ixwxtJ7Tko0HLiWEO/MXGneztczixwd6ECiK0x4BNWNnLVLt EvCw7sHO1wi9g1wGAPiZwAkC0Wb6qE+HtvTSQBU9clictsFR45gY2Uy1RnXWz1Nnsd JOy3konhMFdG+DxgYnr3G1xajlyfpsOlAY//Cg2Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 74028F80516; Wed, 24 Nov 2021 23:06:52 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 199CCF804F3; Wed, 24 Nov 2021 23:06:46 +0100 (CET) Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 57F28F804AD for ; Wed, 24 Nov 2021 23:06:42 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 57F28F804AD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YRhMLDyY" Received: by mail-lf1-x135.google.com with SMTP id c32so10998470lfv.4 for ; Wed, 24 Nov 2021 14:06:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jNvT/R4t+rzbZzB5aB94PXkUOPrierROlgYm0m2uVuc=; b=YRhMLDyY4rZ43/0hssaw5SpluNtAnn3C+1u1ZitobNEI8ekjIPlNOt0YtPtGYhXi8T SWNpQuFh8XLycEFM/l+9ef9bujp+WhboWeYtk5MewdKyPRD9a41pgCmzi6idQqbLn9u6 mm9lMyJC6Kz6uZ+evHrorQTkAYMxxC826GsyIWRyOzss4Vb/+UrDbLaaWPRCASKSK9DV iedD/9N8poWKTI2D2y9posABZzxscfb0O/MbZyVGH5ZySNGcnYJ7qr/TLn+47bSOIg9k IMXDCC3mg1jePjbdFMNCHAWvQbbBtDNUk46Yk+x1FYMWpi1CBoJK2gVcIQDP9VCqgyqf jjtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jNvT/R4t+rzbZzB5aB94PXkUOPrierROlgYm0m2uVuc=; b=QaxdBVsaJEzoT3ZuxZJQrPlm7bjGxXseQYn2qOZFQ0S1VlsQ2wt+MIkIOh6EXhQGYT OholC9nijmkP54ab7nhlTQ271bK5L14nQV+VD+0YSkqZSTbWfpQmz3SB93C0Ly2Hnp9l Wcexy/M9mqxzgnJHUmRw4wtKQHNRdBF72cqfBdvjx2n3l78E5Q9ifdXIjG5zW72Cswpu gAibJXs6HBXNp9EbGyAo/j6YEzb+57PyJPiqb1pNKItLG9AOSOYvU3THnMPai6oATzTA fejom8C3RqF2jbvTE0wZTLofXk0UJ2jrAh97dGQPZPnqT/5tpqiHO2Z0rTEHj8T3e72e swCg== X-Gm-Message-State: AOAM533Vd5uy9Ip3H3LKeowBc7Dpg+vt5ELAcamveRJZy7uz/uQmDw00 GAbI+8YOGsC9Gf629PWsYeA= X-Google-Smtp-Source: ABdhPJzOsDeVvxud++jQTrtONEupHnOumkD3Q77alNsX1DaeJIUOusKyNA09/6r6jtJiI3+HAIYHxQ== X-Received: by 2002:ac2:4bc1:: with SMTP id o1mr19043798lfq.254.1637791600702; Wed, 24 Nov 2021 14:06:40 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id w17sm93266ljh.15.2021.11.24.14.06.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 14:06:40 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v1 12/20] ASoC: tegra20: spdif: Filter out unsupported rates Date: Thu, 25 Nov 2021 01:00:49 +0300 Message-Id: <20211124220057.15763-13-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211124220057.15763-1-digetx@gmail.com> References: <20211124220057.15763-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" SPDIF and other SoC components share audio PLL on Tegra, thus only one component may set the desired base clock rate. This creates problem for HDMI audio because it uses SPDIF and audio may not work if SPDIF's clock doesn't exactly match standard audio rate since some receivers may reject audio in that case. Filter out audio rates which SPDIF output can't support, assuming that other components won't change rate at runtime. Signed-off-by: Dmitry Osipenko --- sound/soc/tegra/tegra20_spdif.c | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c index 89f7fc5c8aad..f3e3c6df232b 100644 --- a/sound/soc/tegra/tegra20_spdif.c +++ b/sound/soc/tegra/tegra20_spdif.c @@ -79,6 +79,7 @@ static int tegra20_spdif_hw_params(struct snd_pcm_substream *substream, struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); unsigned int mask = 0, val = 0; int ret, spdifclock; + long rate; mask |= TEGRA20_SPDIF_CTRL_PACK | TEGRA20_SPDIF_CTRL_BIT_MODE_MASK; @@ -133,6 +134,12 @@ static int tegra20_spdif_hw_params(struct snd_pcm_substream *substream, return ret; } + rate = clk_get_rate(spdif->clk_spdif_out); + if (rate != spdifclock) + dev_warn(dai->dev, + "SPDIF clock rate %d doesn't match requested rate %lu\n", + spdifclock, rate); + return 0; } @@ -172,6 +179,59 @@ static int tegra20_spdif_trigger(struct snd_pcm_substream *substream, int cmd, return 0; } +static int tegra20_spdif_filter_rates(struct snd_pcm_hw_params *params, + struct snd_pcm_hw_rule *rule) +{ + struct snd_interval *r = hw_param_interval(params, rule->var); + struct snd_soc_dai *dai = rule->private; + struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); + struct clk *parent = clk_get_parent(spdif->clk_spdif_out); + const unsigned int rates[] = { 32000, 44100, 48000 }; + long i, parent_rate, valid_rates = 0; + + parent_rate = clk_get_rate(parent); + if (parent_rate <= 0) { + dev_err(dai->dev, "Can't get parent clock rate: %ld\n", + parent_rate); + return parent_rate ?: -EINVAL; + } + + for (i = 0; i < ARRAY_SIZE(rates); i++) { + if (parent_rate % (rates[i] * 128) == 0) + valid_rates |= BIT(i); + } + + /* + * At least one rate must be valid, otherwise the parent clock isn't + * audio PLL. Nothing should be filtered in this case. + */ + if (!valid_rates) + valid_rates = BIT(ARRAY_SIZE(rates)) - 1; + + return snd_interval_list(r, ARRAY_SIZE(rates), rates, valid_rates); +} + +static int tegra20_spdif_startup(struct snd_pcm_substream *substream, + struct snd_soc_dai *dai) +{ + if (!device_property_read_bool(dai->dev, "nvidia,fixed-parent-rate")) + return 0; + + /* + * SPDIF and I2S share audio PLL. HDMI takes audio packets from SPDIF + * and audio may not work on some TVs if clock rate isn't precise. + * + * PLL rate is controlled by I2S side. Filter out audio rates that + * don't match PLL rate at the start of stream to allow both SPDIF + * and I2S work simultaneously, assuming that PLL rate won't be + * changed later on. + */ + return snd_pcm_hw_rule_add(substream->runtime, 0, + SNDRV_PCM_HW_PARAM_RATE, + tegra20_spdif_filter_rates, dai, + SNDRV_PCM_HW_PARAM_RATE, -1); +} + static int tegra20_spdif_probe(struct snd_soc_dai *dai) { struct tegra20_spdif *spdif = dev_get_drvdata(dai->dev); @@ -185,6 +245,7 @@ static int tegra20_spdif_probe(struct snd_soc_dai *dai) static const struct snd_soc_dai_ops tegra20_spdif_dai_ops = { .hw_params = tegra20_spdif_hw_params, .trigger = tegra20_spdif_trigger, + .startup = tegra20_spdif_startup, }; static struct snd_soc_dai_driver tegra20_spdif_dai = { From patchwork Wed Nov 24 22:00:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 518118 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63F1FC433F5 for ; Wed, 24 Nov 2021 22:11:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9354F1816; Wed, 24 Nov 2021 23:10:57 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9354F1816 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637791907; bh=taRbsqCzWB1a5KkmqBumvGryO0mM6cypNDIK6Sc4BAI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cAKdeiTuek8FqiEDQqOB6fsTdbFnfhdcn5HiWmZJpcEwun1VkR8sn0AFveRLqmZBT 56GLWX458EdhTs2LYWaUgFYBEbHEq0GWDkkQGywVxv0ZcV/dJ6lXtSvBwu+OdVzkQQ v0dm3+yQdlrSuthSon50xnd4b1AJdpn4W/6hP8w8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9A83BF80539; Wed, 24 Nov 2021 23:07:02 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D89FFF80528; Wed, 24 Nov 2021 23:06:57 +0100 (CET) Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 85D1CF804FB for ; Wed, 24 Nov 2021 23:06:43 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 85D1CF804FB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="pnA9n1gQ" Received: by mail-lj1-x236.google.com with SMTP id k2so8427407lji.4 for ; Wed, 24 Nov 2021 14:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=J2ouOYArYTiGPyKjaLg9beinXsL+bwxgMLfVEklW094=; b=pnA9n1gQI9hSs1rmixoW7n5S4z1lJAqgp8X3BpEZd0LjaqU/dT4zRL+OeE1rKtZnld JSUusimIa2AFyh4JlQli+Xs+yoCMqmQ8hb5g6H+Xp49/SC5PeD+LtR1yxtbWd14vINrq HiXBjF2ftObNSwKUv4XOat9OhGeQ6MFh3o6QEWirQ2F+DxQ0AAV0F/mYglkPO26fTyal tVEUyMMz3VcQgMR4RYk73Xmr6a8o3oDUTIvCD8/9dfxXIx63hJnGm+CO5Mr79/lyj9y7 EljVST/+J8ctzhW6fdnTHCUC7LG2sa6htuHwscJZDvcAh6KrONesooQyPKX9Jq8VLf5r GkEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=J2ouOYArYTiGPyKjaLg9beinXsL+bwxgMLfVEklW094=; b=Qio2rdhNXVY3FHce7vLinAeSMFKY5SfFB8jr8JI3aTVQj1hQmdW4yo1kg8GNmTL9E6 0gZHxpPiB+e09UnTf/aV/jjs7MwW1tcAyIUqNVHo9CWdiDcGPye3Q01m8Qa+OfPag4tg W4P/uotrsfFvDhrIeZpjKMV7na8cYdemouxqv1CQV2WTEcaEx1ea0+XQ0FPGPxTwvYu8 5lOKq4FGA1gm5n4eX8EvBk0oWE7aF0micI6IKR9DpbarD5IuKP9CHSQd9BUUxiOgyO3I mkxtjYNee+e3ywwUXZOpwSLbwqqvJc3TpDu6ra3zymRFGyM4vL1gTGmZYtvNsLpzQK+D FjGQ== X-Gm-Message-State: AOAM532MWRgv8AX4ZeZ0Dty4gPoxppUgKxd1oRXITYG16zPwbZg8U96r rqXWpaytE0oOPRLlXq3jS+k76KgB1LU= X-Google-Smtp-Source: ABdhPJwJSd+Si40B6GfMYdhTeNYiyWm8DOVcAAxmkWLOpTKPR07lt7OcXz3u27yqFTmPOsd95JEF4A== X-Received: by 2002:a05:651c:2119:: with SMTP id a25mr19932045ljq.131.1637791602196; Wed, 24 Nov 2021 14:06:42 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id w17sm93266ljh.15.2021.11.24.14.06.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 14:06:41 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v1 14/20] drm/tegra: hdmi: Unwind tegra_hdmi_init() errors Date: Thu, 25 Nov 2021 01:00:51 +0300 Message-Id: <20211124220057.15763-15-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211124220057.15763-1-digetx@gmail.com> References: <20211124220057.15763-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Add missing error unwinding to tegra_hdmi_init(), for consistency. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/hdmi.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c index 9a87d351a828..142ad696426f 100644 --- a/drivers/gpu/drm/tegra/hdmi.c +++ b/drivers/gpu/drm/tegra/hdmi.c @@ -1456,22 +1456,31 @@ static int tegra_hdmi_init(struct host1x_client *client) if (err < 0) { dev_err(client->dev, "failed to enable HDMI regulator: %d\n", err); - return err; + goto output_exit; } err = regulator_enable(hdmi->pll); if (err < 0) { dev_err(hdmi->dev, "failed to enable PLL regulator: %d\n", err); - return err; + goto disable_hdmi; } err = regulator_enable(hdmi->vdd); if (err < 0) { dev_err(hdmi->dev, "failed to enable VDD regulator: %d\n", err); - return err; + goto disable_pll; } return 0; + +disable_pll: + regulator_disable(hdmi->pll); +disable_hdmi: + regulator_disable(hdmi->hdmi); +output_exit: + tegra_output_exit(&hdmi->output); + + return err; } static int tegra_hdmi_exit(struct host1x_client *client) From patchwork Wed Nov 24 22:00:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 518117 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 864B7C433EF for ; Wed, 24 Nov 2021 22:12:24 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9CEEF1843; Wed, 24 Nov 2021 23:11:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9CEEF1843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637791942; bh=9EcX4jOmIU+43AMkKdabHqLJOG2xOBvSPljvX6kGj/Y=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=j38O+p3UNWwe394RVSTFpUPK7A2dlOBVrPDeU87Y1GkYALnTa+WNNqt25djSVG74Q Bim68mZlib/96fhyhX/8GAAqu5f3vlhTrxiVfIHZIWzVIoqKT/HP2WTx1oPYHj/yFt LptuhnG1sqEPpT18fDIoqTruTItQqDQXEVV1jzzE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 05139F8053D; Wed, 24 Nov 2021 23:07:08 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B3571F8053A; Wed, 24 Nov 2021 23:07:01 +0100 (CET) Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 92D20F8011F for ; Wed, 24 Nov 2021 23:06:45 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 92D20F8011F Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qgeNkG/Y" Received: by mail-lf1-x136.google.com with SMTP id bi37so10958769lfb.5 for ; Wed, 24 Nov 2021 14:06:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0mQGburGzaVO6t6m0C9ToG0s590roHzjwKj9a/U1hq8=; b=qgeNkG/YSpN04SgTwmxGtE9fxwMvHmG1tLMQxOvQoP90z2gq9ZepTslJVcIW7s8kEQ 7zhRy11AKHS8DuzXcprd6y1Qj+W6enzLNeFDEsxy366wgx4goUnG9xLOFA7Av10rUrwU p0uxzVIavAr0Sc9Pl0vgE5LfMh+sNZG3MQScL89cLobW6QbuVG7V9li1hH5nPso2/xb9 O4Qa4e90RWIkqWgHgymHXL4eHB+OwBYGdA7mLxG7grHf0UwLrPIkY/JXndONIHbM9geU zdWAKYgHScyHnzGS3P86PxAd6oXgSPe5h8ktUVEgm0xBqL/rG7pefq3pj36n1EqntV6M v+fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0mQGburGzaVO6t6m0C9ToG0s590roHzjwKj9a/U1hq8=; b=LK3mmGIcD/82hmoc6rV6g8C8g3pRzdos8ZP6Yi9/G81cAtoIgWyYV5bcDP53AZEQll NOCgOOEslfTWcj23Rw5+mgRCerq0TofT3MzwXGGGvKFjuVJmMZ7C+SnpOgX7ZRlFqlkY ByQAueZEmx/M11cDN/LWjLbiAzRj0VWD4fN6qAVtkA03LKsSgA+ZyDjAucTox3FDVBio T830wFp2lpRMuxeWEBAdChDeRfoHrTNOvBIu3wPHYuwwSXR2hqb+iEmytVBtrj4DFtK7 pm/9wwvhk5jwj1g5H3yxz6c3993jOVlgAeccrveNL7rhsadj8FLtLB58AtMkj2X6WGh2 Gigw== X-Gm-Message-State: AOAM532wa0p+NzbOAkZZJ0CEriLbC7xUfjBtwAK/5Xagk2AgCd4LG2+5 ITDV2Npqe52WJdXd4D2w7OI= X-Google-Smtp-Source: ABdhPJw5VhxwaZFlstkQ6hcX5lmByTMobxw76HSVCCUXmrUW+Z7gg08zBntVYZdk9l/Xjm2zSheOyQ== X-Received: by 2002:a05:6512:3d1d:: with SMTP id d29mr19171889lfv.685.1637791603722; Wed, 24 Nov 2021 14:06:43 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id w17sm93266ljh.15.2021.11.24.14.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 14:06:43 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v1 16/20] ARM: tegra_defconfig: Enable S/PDIF driver Date: Thu, 25 Nov 2021 01:00:53 +0300 Message-Id: <20211124220057.15763-17-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211124220057.15763-1-digetx@gmail.com> References: <20211124220057.15763-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Enable Tegra20 S/PDIF driver. It's a part of HDMI audio subsystem on Tegra. Signed-off-by: Dmitry Osipenko --- arch/arm/configs/tegra_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/tegra_defconfig b/arch/arm/configs/tegra_defconfig index 817b39190d54..1b8f8fdbedc5 100644 --- a/arch/arm/configs/tegra_defconfig +++ b/arch/arm/configs/tegra_defconfig @@ -235,6 +235,7 @@ CONFIG_SND_HDA_CODEC_HDMI=y CONFIG_SND_SOC=y CONFIG_SND_SOC_TEGRA=y CONFIG_SND_SOC_TEGRA20_I2S=y +CONFIG_SND_SOC_TEGRA20_SPDIF=y CONFIG_SND_SOC_TEGRA30_I2S=y CONFIG_SND_SOC_TEGRA_RT5640=y CONFIG_SND_SOC_TEGRA_WM8753=y From patchwork Wed Nov 24 22:00:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 518116 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92057C433EF for ; Wed, 24 Nov 2021 22:13:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C75F31816; Wed, 24 Nov 2021 23:12:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C75F31816 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1637791997; bh=2uXCgcmnLPw/UxUc6tU22WhvW6eiURJr8LMnJ4vK018=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OvW44OJozjGbh8rYR0GuaX2QRA+lXGLEDGyf/Y083rq6Ta4NBxFYlXws22gzS5mhS h1qMM5x3xm2oE/wgyz1GVjTAxBrvZ5CvaBlc6zcdvuHha84/Vs/+Z7h4U/TlXazscV qDC945Ym/ZtOHB2ngy7mjHFIXMkqu1XmKicumYOw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B25F8F80568; Wed, 24 Nov 2021 23:07:10 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 92D42F80543; Wed, 24 Nov 2021 23:07:06 +0100 (CET) Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E467FF80510 for ; Wed, 24 Nov 2021 23:06:46 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E467FF80510 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AzhidqPU" Received: by mail-lj1-x22e.google.com with SMTP id l9so8412666ljq.5 for ; Wed, 24 Nov 2021 14:06:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=n2CS486VK3pErXweLhn8rqAyzxInSDaJTqOjIWkbv/Q=; b=AzhidqPUkoUns8QOS62dAH1aAyY6x8WzVSMaCWSMW/v7EjfiKy6xrqhiqXmtxhUCmC /2G7YwfhBCmAhfarvaBJPMX6gaEcOnjUiG+Q+tOfpv7zbn0bRKLu+xWhqlyEz3y9hlU3 oNRBMFHqkO74xCuNB5bRP5swXj65BF2de/4RtXs86ACsZT4NJiyw0ioVlhTr5kow+TM4 S76hg0ZNS780AvAd1wHLb00xgPLbneEOhx7vragCXrctYxh4jYNgnW4qHXpytxHBeGrA B08iJ56WOCm7lFe5CwvMgy9Jg+21GDCxsdSkFq0eohdxR7psifo27PBS1xxiUThkk1In EhPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=n2CS486VK3pErXweLhn8rqAyzxInSDaJTqOjIWkbv/Q=; b=U90gLaGSotG6I7vA0Czj4MlMBy4NTL5eintrm7b/YZ4v8M0pk8W2GXlCLjCMiL7xky 6ATTazUhVSkW5lffQ6AmgKPxyrYCb4fU8qewX9JQ/niHnN7wbMdBVLjrFwZiKDkHA5TB Rbi+Uz+x1NjpthaWBcrjPMefleideBJORSao9oa03TDoVVZGJYXd3z7t2SVkMZPzgozE W+e/YkU6C58LOHNPuJOyu22iYbmnbm4B4BZBf31lpYeej6Kn3mVuc+qOn+Cnq7w+B5M0 e+Op+NokADYE4DEKwFEZrFXuuPfj9hGWqyAp8q/Vaa0txX/YW1ya6+lBfHyfc4bq65+m 1vQg== X-Gm-Message-State: AOAM531yN9OB+VsdI+zWySMvjXfOMhBZGy1pIPv+o3ZNaY1ILm8QtDgP TNzwbopCAv2UB7mePdsw0nw= X-Google-Smtp-Source: ABdhPJwRHr0nxYuROaGQUAZSqmgr+yRP+LZJ4IR9xN3LqBlcWJvx+zvAwwT+8xfj2BU3q2YKedVOLw== X-Received: by 2002:a2e:94d7:: with SMTP id r23mr19197418ljh.224.1637791605366; Wed, 24 Nov 2021 14:06:45 -0800 (PST) Received: from localhost.localdomain (94-29-48-99.dynamic.spd-mgts.ru. [94.29.48.99]) by smtp.gmail.com with ESMTPSA id w17sm93266ljh.15.2021.11.24.14.06.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 14:06:45 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Mark Brown , Takashi Iwai , Jaroslav Kysela , Liam Girdwood , Agneli , Rob Herring Subject: [PATCH v1 18/20] ARM: tegra: Add HDMI audio graph to Tegra20 device-tree Date: Thu, 25 Nov 2021 01:00:55 +0300 Message-Id: <20211124220057.15763-19-digetx@gmail.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211124220057.15763-1-digetx@gmail.com> References: <20211124220057.15763-1-digetx@gmail.com> MIME-Version: 1.0 Cc: linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Arnd Bergmann X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Add HDMI audio graph to Tegra20 device-tree to enable HDMI audio on Tegra20 devices. Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra20.dtsi | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi index 799da7dc929b..a2cdc591b4be 100644 --- a/arch/arm/boot/dts/tegra20.dtsi +++ b/arch/arm/boot/dts/tegra20.dtsi @@ -186,7 +186,7 @@ rgb { }; }; - hdmi@54280000 { + tegra_hdmi: hdmi@54280000 { compatible = "nvidia,tegra20-hdmi"; reg = <0x54280000 0x00040000>; interrupts = ; @@ -1063,4 +1063,24 @@ pmu { interrupt-affinity = <&{/cpus/cpu@0}>, <&{/cpus/cpu@1}>; }; + + sound-hdmi { + compatible = "simple-audio-card"; + simple-audio-card,name = "NVIDIA Tegra20 HDMI"; + + #address-cells = <1>; + #size-cells = <0>; + + simple-audio-card,dai-link@0 { + reg = <0>; + + cpu { + sound-dai = <&tegra_spdif>; + }; + + codec { + sound-dai = <&tegra_hdmi>; + }; + }; + }; };