From: Neil Armstrong <neil.armstrong@linaro.org>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Srinivas Kandagatla <srini@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH RFC v2 3/6] ASoC: soc: qcom: sc8280xp: add support for I2S clocks
Date: Thu, 9 Oct 2025 11:45:28 +0200 [thread overview]
Message-ID: <d702a630-eee8-4889-98fc-62f4907791b0@linaro.org> (raw)
In-Reply-To: <630bb2b0-0ab4-4083-96a2-9aa485041797@oss.qualcomm.com>
On 10/9/25 11:41, Konrad Dybcio wrote:
> On 10/8/25 8:56 PM, Neil Armstrong wrote:
>> Add support for getting the I2S clocks used for the MI2S
>> interfaces, and enable/disable the clocks on the PCM
>> startup and shutdown card callbacks.
>>
>> The rate can be easily calculated since the card forces 48Hz,
>> 2 channels at 16bit slot size.
>>
>> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
>> ---
>
> [...]
>
>> +static int sc8280xp_snd_i2s_index(struct snd_soc_dai *dai)
>> +{
>> + switch (dai->id) {
>> + case PRIMARY_MI2S_RX...PRIMARY_MI2S_TX:
>
> I have mixed feelings about the range syntax here.. it's only 2 entries
> per and it's quite error-prone (no errors in this case, but it
> encourages the thinking that things are always contiguous)..
>
> [...]
>
>> switch (cpu_dai->id) {
>> case PRIMARY_MI2S_RX...QUATERNARY_MI2S_TX:
>> case QUINARY_MI2S_RX...QUINARY_MI2S_TX:
>
> whereas e.g. here we see that it's not really the case, but it's
> tempting for someone trying to 'clean up' the code to change it to:
>
> case PRIMARY_MI2S_RX...QUINARY_MI2S_TX
>
> and the reviewers may not catch it
I understand your point, but I just took what was already in the file...
Is my change correct, yes, is the style of the code improvable, yes.
I'll do my best to fix the style issue later on.
Neil
>
> Konrad
next prev parent reply other threads:[~2025-10-09 9:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-08 18:56 [PATCH RFC v2 0/6] ASoC: qcom: enable HDMI audio on SM8[456]50 HDK boards Neil Armstrong
2025-10-08 18:56 ` [PATCH RFC v2 1/6] ASoC: qcom: qdsp6: q6prm: add the missing MCLK clock IDs Neil Armstrong
2025-10-08 18:56 ` [PATCH RFC v2 2/6] ASoC: dt-bindings: qcom,sm8250: Add clocks properties for I2S Neil Armstrong
2025-10-09 13:36 ` Srinivas Kandagatla
2025-10-09 14:03 ` Neil Armstrong
2025-10-09 14:06 ` Srinivas Kandagatla
2025-10-09 14:25 ` Neil Armstrong
2025-10-09 14:29 ` Srinivas Kandagatla
2025-10-09 15:30 ` Neil Armstrong
2025-10-09 18:05 ` Srinivas Kandagatla
2025-10-09 20:19 ` Srinivas Kandagatla
2025-10-08 18:56 ` [PATCH RFC v2 3/6] ASoC: soc: qcom: sc8280xp: add support for I2S clocks Neil Armstrong
2025-10-09 9:41 ` Konrad Dybcio
2025-10-09 9:45 ` Neil Armstrong [this message]
2025-10-09 11:07 ` Konrad Dybcio
2025-10-09 11:21 ` Alexey Klimov
2025-10-09 11:44 ` Neil Armstrong
2025-10-09 13:40 ` Srinivas Kandagatla
2025-10-09 14:04 ` Neil Armstrong
2025-10-08 18:56 ` [PATCH RFC v2 4/6] arm64: dts: qcom: sm8450-hdk: Enable I2S for HDMI Neil Armstrong
2025-10-09 12:37 ` Konrad Dybcio
2025-10-09 12:52 ` Neil Armstrong
2025-10-08 18:56 ` [PATCH RFC v2 5/6] arm64: dts: qcom: sm8550-hdk: " Neil Armstrong
2025-10-08 18:56 ` [PATCH RFC v2 6/6] arm64: dts: qcom: sm8650-hdk: " Neil Armstrong
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=d702a630-eee8-4889-98fc-62f4907791b0@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=andersson@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=srini@kernel.org \
--cc=tiwai@suse.com \
/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