Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp5788256ybx; Sun, 10 Nov 2019 21:41:50 -0800 (PST) X-Google-Smtp-Source: APXvYqwWXNK9niHMzZ+vksC0WQcvicy7cJoMZBOfmosuFtOJyQlMDPd9DImMN0cYvthqXmqj+P8w X-Received: by 2002:a17:907:20f3:: with SMTP id rh19mr20759832ejb.289.1573450910281; Sun, 10 Nov 2019 21:41:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573450910; cv=none; d=google.com; s=arc-20160816; b=jdzn1Fn3TQ+3fdg8rHYwSrQWQEYhgNFkbNkZFst15bhoXVoM9IBXMGKf/D+oVRc15I y6gq3pXMcSLMKOHjevXEZ4+vBk+rF/fYMm8VhyRczy+0brLE7NWjb2pVz1rYFfcJPuCB e+M55stumy1zROneHyM1G3YufQYTvZOmxKBQpR8Ns0l0s7m3j1caUdWLllKlbRI9jA4d cVMef2UzIk1qKTH+NfzdmeqrY8MFSSiowrZGtcucNOuxsAH5DdDKRkCce59QLD7yzVVc /lizVzVnXDYJGHaREtuh9+1UHPI+Pm3FQ5kVOYCFV13e5UqYNFv4fdllm8jYJsPClLu8 AoKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=nVwFZyTl4L89MVBNPAIqT2vmnSRb6oAzSJCvN3fuve0=; b=IdLuHcI03YzwfBHKO23vK+W6AlEVpWSLyljEIOlipNu4DrEjZ/6xM7YlbB8iMOmdPd TEoGYL/gQyZBJAGTcDEp/2BrpUXBqLVbFEIFPg5m9PfmMgkTmWyHciCP1RvPKuH2q4J+ MLrnCjFXeOO0evt/m51j0x0iCmqmko0/dV0bfquB40X1bYgdtNRY66DTNPpdjVbgynpR OmlkflpnJgIjJzdGBzg1nWvd+rDpn+VMVL8EXdFNMiuM4Tjw4hZMPovwRGqYCWq/gS3m mFtACLxrErV+Y1tgLF4SfD1b1YNeX2NKtFfHTyJDs4LgEHWSWbfUcVtowP/SXxYO09/y Mo9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TYTrFhSj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si12266136edv.82.2019.11.10.21.41.13; Sun, 10 Nov 2019 21:41:50 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TYTrFhSj; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726770AbfKKFko (ORCPT + 99 others); Mon, 11 Nov 2019 00:40:44 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37164 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbfKKFkn (ORCPT ); Mon, 11 Nov 2019 00:40:43 -0500 Received: by mail-ot1-f66.google.com with SMTP id d5so10303281otp.4 for ; Sun, 10 Nov 2019 21:40:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nVwFZyTl4L89MVBNPAIqT2vmnSRb6oAzSJCvN3fuve0=; b=TYTrFhSj/cE7Nr6k0Oiknm3dZMLZzK7o3cd9uY9MlNvvJKHXXyNZPxBgABopOcSxjI 0sl8gVlSKDFTXOFItZh+JWTFlPknTo9VHQnCJOA1Ob/fRr6x1WiJXh+pUdbWsHg+kON/ +x4ONLQ6H7fLXgQuYWLOA/J89lC2/VZHZviSTIQNCWi5avGnR4vVOzGdyyUEgz6ZHXFc 3Z24MT8MSOft64JrYeTSfr5nyrewKDRFteYF+5RSs3y7Va+4Y4yrGqmSlZo51+wf3PLC FzhvXy1Io8AbUouk4PkZoOBAGJpIeAi0rMh3HjQkV+3Qn9CPcV0HJDBwrof2rJnyY26U OtNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nVwFZyTl4L89MVBNPAIqT2vmnSRb6oAzSJCvN3fuve0=; b=nIto/dG0f1F9KoUXcjc1QwiPHwheKwvYgXoo4VUKbdDNpY0MXO3mjgO7dotw/7yxOO P4uW0LMIxXk9+ApIBp9w/LWD9UAddiUIvdGiRBFbY05WKgYsssHV2mjUsljIISH7ACSi 4ke7lKqhOck9chAuLih0rKGIjEiIrPow193LsXXMHSr73MkpC5RiuMHxavGQavLuVDM5 Vio0Zrh4pIorGP5juKsbkDjxccT+qnTPeVpcU1jBnGmhS6S4u8SP9cKL0Wy+9tqeJT80 bi5Hewmje0fa1zinOTMxxSJLUwP6H9aFtTdQBf530N6902ep6QcSF7t6qSWIu7i5Dexm aesQ== X-Gm-Message-State: APjAAAUEBgCqIIVZbAiMkuDD6szZsWDPslUhqkQEbOs3Cw26bHrFl4RT b94xnK7Ikgcoz+1LHWQxKi86xbWcpcwt1Zfu3jA= X-Received: by 2002:a9d:6acf:: with SMTP id m15mr8288575otq.312.1573450842375; Sun, 10 Nov 2019 21:40:42 -0800 (PST) MIME-Version: 1.0 References: <20190907174833.19957-1-katsuhiro@katsuster.net> In-Reply-To: From: Vasily Khoruzhick Date: Sun, 10 Nov 2019 21:40:16 -0800 Message-ID: Subject: Re: [PATCH] arm64: dts: rockchip: add analog audio nodes on rk3399-rockpro64 To: Katsuhiro Suzuki Cc: Heiko Stuebner , linux-rockchip@lists.infradead.org, linux-kernel , arm-linux Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 10, 2019 at 7:30 PM Katsuhiro Suzuki wrote: > > Hello Vasily, Hi Katsuhiro, Thanks for response! > Thank you for reporting. > > On 2019/11/11 9:17, Vasily Khoruzhick wrote: > > On Sat, Sep 7, 2019 at 10:48 AM Katsuhiro Suzuki > > wrote: > >> > >> This patch adds audio codec (Everest ES8316) and I2S audio nodes for > >> RK3399 RockPro64. > > > > Hi Katsuhiro, > > > > I tested your patch with my rockpro64 on 5.4-rc6 which has your other > > patches to es8316 driver, but apparently it doesn't work. > > > > 'alsamixer' complains 'cannot load mixer controls: No such device or > > address' and if I try to play audio with mpg123 it pretends that it > > plays something but there's no sound. > > > > Any idea what can be wrong? > > > > Do you use defconfig? If so I guess we need turn on more configs: > > - simple-graph-card driver (CONFIG_SND_AUDIO_GRAPH_CARD) > - ES8316 (SND_SOC_ES8316) I have these enabled, card is present in /proc/asound/cards, but alsamixer doesn't work with it. > FYI) ASoC related status or logs in my environment as follows: > > root@rockpro64:~# uname -a > Linux rockpro64 5.4.0-rc6-next-20191108 #169 SMP PREEMPT Mon Nov 11 12:21:44 JST 2019 aarch64 GNU/Linux I'm running 5.4.0-rc6 (commit 00aff6836241ae5654895dcea10e6d4fc5878ca6) with your patch "arm64: dts: rockchip: add analog audio nodes on rk3399-rockpro64" on top of it. > root@rockpro64:~# dmesg | grep -i asoc > [ 21.509903] asoc-simple-card hdmi-sound: i2s-hifi <-> ff8a0000.i2s mapping ok > [ 21.510550] asoc-simple-card hdmi-sound: ASoC: no DMI vendor name! > [ 21.567906] asoc-audio-graph-card sound: ES8316 HiFi <-> ff890000.i2s mapping ok > [ 21.568565] asoc-audio-graph-card sound: ASoC: no DMI vendor name! Similar here: [vasilykh@rockpro64 ~]$ dmesg | grep -i asoc [ 15.627685] asoc-audio-graph-card sound: ES8316 HiFi <-> ff890000.i2s mapping ok [ 16.250196] asoc-simple-card hdmi-sound: i2s-hifi <-> ff8a0000.i2s mapping ok > root@rockpro64:~# cat /proc/asound/pcm > 00-00: ff8a0000.i2s-i2s-hifi i2s-hifi-0 : ff8a0000.i2s-i2s-hifi i2s-hifi-0 : playback 1 > 01-00: ff890000.i2s-ES8316 HiFi ES8316 HiFi-0 : ff890000.i2s-ES8316 HiFi ES8316 HiFi-0 : playback 1 : capture 1 Same here: [vasilykh@rockpro64 ~]$ cat /proc/asound/pcm 00-00: ff890000.i2s-ES8316 HiFi ES8316 HiFi-0 : ff890000.i2s-ES8316 HiFi ES8316 HiFi-0 : playback 1 : capture 1 01-00: ff8a0000.i2s-i2s-hifi i2s-hifi-0 : ff8a0000.i2s-i2s-hifi i2s-hifi-0 : playback > root@rockpro64:~# cat /sys/kernel/debug/asoc/components > hdmi-audio-codec.3.auto > ff8a0000.i2s > ff8a0000.i2s > ff890000.i2s > ff890000.i2s > ff880000.i2s > ff880000.i2s > es8316.1-0011 > snd-soc-dummy > snd-soc-dummy Same here. > root@rockpro64:~# cat /sys/kernel/debug/asoc/dais > i2s-hifi > ff8a0000.i2s > ff890000.i2s > ff880000.i2s > ES8316 HiFi > snd-soc-dummy-dai Same here. Yet alsamixer doesn't work for me. It terminates with 'cannot load mixer controls: No such device or address'. Strace shows that fails here: openat(AT_FDCWD, "/dev/snd/controlC0", O_RDWR|O_CLOEXEC) = 3 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 ioctl(3, SNDRV_CTL_IOCTL_PVERSION, 0xfffffd3ad04c) = 0 fcntl(3, F_GETFL) = 0x20002 (flags O_RDWR|O_LARGEFILE) fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK|O_LARGEFILE) = 0 ioctl(3, SNDRV_CTL_IOCTL_ELEM_LIST, 0xfffffd3ad228) = 0 ioctl(3, SNDRV_CTL_IOCTL_ELEM_LIST, 0xfffffd3ad228) = 0 ioctl(3, SNDRV_CTL_IOCTL_ELEM_INFO, 0xfffffd3ace38) = 0 ioctl(3, SNDRV_CTL_IOCTL_ELEM_READ, 0xfffffd3ac160) = -1 ENXIO (No such device or address) Looks like it fails to talk to the codec? mpg123 thinks that it's playing audio, but my headphones connected to 3.5mm output are silent. Regards, Vasily > Best Regards, > Katsuhiro Suzuki > > > > Regards, > > Vasily > > > >> Signed-off-by: Katsuhiro Suzuki > >> --- > >> .../boot/dts/rockchip/rk3399-rockpro64.dts | 28 +++++++++++++++++++ > >> 1 file changed, 28 insertions(+) > >> > >> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts > >> index 0401d4ec1f45..8b1e6382b140 100644 > >> --- a/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts > >> +++ b/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts > >> @@ -81,6 +81,12 @@ > >> reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; > >> }; > >> > >> + sound { > >> + compatible = "audio-graph-card"; > >> + label = "rockchip,rk3399"; > >> + dais = <&i2s1_p0>; > >> + }; > >> + > >> vcc12v_dcin: vcc12v-dcin { > >> compatible = "regulator-fixed"; > >> regulator-name = "vcc12v_dcin"; > >> @@ -470,6 +476,20 @@ > >> i2c-scl-rising-time-ns = <300>; > >> i2c-scl-falling-time-ns = <15>; > >> status = "okay"; > >> + > >> + es8316: codec@11 { > >> + compatible = "everest,es8316"; > >> + reg = <0x11>; > >> + clocks = <&cru SCLK_I2S_8CH_OUT>; > >> + clock-names = "mclk"; > >> + #sound-dai-cells = <0>; > >> + > >> + port { > >> + es8316_p0_0: endpoint { > >> + remote-endpoint = <&i2s1_p0_0>; > >> + }; > >> + }; > >> + }; > >> }; > >> > >> &i2c3 { > >> @@ -505,6 +525,14 @@ > >> rockchip,playback-channels = <2>; > >> rockchip,capture-channels = <2>; > >> status = "okay"; > >> + > >> + i2s1_p0: port { > >> + i2s1_p0_0: endpoint { > >> + dai-format = "i2s"; > >> + mclk-fs = <256>; > >> + remote-endpoint = <&es8316_p0_0>; > >> + }; > >> + }; > >> }; > >> > >> &i2s2 { > >> -- > >> 2.23.0.rc1 > >> > >> > >> _______________________________________________ > >> linux-arm-kernel mailing list > >> linux-arm-kernel@lists.infradead.org > >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > > >