Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp657901pxk; Sun, 30 Aug 2020 18:30:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmz6rRi1P4L+C1NZzqrT+UQ/xBWqXO2e0cxNAKA6+Xlp7/r0pyqT/5TRKDcpgZrJheMlFO X-Received: by 2002:a17:906:11d2:: with SMTP id o18mr732598eja.420.1598837412688; Sun, 30 Aug 2020 18:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598837412; cv=none; d=google.com; s=arc-20160816; b=GXzxxHIIJBgF7+8u1FYbCJckRAvRfwhb67sPqdJauDp+cO+Gyfi6gkNLz4e2vsHdxo L5RZj+saSa0vnbDRpVPV8RopaoB77nJjWmPf4Bn5dUk3iMsPnl5fePTAlw/mYETXc+IM PNtBzXQF6r4swKGaR6K1ZCsjkzKfPkXtrrBwqohepdEkEndgRlRH6gyQkzFKhkxTkXaP zgAEaOmNCXj8bAMQmDMo7WOatRHZcBOxcX3DKTB5x+hPMou8HF/URoPKEB9cvhx8iFT3 53ekDtRfIq9DwmyF/8Qk93dG+TJmMy+EBN7bUN7W6dAF3xKyl9yQQCBjNbrLKlz0z3vM +H4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Crp+ELfiAIocMGVCCy3a1yYInCW+BJCkHmEHHX2qc3A=; b=QFpxDcSz6hp+LSVihtjMHfBKg4H5O6iYQozyfAvczlk7E4Y4GfffbH58BtHV786Oex qxbLZox6mwKxKoJ1IkDjWfVtdX6ood7o5zaPhWU12jXOTbGT3S1j9BGUhx4O7pvkZdwF ngXqNYXRbZMyAdRzpqt4r3eWCA/y/VtWmp+K1GqS4vXvkRb5oNaHL+7mh5/KNwEIuH7Q k2iBfJKdX4b1+Lib1gTNUZ2i85HUCyOqf9RtTkJNosYA/FXVi1aKsIvpTQkJeWuTiaI/ BUbOMQXS82dGJg9Kn5S6dgxYqXFieJIyQY/eTZmpeeV5iriVHLC6GRCQFxiXzAICpIOm 9d1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g22si3523138edv.267.2020.08.30.18.29.50; Sun, 30 Aug 2020 18:30:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726960AbgHaB0p (ORCPT + 99 others); Sun, 30 Aug 2020 21:26:45 -0400 Received: from www1102.sakura.ne.jp ([219.94.129.142]:19864 "EHLO www1102.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726454AbgHaB0n (ORCPT ); Sun, 30 Aug 2020 21:26:43 -0400 Received: from fsav105.sakura.ne.jp (fsav105.sakura.ne.jp [27.133.134.232]) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 07V1QYMQ016064; Mon, 31 Aug 2020 10:26:34 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Received: from www1102.sakura.ne.jp (219.94.129.142) by fsav105.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav105.sakura.ne.jp); Mon, 31 Aug 2020 10:26:34 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav105.sakura.ne.jp) Received: from [192.168.1.2] (80.57.232.153.ap.dti.ne.jp [153.232.57.80]) (authenticated bits=0) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 07V1QYSl016061 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 31 Aug 2020 10:26:34 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Subject: Re: [PATCH v2] arm64: dts: rockchip: enable HDMI sound nodes for rk3328-rock64 To: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20200802154231.2639186-1-katsuhiro@katsuster.net> <7880329.2VsnZ9RgxX@phil> From: Katsuhiro Suzuki Message-ID: <0e1c3467-0ba0-6b82-4227-40959f0c4b0e@katsuster.net> Date: Mon, 31 Aug 2020 10:26:34 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <7880329.2VsnZ9RgxX@phil> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/08/31 4:16, Heiko Stuebner wrote: > Hi, > > Am Sonntag, 2. August 2020, 17:42:31 CEST schrieb Katsuhiro Suzuki: >> This patch enables HDMI sound (I2S0) and Analog sound (I2S1) which >> are defined in rk3328.dtsi, and replace SPDIF nodes. >> >> We can use SPDIF pass-through with suitable ALSA settings and on >> mpv or other media players. >> - Settings: https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Rockchip/filesystem/usr/share/alsa/cards/SPDIF.conf >> - Ex.: mpv foo.ac3 --audio-spdif=ac3 --audio-device='alsa/SPDIF.pcm.iec958.0:SPDIF' >> >> [Why use simple-audio-card for SPDIF?] >> >> For newly adding nodes, ASoC guys recommend to use audio-graph-card. >> But all other sound nodes for rk3328 have already been defined by >> simple-audio-card. In this time, I chose for consistent sound nodes. >> >> [DMA allocation problem] >> >> After this patch is applied, UART2 will fail to allocate DMA resources >> but UART driver can work fine without DMA. >> >> This error is related to the DMAC of rk3328 (pl330 or compatible). >> DMAC connected to 16 DMA sources. Each sources have ID number that is >> called 'Req number' in rk3328 TRM. After this patch is applied total 7 >> of DMA sources will be activated as follows: >> >> | Req number | Source | Required | >> | | | channels | >> |------------+--------+-----------| >> | 8, 9 | SPI0 | 2ch | >> | 11, 12 | I2S0 | 2ch | >> | 14, 15 | I2S1 | 2ch | >> | 10 | SPDIF | 1ch | >> |------------+--------+-----------| >> | | Total | 7ch | >> |------------+--------+-----------| >> | 6, 7 | UART2 | 2ch | -> cannot get DMA channels >> >> Due to rk3328 DMAC specification we can use max 8 channels at same >> time. If SPI0/I2S0/I2S1/SPDIF will be activated by this patch, >> required DMAC channels reach to 7. So the last two channels (for >> UART2) cannot get DMA resources. > > Wouldn't the dma allocation depend on the probe ordering? > Or is this predetermined, so that always uart2 looses its dmas? > Ah, it's depends on probe ordering when users use kernel modules... It's better to disable DMA channels for UART2 for avoiding problem. I'll fix and resend patch. > Heiko > > > Best Regards, Katsuhiro Suzuki