Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2152904rdh; Tue, 26 Sep 2023 14:21:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6wzeshT282Yn9NZWSJy41BUhIBThvEaW6KuCNYJDPkt2mD/RoKMEOXi0XPwgETsoBU3/o X-Received: by 2002:a05:6358:6f9e:b0:12b:e47a:8191 with SMTP id s30-20020a0563586f9e00b0012be47a8191mr246886rwn.16.1695763280020; Tue, 26 Sep 2023 14:21:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1695763279; cv=pass; d=google.com; s=arc-20160816; b=leFgt8UcyDTSEdhCRtMQqMzUNQ9mgYmQpamDxjBid012mQySeXFUG+PwAnP640GAwp /O+2hSeylYAu/FTwR4/V4fRlSWLaxaeeS4oiZJcD02oxEWU7wCLkw9L7IdcYrYuzTv+E YvLFdMpaVS1MGATf3Ul9k7VSRdybxnRPcYSCzLw4ghvWtNUjy8n1Ip6G5BBa50OPWnwn CBQbX+PvYyi9r56/7IfUyqPDC0fiVYkHLIgMvf2QAdN6ggxUQh475/RnhTkLGJiUqv6x XVPFsbBwvEI5h+dKbVubBkYiBCExUFPaD1eBC2L5LXWMms/OdfeD/2Mmhox8ROH+iTtd nlZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=4FqenWm85bgQFUJF4ZZgZ9PH37olU8MqKVaaTd8hPqA=; fh=kBu3DHqrQj7JZhggxxjQWBnN6ul1139sG0a9J7W99m8=; b=WLGZhJ33tRkLQqzpHHEsukKlxW4AgL/CT5pSyCBhQpwXySiOykfa9uAH7r2sJLVomu 96Ea7PSy/Me/eprJd/gBkxekaSn8XHnrWpyelDUZEUpWYunttpdwfzZ27c0JUl70tZCs QEzY6YwLVYVZOw63xsTWwLRJA8vKvxQZevn+2TiEiZ2833+ubXmigSC0NkX55WD3BBK4 tke8VwkLayPQSSFQf3RbNqwn0H/rMvSy4Upf22lIYHNDCqjEjH4i0jtop83otmiXFuAT xrkoiKfDDMsDcsAmsCWAln5Ybmos7Hvn7iY/SGN6d0vvp07GTMmpYFn29O++BYr7rHE6 bjzA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=etilVRUj; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id bt8-20020a632908000000b0057762236debsi13398180pgb.546.2023.09.26.14.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 14:21:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=etilVRUj; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A9B4280295C5; Tue, 26 Sep 2023 12:27:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235741AbjIZT1D (ORCPT + 99 others); Tue, 26 Sep 2023 15:27:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjIZT1C (ORCPT ); Tue, 26 Sep 2023 15:27:02 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDF7C193; Tue, 26 Sep 2023 12:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695756407; cv=none; d=strato.com; s=strato-dkim-0002; b=j5vO5Z+d6AFqtgPF9hbTxSr4Q3zdMvZRGY1iXWQonVYkA1/Rb1OY+k13PF1q/p/Kvt 1K0D/gC3uHbv3T86wYJ7PAPfotnOVV5M9AUT4H3qthMprVaovWoP9Xbn+ZZuonm/ECeN L/MChnYb9bEgdgEZEXIVOVQwt/+uECm7tJ1JuUGU49n+KdBt1TrwghnUGoRPvsauNdaZ s9LL2JVQl1152Sk3N0x3buCGRqSJF35EwGEDdxB1gr7cf8OfaJVd0yoBqpZ+yeTuDhdR TdX8gTb/upFJSfYSYsP3fSsLsxHui8WCTxmafhUETzc8xCUI//Gnw9UCIJNLr46vc/F6 7Waw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1695756407; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=4FqenWm85bgQFUJF4ZZgZ9PH37olU8MqKVaaTd8hPqA=; b=VFHaRYwEZJkKVLbdcHc1H0qVElP5DEzDepnkJM3M7fiO0HaQHhmevFxqO147adRgRZ i+/mvaOzQQqHOB8q/nDLQWEpj9sRxQn9NxzJYoNRQtgnTXff1+R3DSrbk/TWah7LscHJ YzhsuLhuLfUQuZ4Yj0XBqRaxCpyUjOsv/EmFCgKzJcuJzy8OH28Q9BE0DlZFclB4mAxM vnwI2fQ0XisuZ4iyz5QdaUV5dlWB9a8TYpucBAjYDBDZk7uzqQJwz9A4byjKRObGWLm+ /WCzWWukhgZiThK8DU/nl/D3XvxRm5q83qdnr1emtSKtn7ZRlByg7LFOPVCSvL4Qmu7d 8q4g== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1695756407; s=strato-dkim-0002; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=4FqenWm85bgQFUJF4ZZgZ9PH37olU8MqKVaaTd8hPqA=; b=etilVRUji3m4T5WC/XndJD950mA0M9HOjWthkIUzuuiYW2CZ9VBnZQIgJMFEz/d+dD 1dKoxji1hFqaju/mJwj+6iS//3M4GgjsgNCs9JU9GeCMu5vOMGxvsKFNf/EtLJWiBZcX n7IhbZSMdgS+/97YECjP4jlFEiRf0gkIBb+Cv3ytMSHiT7xP0T2iCue5+xeK1C6zllEP jX17CMM9ZvEDfc79LApmovV328g2Ec59fzRKEEki+1Hp6Z648XfyZHdizWmmQcIr7lza CWlMDpPklHQW55kStE5H3Fk/RR8R+LnOIz85LKFP9YXtxEqpahqVkoJrBK/1mxIRqr8f ebgg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1695756406; s=strato-dkim-0003; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=4FqenWm85bgQFUJF4ZZgZ9PH37olU8MqKVaaTd8hPqA=; b=KuQRe1o4T2S0QWo8poFQyef4A941Cw5r9nCA8MP3Rtow7B28xuGkSjmvpYy99fY4tT 0/03smhxUjc89nVa80BA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u261EJF5OxJD4paA8piJ1A==" Received: from gerhold.net by smtp.strato.de (RZmta 49.8.2 SBL|AUTH) with ESMTPSA id R04c57z8QJQkgM9 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 26 Sep 2023 21:26:46 +0200 (CEST) Date: Tue, 26 Sep 2023 21:26:45 +0200 From: Stephan Gerhold To: Konrad Dybcio Cc: Bjorn Andersson , Andy Gross , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , "Lin, Meng-Bo" Subject: Re: [PATCH 04/13] arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem Message-ID: References: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> <20230926-msm8916-modem-v1-4-398eec74bac9@gerhold.net> <2c9eda54-a90e-483a-abc2-865d82854b80@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2c9eda54-a90e-483a-abc2-865d82854b80@linaro.org> Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 26 Sep 2023 12:27:21 -0700 (PDT) On Tue, Sep 26, 2023 at 08:54:29PM +0200, Konrad Dybcio wrote: > On 26.09.2023 18:51, Stephan Gerhold wrote: > > Enable sound and modem for the Samsung A2015 based devices (A3, A5, E5, > > E7, Grand Max). The setup is similar to most MSM8916 devices, i.e.: > > > > - QDSP6 audio > > - Earpiece/headphones/microphones via digital/analog codec in > > MSM8916/PM8916 > > - WWAN Internet via BAM-DMUX > > > > except: > > > > - NXP TFA9895 codec for speaker on Quaternary MI2S > > - Samsung-specific audio jack detection (not supported yet) > > > > [Lin: Add e2015 and grandmax] > > Co-developed-by: "Lin, Meng-Bo" > > Signed-off-by: "Lin, Meng-Bo" > > Signed-off-by: Stephan Gerhold > > --- > > .../dts/qcom/msm8916-samsung-a2015-common.dtsi | 55 ++++++++++++++++++++++ > > .../dts/qcom/msm8916-samsung-e2015-common.dtsi | 4 ++ > > .../boot/dts/qcom/msm8916-samsung-grandmax.dts | 4 ++ > > 3 files changed, 63 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi > > index 0b29132b74e1..f71b18d89bf9 100644 > > --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi > > +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi > > @@ -1,10 +1,13 @@ > > // SPDX-License-Identifier: GPL-2.0-only > > > > #include "msm8916-pm8916.dtsi" > > +#include "msm8916-modem-qdsp6.dtsi" > > + > > #include > > #include > > #include > > #include > > +#include > > > > / { > > aliases { > > @@ -196,6 +199,18 @@ vibrator: vibrator { > > }; > > }; > > > > +&blsp_i2c1 { > > + status = "okay"; > > + > > + speaker_codec: audio-codec@34 { > > + compatible = "nxp,tfa9895"; > > + reg = <0x34>; > > + vddd-supply = <&pm8916_l5>; > > + sound-name-prefix = "Speaker"; > > + #sound-dai-cells = <0>; > > + }; > > +}; > > + > > &blsp_i2c2 { > > status = "okay"; > > > > @@ -243,6 +258,13 @@ &gpu { > > status = "okay"; > > }; > > > > +&lpass { > > + dai-link@3 { > > + reg = ; > > + qcom,playback-sd-lines = <1>; > > + }; > > +}; > Is that not status = reserved? > Correct. This is here to simplify switching to the modem-bypass audio routing if someone does not need (or want) the modem. The direct audio path with the LPASS drivers tends to be more reliable and configurable (especially wrt bit formats, sampling rates, latency, channels etc). I know that at some point this helped someone who tried to use an old phone as some kind of portable musical instrument / synthesizer. It's not too obvious that these definitions would be needed when making those changes (because devices using the standard SD lines (i.e <0>) do not need it). If you forget about this you get non-functional audio with no error or any hint what could be wrong. To simplify switching between the different audio routing options, the lk2nd bootloader actually has an option to do this transformation in the DTB automagically during boot. It's sort of like a DTB overlay that disables the QDSP6 audio path and enables this node instead. The DAI links are also adjusted where necessary. Do you think a comment would help here? Thanks, Stephan