mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Stephan Gerhold <stephan@gerhold.net>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Andy Gross <agross@kernel.org>,
	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 <bryan.odonoghue@linaro.org>,
	"Lin, Meng-Bo" <linmengbo0689@protonmail.com>
Subject: Re: [PATCH 04/13] arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem
Date: Tue, 26 Sep 2023 22:29:29 +0200	[thread overview]
Message-ID: <4d8292ca-c5fe-4270-8d93-66b721903528@linaro.org> (raw)
In-Reply-To: <ZRM-u3gIoOsHVp7c@gerhold.net>

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 = <MI2S_QUATERNARY>;
>>>>>>> +		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

  reply	other threads:[~2023-09-26 20:29 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26 16:51 [PATCH 00/13] arm64: dts: qcom: msm8916/39: Enable sound and modem with QDSP6 Stephan Gerhold
2023-09-26 16:51 ` [PATCH 01/13] arm64: dts: qcom: msm8939: Add BAM-DMUX WWAN Stephan Gerhold
2023-09-26 18:43   ` Konrad Dybcio
2023-09-26 16:51 ` [PATCH 02/13] arm64: dts: qcom: msm8916/39: Add QDSP6 Stephan Gerhold
2023-09-26 18:46   ` Konrad Dybcio
2023-09-26 18:54     ` Stephan Gerhold
2023-09-26 19:05       ` Konrad Dybcio
2023-09-26 19:07         ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 03/13] arm64: dts: qcom: msm8916: Add common msm8916-modem-qdsp6.dtsi Stephan Gerhold
2023-09-26 18:49   ` Konrad Dybcio
2023-09-26 19:06     ` Stephan Gerhold
2023-09-26 20:01       ` Konrad Dybcio
2023-09-26 20:17         ` Stephan Gerhold
2023-10-02  9:59           ` Konrad Dybcio
2023-10-02 16:33             ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 04/13] arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem Stephan Gerhold
2023-09-26 18:54   ` Konrad Dybcio
2023-09-26 19:26     ` Stephan Gerhold
2023-09-26 19:56       ` Konrad Dybcio
2023-09-26 20:09         ` Stephan Gerhold
2023-09-26 20:18           ` Konrad Dybcio
2023-09-26 20:27             ` Stephan Gerhold
2023-09-26 20:29               ` Konrad Dybcio [this message]
2023-09-26 20:36                 ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 05/13] arm64: dts: qcom: msm8916-samsung-serranove: " Stephan Gerhold
2023-09-26 18:55   ` Konrad Dybcio
2023-09-26 19:29     ` Stephan Gerhold
2023-09-26 19:57       ` Konrad Dybcio
2023-09-26 20:04         ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 06/13] arm64: dts: qcom: msm8916-wingtech-wt88047: " Stephan Gerhold
2023-09-26 18:56   ` Konrad Dybcio
2023-09-26 16:51 ` [PATCH 07/13] arm64: dts: qcom: msm8916-alcatel-idol347: " Stephan Gerhold
2023-09-26 18:58   ` Konrad Dybcio
2023-09-26 19:35     ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 08/13] arm64: dts: qcom: msm8916-asus-z00l: " Stephan Gerhold
2023-09-26 18:58   ` Konrad Dybcio
2023-09-26 16:51 ` [PATCH 09/13] arm64: dts: qcom: msm8916-longcheer-l8150: " Stephan Gerhold
2023-09-26 18:59   ` Konrad Dybcio
2023-09-26 19:36     ` Stephan Gerhold
2023-09-30 16:59     ` Stephan Gerhold
2023-10-02  9:59       ` Konrad Dybcio
2023-09-26 16:51 ` [PATCH 10/13] arm64: dts: qcom: msm8916-longcheer-l8910: " Stephan Gerhold
2023-09-26 19:00   ` Konrad Dybcio
2023-09-26 16:51 ` [PATCH 11/13] arm64: dts: qcom: msm8916-samsung-gt5: " Stephan Gerhold
2023-09-26 19:03   ` Konrad Dybcio
2023-09-26 19:37     ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 12/13] arm64: dts: qcom: msm8916-samsung-j5: " Stephan Gerhold
2023-09-26 19:04   ` Konrad Dybcio
2023-09-26 19:44     ` Stephan Gerhold
2023-09-26 16:51 ` [PATCH 13/13] arm64: dts: qcom: msm8939-samsung-a7: " Stephan Gerhold
2023-09-26 19:04   ` Konrad Dybcio
2023-09-26 19:45     ` Stephan Gerhold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4d8292ca-c5fe-4270-8d93-66b721903528@linaro.org \
    --to=konrad.dybcio@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linmengbo0689@protonmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=stephan@gerhold.net \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®