Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp736663img; Thu, 21 Mar 2019 07:56:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMa/YEvqO8izZSss4NWolRxVN30KNhIEl2GRNFakLb3zK9MHl4jrpA7sRZiLe9HLmMMbLC X-Received: by 2002:a17:902:b404:: with SMTP id x4mr4044978plr.232.1553180214122; Thu, 21 Mar 2019 07:56:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553180214; cv=none; d=google.com; s=arc-20160816; b=EG6MdhwCSfAMKNGDr8BVK+6+29y+h+NtKGdcXuH6iqfq9HvWNW3Kupb8xnBrAHjZ1H VzfPXS9QHjHHzY9vbVsKESdRIa8JCdHw3URLAFz2+ZjZ9OCcwNZGSU20DAl0ZSxRcKv+ XrpayJ0OUcnWTRxQqD+QV6i5MnX0BAMxQ9fmZH1f9S9IFb7Wd1Y9IepP47eJ1eyyVAIn zP2Va7kguGrQ9iEuTedk4toFJwEo79wEKgrzhaUh/SREdU2L3LKh0IcJ4M0ZXK4mpxBw nyFKpdD2+O7FAYUQU0JL6V1uk+Mn2uNdmxIciNrf6guLbvH7WFIPI+gox5RyjKMFi5ve B9qw== 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=ngfuxoP4dxR6U8seDBKx9mjBlrSQzSs1VhrJWsNr0bg=; b=oDwU551DVtPMHjpWU+NNn4/4KT3u1ecX2MrIWWxheeBrozuRk1c0SVKFP1eU+K8f2b 3Qz1S1EJjwx2EVhWHTVNx8x/J7RX9FdcF8QDuZpRTvQcejxik8O1f0AYm7qBC+S1vB3T o6/uLhfk7ayrU+nfK89tcOFHFZ5YKNkHJ2Eq+ayqK7OBWEj/xhCbSgTY8+aBTOmYueX9 j4rd0M/rOlhgj8D/MP/5rwws/SJP+cwiFTJyT/d1sgJiPmVW75+T/15L1eIPqF+qKKhs SVI0+KpdMxGzRW8yUBDxdwY3380CqfwlZdHnNwIxu+vX4dNV6IrGlzCyBmIJoJOkkEqG YBzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2si4477949plr.179.2019.03.21.07.56.35; Thu, 21 Mar 2019 07:56:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728271AbfCUOyL (ORCPT + 99 others); Thu, 21 Mar 2019 10:54:11 -0400 Received: from www1102.sakura.ne.jp ([219.94.129.142]:29966 "EHLO www1102.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727857AbfCUOyK (ORCPT ); Thu, 21 Mar 2019 10:54:10 -0400 Received: from fsav403.sakura.ne.jp (fsav403.sakura.ne.jp [133.242.250.102]) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id x2LErrIp085086; Thu, 21 Mar 2019 23:53:53 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Received: from www1102.sakura.ne.jp (219.94.129.142) by fsav403.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav403.sakura.ne.jp); Thu, 21 Mar 2019 23:53:52 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav403.sakura.ne.jp) Received: from [192.168.1.2] (118.153.231.153.ap.dti.ne.jp [153.231.153.118]) (authenticated bits=0) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id x2LErql3085080 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NO); Thu, 21 Mar 2019 23:53:52 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Subject: Re: [PATCH v3 2/2] arm64: dts: rockchip: add HDMI sound node for rk3328-rock64 To: Jonas Karlman , Heiko Stuebner , "linux-rockchip@lists.infradead.org" Cc: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" References: <20190217173407.29189-1-katsuhiro@katsuster.net> <20190217173407.29189-2-katsuhiro@katsuster.net> From: Katsuhiro Suzuki Message-ID: <77fb7f45-e44a-3cba-f135-6731ac76fb00@katsuster.net> Date: Thu, 21 Mar 2019 23:53:52 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Jonas, Thank you for reply. On 2019/03/17 21:33, Jonas Karlman wrote: > Hello Katsuhiro, > > Sorry for the delay, I have not been able to fully test this yet but will do more testing later tonight. > > My concern are regarding how to configure a single graph card node to add a hdmi: (and iec958: for spdif) variants using an alsa config file. > In LibreELEC I expose HDMI and SPDIF as two different card nodes to simplify applying alsa config files, see [1] and [2] for the alsa config files I use. > Do you know how I can configure the hdmi: and iec958: cards and add a "IEC958 Playback" ctl with the combined graph card node? > Currently I don't know how to and I don't have test environment for IEC958 sound. Sorry... > I am also working on NL-PCM/HBR-audio support for dw-hdmi-i2s and it will require "IEC958 Playback" ctl and players such as kodi and mpv only sets AES0-3 for hdmi: and iec958: cards. > > [1] https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Rockchip/filesystem/usr/share/alsa/cards/HDMI.conf > [2] https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/Rockchip/filesystem/usr/share/alsa/cards/SPDIF.conf > Ah, I don't consider about Non-LPCM sound. I understand your concern. My patch should be keeping until this problem is solved. I'm going to find test environment and try KODI or mpv. Thank you for great information! Best Regards, Katsuhiro Suzuki > Regards, > Jonas > > On 2019-03-17 10:54, Katsuhiro Suzuki wrote: >> Hello Jonas, >> >> How about this topic? >> >> I think this patch does not have bad effect for multi channel >> sound of HDMI. If you don't think so, please tell me. >> I wait your sound patch and after re-check this patch. >> >> Best Regards, >> Katsuhiro Suzuki >> >> On 2019/03/03 4:26, Katsuhiro Suzuki wrote: >>> Hello Jonas, >>> >>> Thanks for your comments. >>> >>> On 2019/03/03 2:20, Jonas Karlman wrote: >>>> On 2019-03-02 15:19, Katsuhiro Suzuki wrote: >>>>> Ping... >>>>> >>>>> On 2019/02/18 2:34, Katsuhiro Suzuki wrote: >>>>>> This patch adds HDMI sound (I2S0) node for rock64. >>>>>> >>>>>> After apply this patch, 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. Currently total 7 sources has been >>>>>> activated as follows: >>>>>> >>>>>> | Req number | Source | Required  | >>>>>> |            |        | channels  | >>>>>> |------------+--------+-----------| >>>>>> | 14, 15     | I2S1   | 2ch       | >>>>>> |  6,  7     | UART2  | 2ch       | >>>>>> |     10     | SPDIF  | 1ch       | >>>>>> |  8,  9     | SPI0   | 2ch       | >>>>>> |------------+--------+-----------| >>>>>> |            | Total  | 7ch       | >>>>>> >>>>>> HDMI audio needs to activate new source I2S0 (Req number 11 and 12). >>>>>> I2S0 can work concurrently with other sources, but rk3328 DMAC can >>>>>> use max 8 channels at same time. If I2S0 is simply activated by this >>>>>> patch, required DMAC channels will be 9. So last one (UART2) cannot >>>>>> allocate the DMA resources. >>>>>> >>>>>> Virt-dma mechanism for pl0330 DMAC driver is needed to fix this >>>>>> problem. >>>>>> >>>>>> Signed-off-by: Katsuhiro Suzuki >>>>>> --- >>>>>>    .../arm64/boot/dts/rockchip/rk3328-rock64.dts | 21 >>>>>> ++++++++++++++++++- >>>>>>    1 file changed, 20 insertions(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts >>>>>> b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts >>>>>> index 2157a528276b..bfc0930d245c 100644 >>>>>> --- a/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts >>>>>> +++ b/arch/arm64/boot/dts/rockchip/rk3328-rock64.dts >>>>>> @@ -68,7 +68,8 @@ >>>>>>        sound { >>>>>>            compatible = "audio-graph-card"; >>>>>>            label = "rockchip,rk3328"; >>>>>> -        dais = <&i2s1_p0 >>>>>> +        dais = <&i2s0_p0 >>>>>> +            &i2s1_p0 >>>>>>                &spdif_p0>; >>>> I am working on multi-channel hdmi audio support for dw-hdmi at [1] >>>> and are wondering if having multiple dais on one graph card >>>> instead of a separate hdmi sound card will affect the ability to >>>> define a proper alsa config for multi channel hdmi sound. >>>> >>>> [1] >>>> https://github.com/Kwiboo/linux-rockchip/compare/8874c206d613dc575f5cb6e385e7a866020138d0...92b20eaa6b6dd2cf3418a428f905d10bbc62724f >>>> >>>> >>> It seems a part of multi channel (5.1 ch) has already been supported >>> by rockchip-i2s and dw-hdmi. So I applied this patch and tried below >>> command. >>>   speaker-test -D hw:0,0 -f 48000 -c 6 >>> It does not return errors. >>> >>> Would you tell me more details you worried about if something wrong? >>> >>> >>> FYI: Rock64 PCM devices are as follows after applied this patch. >>> ~~~~~ >>> $ cat /proc/asound/pcm >>> 00-00: ff000000.i2s-i2s-hifi i2s-hifi-0 :  : playback 1 >>> 00-01: ff010000.i2s-rk3328-hifi ff410000.codec-1 :  : playback 1 : >>> capture 1 >>> 00-02: ff030000.spdif-dit-hifi dit-hifi-2 :  : playback 1 >>> ~~~~~ >>> >>> Best Regards, >>> Katsuhiro Suzuki >>> >>> >>>> Regards, >>>> Jonas >>>> >>>>>>        }; >>>>>> @@ -141,6 +142,12 @@ >>>>>>    &hdmi { >>>>>>        status = "okay"; >>>>>> + >>>>>> +    port@0 { >>>>>> +        hdmi_p0_0: endpoint { >>>>>> +            remote-endpoint = <&i2s0_p0_0>; >>>>>> +        }; >>>>>> +    }; >>>>>>    }; >>>>>>    &hdmiphy { >>>>>> @@ -256,6 +263,18 @@ >>>>>>        }; >>>>>>    }; >>>>>> +&i2s0 { >>>>>> +    status = "okay"; >>>>>> + >>>>>> +    i2s0_p0: port { >>>>>> +        i2s0_p0_0: endpoint { >>>>>> +            dai-format = "i2s"; >>>>>> +            mclk-fs = <256>; >>>>>> +            remote-endpoint = <&hdmi_p0_0>; >>>>>> +        }; >>>>>> +    }; >>>>>> +}; >>>>>> + >>>>>>    &i2s1 { >>>>>>        status = "okay"; >>>>>> >>>>> _______________________________________________ >>>>> Linux-rockchip mailing list >>>>> Linux-rockchip@lists.infradead.org >>>>> http://lists.infradead.org/mailman/listinfo/linux-rockchip >>>>> >>>> >>>> >>> > > >