Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2410243rdh; Wed, 27 Sep 2023 01:29:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQnOfAZW5Y+DRKojGcgWT6xHJRXF9RTkywVfrTjTB6YENDUqy4LzskEKNfZBGxlmH4WMlQ X-Received: by 2002:a17:90b:3114:b0:277:3569:29fb with SMTP id gc20-20020a17090b311400b00277356929fbmr2220376pjb.11.1695803368080; Wed, 27 Sep 2023 01:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695803368; cv=none; d=google.com; s=arc-20160816; b=HsdWTyUo23OhtfhlPeIs1nkQyp+R+SyfwrJ3RstEmCBQnj6J/PUu5ct0bHbhulb32N 0M8l9AV3EB7oD84dEP0GGDt7X6KdI1gzTk9/mcKacVDqAd6CKK/yw4LzwY/TUAMPi4g5 Glod9B2kBurSRScidu3AWPTKj6z7OTmohkD5ykZtfpjAnmcTYE/6eK2Vo5u7hm1C9tP7 QHpLNHW+GuGGyhO2KxN2Y64WQ8nCXkHQg2L8fErWNAVeVRuybpDsHtKwKVNtGyCObEoj iyydLWBOR9kn4aU3VlvaxoHKzZPZ08gCiNaLaf5vQlMUIjOCs4ag8gZAMRNINqKtTUyH dB0Q== 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=D9258uwtq3coU3t+1tIs8KA/35RKyIjzzfJr/GQseqo=; fh=H8DkY4TE/23RpaWIaMxZ5YAcJO5hgKPQ3Gbg2olb8mA=; b=A5t0wUaJbQ7xwXJyPrbb/WVcjuARHyQ48dzhnm1MRBv9xshF87puBgRyLc61RATd4L klltBZvYE5pAq+8i7xfLAOQv+52CDlC57lVC1vtcmJbZAjCJ/D1w5J9hSgGtdAIRQ5md rT3ZgjKqcKN3tuY+4oeMTUivk2gNDfkd+BvSDqHq7yoYpBkjQmBrQqFFQ/uKrhNLAWeu e0UnG/Q6S3VcMdXR7oReoe7s1VdqkdSw631EiHllpsjIZE1dWcMrqzBFTQY1FUFTzUJs Bx/dkpNGow9h0HX+tqiYonR1y0hHi9VX8nEpW0s0BBiVz3+n0Li7vZxtt6ojI2npBnIb M1HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kn8gmPlK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id v7-20020a17090a088700b00274c8943b59si16779292pjc.64.2023.09.27.01.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 01:29:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kn8gmPlK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id F0E3281BE2C5; Tue, 26 Sep 2023 13:29:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232069AbjIZU3n (ORCPT + 99 others); Tue, 26 Sep 2023 16:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235858AbjIZU3l (ORCPT ); Tue, 26 Sep 2023 16:29:41 -0400 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB9B0139 for ; Tue, 26 Sep 2023 13:29:33 -0700 (PDT) Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50317080342so16314440e87.2 for ; Tue, 26 Sep 2023 13:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695760172; x=1696364972; 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=D9258uwtq3coU3t+1tIs8KA/35RKyIjzzfJr/GQseqo=; b=Kn8gmPlKFG6vGNGQ9LkPb3nGPjBpUIIilO4yIgzx6Y+3fHJVmuIA2oSx1Px9b96rbg /wnz2bWnD/oouO6Uff0qll5zECEzp1tPwe4iUkoK53wIuKQTUXu/M8+Md93wxPZYsa22 hY2WPyEkSurRP7uwkELSS9R084bcC59LxbNUUycfy4m2irX2kt1NDvgpyNY/l7EStzAw Y2hblboNwb7qdnd/DGH0GkedWCkBEdtskZ5xyJr9mfsrTpFU5aZodXb7LpGzi0X3vqQV Iw+dlgF8FtdjUrCfBUJMsli8dP2fiCFFGP7fDlGDHscn5YcRvHVLrxVOq/stCj4lUZtb qS3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695760172; x=1696364972; 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=D9258uwtq3coU3t+1tIs8KA/35RKyIjzzfJr/GQseqo=; b=HCmEZMJhUYuMpvQNOqpAEa1plWFMoU1mgd8UPBpClw2UMztIQFSaJmpAXjfvmNjK76 K4e2k8KGBaSGilEVE8KT+tF7TU3Ie+1Ijev/Mb+Yg/piyE5Pd00iFgH+9FiGlYYDxHK+ yiytxsxSH2IzY00633jThj4wwaZ65GKSfxhO7nGuMxr2udxe7caJG7P5idin9pd2dnqJ JRZFvGYffhmNYVcK7nCEEwXSFMRYFhLN9ketRh94npa1lTOkaW+Uy5Y2e43xfMO9bCMT 1IEbauhtkSSCjaTK4+sVCtGgUqVflqRvjkyJCR1OhOvsNTo7KWKyj7Rt9XgaieY4m5pi 82yQ== X-Gm-Message-State: AOJu0YxGh2avc2dx6JGcfoBTLllaS8lofqSLHVkoTtOmkqd4qU683NZo Wi9ODcfX9tA3/qiGGefTViARsg== X-Received: by 2002:a05:6512:546:b0:503:2dce:4544 with SMTP id h6-20020a056512054600b005032dce4544mr8317262lfl.59.1695760171703; Tue, 26 Sep 2023 13:29:31 -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 i4-20020a50fc04000000b005254b41f507sm7195167edr.32.2023.09.26.13.29.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 26 Sep 2023 13:29:31 -0700 (PDT) Message-ID: <4d8292ca-c5fe-4270-8d93-66b721903528@linaro.org> Date: Tue, 26 Sep 2023 22:29:29 +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> <9b9a9c0d-8a09-48a4-b996-554d7e1b9340@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//YQV6fkbqQCceYebGg6TiisWCy8LG77zV7DB0VMIWJv7Km7Sz0Q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JOxWZ80U70mA 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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 26 Sep 2023 13:29:50 -0700 (PDT) On 26.09.2023 22:27, Stephan Gerhold wrote: > On Tue, Sep 26, 2023 at 10:18:22PM +0200, Konrad Dybcio wrote: >> 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.. >> > > IMHO this is hardly a "downstream" type of situation. The whole point of > the magic in lk2nd is to make the life for the mainline code base easier > and simpler, while still allowing the "bypass modem audio" feature with > an unmodified kernel. > > Before implementing it like this I used to have this directly in the > kernel tree, by duplicating each device into a normal XYZ.dts and > "XYZ-no-modem.dts". If you apply this to the total of ~45 different > MSM8916/MSM8939 DTBs I would like to get upstream this options gets > extremely ugly. :'D Maybe a kernel module parameter could be somehow useful here? Konrad