Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4251817pxv; Tue, 29 Jun 2021 02:35:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKTHliySDlaHnHDSQLDRCq/gaBysBHJ0Q1c90Sljixo7agEFSgquqDeXvuoV+cC9zDybDp X-Received: by 2002:aa7:d955:: with SMTP id l21mr39536807eds.35.1624959308191; Tue, 29 Jun 2021 02:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624959308; cv=none; d=google.com; s=arc-20160816; b=EmWWRetKh60jh84DDMh8cPIati+6A7sISRCevUF68TaitAvHbatcicjGP9uBNqH2AQ NdyyZwVG/PqHXE5ZTfiHgrOFV10DlMiVhTs+18XhWoLDFT/8mdgloXAeaYF2hjuR8SQ7 04RdWpvcnYTz/PmxsQq6jKT0tKyCC7G0uQqQndFxwE9nOILelybRGT+jzpB2LsQFaKpo Ni1rG5t88GwmUVl8h0IBpCMpM9LHDQhNelW1nnXYEqVFeiWsr59jWLkCieh4aiif32rw Le9i6uktbZvlCFltQ3feBuLUNQj6N7Cx43Mf7C58m2ZSqW/Ak2AJLz7tUrxisotukqgE 2q5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=QrTAGxx1qCbh1CIjeBwEC1ERqOK7fteyVHMd+HOi8Jg=; b=TC9ztWd7/rPVufkT4VygZwY4O0FFJCoEffa776/m5iA+QiBR6AfqF6Crk7oFXLElvm w+QSQH6wgo0zxcsdSV3ZIl2IlZarVCU1kxnNwobqx7LZ6pyhOfuYxCh0ws7KlkqAVPfz ep0UNLFkH47hP38DJK/qP3naJMWozxX7t9gUvx0u7xxTWAlL/L3o4QeG5lUrHdaVXPhV d2VaI2y8KeCJe9FZmp683kMbQY9i2iMtSMagaOxMLOf6gSgl5m/Y/boXHFgT2H0JBU20 FtJmTSYn0i5QaiRqbGcS2bC/PhgUrBTzsnRDAptuKA4EQkye+198yeF3thkHR1vwcAQ3 11QQ== 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 w11si20074534ede.594.2021.06.29.02.34.44; Tue, 29 Jun 2021 02:35:08 -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 S232793AbhF2JfS convert rfc822-to-8bit (ORCPT + 99 others); Tue, 29 Jun 2021 05:35:18 -0400 Received: from gloria.sntech.de ([185.11.138.130]:40262 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232614AbhF2JfQ (ORCPT ); Tue, 29 Jun 2021 05:35:16 -0400 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lyA6j-00024K-Nm; Tue, 29 Jun 2021 11:32:41 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: linux-rockchip@lists.infradead.org, Levin Cc: Wayne Chou , Kongxin Deng , Chen-Yu Tsai , Jagan Teki , Jensen Huang , Johan Jonker , Liang Chen , Marty Jones , Rob Herring , Uwe =?ISO-8859-1?Q?Kleine=2DK=F6nig?= , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v0 2/2] arm64: dts: rockchip: add support for Firefly ROC-RK3399-PC-PLUS Date: Tue, 29 Jun 2021 11:32:40 +0200 Message-ID: <4501122.2vfOZ694Ok@diego> In-Reply-To: <3771996.aKNjEaI27c@diego> References: <20210628035402.16812-1-djw@t-chip.com.cn> <149c2171-471e-343e-8126-38394746b044@t-chip.com.cn> <3771996.aKNjEaI27c@diego> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Dienstag, 29. Juni 2021, 11:30:10 CEST schrieb Heiko St?bner: > Hi Levin, > > Am Dienstag, 29. Juni 2021, 11:15:59 CEST schrieb Levin: > > Hi all, is it possible to turn on some codec mixer switch in the device > > tree? > > I don't think that is appropriate and/or/ possible in the devicetree. > > Instead I think you want an Alsa UCM profile for it, see: > https://github.com/alsa-project/alsa-ucm-conf/tree/master/ucm2/Rockchip > > > Heiko > > > > > > > Currently, to hear to sound, we need to run the following commands from > > the user space: > > > > # turn on mixer switch > > > > amixer -c 1 sset 'Left Mixer' on > > amixer -c 1 sset 'Right Mixer' on > > > > # raise volume > > > > amixer -c 1 sset 'Output 2' 36 > > > > > > If these settings can be embedded into device tree, and set by kernel as > > initial ALSA path settings, > > > > user can hear the sound with zero ALSA config. That'll be great. > > > > > > On 2021-06-28 11:54 AM, djw@t-chip.com.cn wrote: > > > + > > > + es8388-sound { > > > + compatible = "simple-audio-card"; > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&hp_det_pin>; > > > + simple-audio-card,name = "rockchip,es8388-codec"; and I guess you'd want a more specific name as that config likely is board-specific not for all boards using the es8388-codec? Heiko > > > + simple-audio-card,format = "i2s"; > > > + simple-audio-card,mclk-fs = <256>; > > > + > > > + simple-audio-card,widgets = > > > + "Microphone", "Mic Jack", > > > + "Headphone", "Headphones"; > > > + simple-audio-card,routing = > > > + "LINPUT1", "Mic Jack", > > > + "Headphone Amp INL", "LOUT2", > > > + "Headphone Amp INR", "ROUT2", > > > + "Headphones", "Headphone Amp OUTL", > > > + "Headphones", "Headphone Amp OUTR"; > > > + > > > + simple-audio-card,hp-det-gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>; > > > + simple-audio-card,aux-devs = <&headphones_amp>; > > > + simple-audio-card,pin-switches = "Headphones"; > > > + > > > + simple-audio-card,cpu { > > > + sound-dai = <&i2s1>; > > > + }; > > > + > > > + simple-audio-card,codec { > > > + sound-dai = <&es8388>; > > > + }; > > > + }; > > > + > > > > > > >