Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2334602rdh; Tue, 26 Sep 2023 22:17:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG1uuEwHq3/fNOtYfVUVPv3KSeU/pTGi4qQpqAtAR4H+y0zZl61lVfvXLjHFPjebJjcZygn X-Received: by 2002:a05:6a21:3388:b0:151:b96f:88b4 with SMTP id yy8-20020a056a21338800b00151b96f88b4mr1211608pzb.23.1695791864111; Tue, 26 Sep 2023 22:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695791864; cv=none; d=google.com; s=arc-20160816; b=WHwdxCv5KCqiDjqp0XiIDXYkITSRhUIzMFNjSZqwvVN0bbF043cBgSP1Nr5KnhWgPa +2i5dayL/C4uYpzQYKq8/w+0fb/VnCukCoGq5ydXT7vOD06fGvD54JI55p5VOi9QxSBr KLsCHJO/lcSkDJMgJTrsEkEQXLdlUxKaDGSWlKYcnqkj5D0JIvWirlsbg+0RWEFFu5bZ Er668c4tPT3GUmDaEnizU/K6LUzuUTq5aNy2uCXKtoU0Busdw0U1b2kPd//MeFYqpHBG MSfrDLBuHWEzQuR3KVZ1kyKhODx46YIRwPjxkoEX8wEvCHAM53xYzyspp4kJTKZVrtIi givA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=+81qDPZNqpR8eYxIDUO2ZfevYUKo4zlzZshzHiE6JqQ=; fh=H8DkY4TE/23RpaWIaMxZ5YAcJO5hgKPQ3Gbg2olb8mA=; b=ap5akxLXu/vgg3/N812pBJzkmeP8S/3AqOO9hImtAgAnEGZnUCfhXcKnRKjk31xpCT 7s9o1FIxzF7y7chPlq9AjHZ9IFyRz+t+k4y94w9VyptFdFaEtVrNOLFggmKPUlI1W9F1 DBnw3+i9g6bxtzBnfiTDHTla4dq4x5drJcALqG1mHloVO5q9BvJtyRuqd43cyLUXn5mZ UYomYwOF7XBNNAXvOZiZPwTwAZgNwW/eiqgCdE1B5U4I1lAYr41zlWsLm+tShclrZmVU 9lj2B9bcAQuF4lyHoydRJEfiJg9m1iVuCnPR1ZZqvaEV/pkYIR2a9a51KrG3udSGMu/X TqUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kidZRP6z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id e15-20020a17090301cf00b001c3a05b0b58si15333397plh.500.2023.09.26.22.17.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 22:17:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kidZRP6z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 5448D802FB06; Tue, 26 Sep 2023 13:18:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235864AbjIZUSl (ORCPT + 99 others); Tue, 26 Sep 2023 16:18:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235833AbjIZUSe (ORCPT ); Tue, 26 Sep 2023 16:18:34 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F80713A for ; Tue, 26 Sep 2023 13:18:26 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-32333fb6beeso2627515f8f.0 for ; Tue, 26 Sep 2023 13:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695759505; x=1696364305; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=+81qDPZNqpR8eYxIDUO2ZfevYUKo4zlzZshzHiE6JqQ=; b=kidZRP6zp7p/EPBgCvG4vVxphieUfnVVnTIoxH+qHmwIJd7GZR8vc7DKgmA1RZKv9h 6VE4szJh2PXmG7yUbgfhkOmAOMPkCxKDNNK780xIaBxIzmq+4pp5lqLwhjrh5QXQ0Qf6 K7beiDrggqab0/Hj+w7JGwNKJ8LKJ80XZbP7Qd1L4xy1cmXAibqoCfa9RFawsgSsEZbj LryIY8jCSpEqgn5Oyx6jo7gEUr9Qkuf+MnyqGEFxuogcXfZ/skm8QFJ2I9HaERqs9kUb 4W9GXO/8yjlDf68rAiicbJi1RJWXEdhQmn7il0UjH8sXuFR0vCBRC5iuYdfFcxsNuD56 Ladw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695759505; x=1696364305; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+81qDPZNqpR8eYxIDUO2ZfevYUKo4zlzZshzHiE6JqQ=; b=gOCPtmjqGjJmh986SX1eYVRtJmEiYNTxDln50OK14cQN18QV/+eE9aZ8EX4v0fi3+b j+O8uqCFAGeY7vGGceaVaEbI84JS5Em69IxyUlOWumL2wJLrRNPi5xnM0YWdGzy9v6UZ 8o7V4uejSaFd76TXfo80w3q8QxEh2eDdzPebOQAb0gftuPbpcaUgr4xud6nB4dHGkFdh bL8HBcwOgAxoUb8v0YnJOmBxJ+CffhuPTwvlCE7Xy+WFJ5XeTFnfTa+/J5HQjYBcAsA8 OqBWjlkmnuBkZ1odgFVzkg4MHdWD9gAFO0O0mATlEXW9dHb40mYHHe4+egbPucnSQIp9 p0Mw== X-Gm-Message-State: AOJu0YxCP+YTvZhI8iTmtCnF9Tr1rAzv4i1unl/1UqDtzVA9MRIF33Dl nccx9xsah8onJyAgpC5nFB9THQ== X-Received: by 2002:adf:ea84:0:b0:319:6327:6adb with SMTP id s4-20020adfea84000000b0031963276adbmr9190097wrm.70.1695759504956; Tue, 26 Sep 2023 13:18:24 -0700 (PDT) Received: from [192.168.33.189] (178235177023.dynamic-4-waw-k-1-1-0.vectranet.pl. [178.235.177.23]) by smtp.gmail.com with ESMTPSA id gv10-20020a170906f10a00b0099cd008c1a4sm8163271ejb.136.2023.09.26.13.18.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Sep 2023 13:18:24 -0700 (PDT) Message-ID: <9b9a9c0d-8a09-48a4-b996-554d7e1b9340@linaro.org> Date: Tue, 26 Sep 2023 22:18:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 04/13] arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem Content-Language: en-US To: Stephan Gerhold 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" References: <20230926-msm8916-modem-v1-0-398eec74bac9@gerhold.net> <20230926-msm8916-modem-v1-4-398eec74bac9@gerhold.net> <2c9eda54-a90e-483a-abc2-865d82854b80@linaro.org> <278ac134-992e-460a-b37a-60a746eab107@linaro.org> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgpl2Za17d1jj81YN5Rp5L9GXxkV1 aUEwONM3eCI3qcYm5JNc5X+JthZOWsbIPSC1Rhxz3JmWIwP1udr5E3oNRe9u2LIEq+wH/toH kpPDhTeMkvt4KfE5m5ercid9+ZXAqoaYLUL4HCEw+HW0DXcKDwARAQABzShLb25yYWQgRHli Y2lvIDxrb25yYWQuZHliY2lvQGxpbmFyby5vcmc+wsGOBBMBCAA4FiEEU24if9oCL2zdAAQV R4cBcg5dfFgFAmQ5bqwCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQR4cBcg5dfFjO BQ//YQV6fkbqQCceYebGg6TiisWCy8LG77zV7DB0VMIWJv7Km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kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: Content-Type: text/plain; charset=UTF-8 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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 26 Sep 2023 13:18:48 -0700 (PDT) On 26.09.2023 22:09, Stephan Gerhold wrote: > On Tue, Sep 26, 2023 at 09:56:12PM +0200, Konrad Dybcio wrote: >> [...] >> >>>>> + >>>>> &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? >> I'd say a comment would be necessary here :D >> > > No problem, I will try to add something simple. > >> While I understand this use-case, I believe this is better suited >> for an actual DTBO or something entirely kept inside lk2nd. >> Otherwise this looks very confusing to an outside reader. >> > > Translating from the QDSP6 audio setup to the LPASS one is mostly simple > but not entirely trivial (especially the patching needed for the DAI > links). Main blocker for DTBOs is that you can only add or change, but > AFAIK there is no mechanism to _delete_ or fully recreate nodes. Correct. > > I guess I could maybe derive this from the QDSP6 definitions using > custom magic code, but the code complexity for that is much higher than > adding these nodes here for completeness. I hate to be the bearer of bad news, but this is probably more of a "do we reasonably want this upstream" type question, as you'll probably get some grumpy emails about upstream not caring about what's outside the mainline tree.. > > Let me try to add some comment first. Please try to explicitly explain the reasoning of why one would want this change and what are the drawbacks etc. Konrad