From: Stephan Gerhold <stephan@gerhold.net>
To: Brian Norris <computersforpeace@gmail.com>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
Banajit Goswami <bgoswami@quicinc.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] ASoC: qcom: lpass-cpu: Fix fallback SD line index handling
Date: Sun, 1 Jan 2023 12:36:24 +0100 [thread overview]
Message-ID: <Y7FwOECdeNhtGbbF@gerhold.net> (raw)
In-Reply-To: <20221231061545.2110253-1-computersforpeace@gmail.com>
Hi Brian,
On Fri, Dec 30, 2022 at 10:15:45PM -0800, Brian Norris wrote:
> These indices should reference the ID placed within the dai_driver
> array, not the indices of the array itself.
>
Indeed, thanks for the fix and sorry for breaking IPQ8064 audio. Looks
like it's not tested very often because my patch that broke it was
merged 2.5 years ago. :-)
> This fixes commit 4ff028f6c108 ("ASoC: qcom: lpass-cpu: Make I2S SD
> lines configurable"), which among others, broke IPQ8064 audio
FWIW I think it's really just IPQ8064 audio (no others) because the
other platforms all happen to have the MI2S ports at the same index as
their ID.
> (sound/soc/qcom/lpass-ipq806x.c) because it uses ID 4 but we'd stop
> initializing the mi2s_playback_sd_mode and mi2s_capture_sd_mode arrays
> at ID 0.
>
> Fixes: 4ff028f6c108 ("ASoC: qcom: lpass-cpu: Make I2S SD lines configurable")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
BTW I just found this patch "by accident" while looking for something
else on the stable mailing list. Please Cc the original author if you
use Fixes (get_maintainer.pl should suggest that automatically if you
run it in the kernel tree). :)
Thanks!
Stephan
> ---
> sound/soc/qcom/lpass-cpu.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
> index 54353842dc07..dbdaaa85ce48 100644
> --- a/sound/soc/qcom/lpass-cpu.c
> +++ b/sound/soc/qcom/lpass-cpu.c
> @@ -1037,10 +1037,11 @@ static void of_lpass_cpu_parse_dai_data(struct device *dev,
> struct lpass_data *data)
> {
> struct device_node *node;
> - int ret, id;
> + int ret, i, id;
>
> /* Allow all channels by default for backwards compatibility */
> - for (id = 0; id < data->variant->num_dai; id++) {
> + for (i = 0; i < data->variant->num_dai; i++) {
> + id = data->variant->dai_driver[i].id;
> data->mi2s_playback_sd_mode[id] = LPAIF_I2SCTL_MODE_8CH;
> data->mi2s_capture_sd_mode[id] = LPAIF_I2SCTL_MODE_8CH;
> }
> --
> 2.39.0
>
next prev parent reply other threads:[~2023-01-01 11:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-31 6:15 [PATCH] ASoC: qcom: lpass-cpu: Fix fallback SD line index handling Brian Norris
2023-01-01 11:36 ` Stephan Gerhold [this message]
2023-01-02 0:06 ` Mark Brown
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=Y7FwOECdeNhtGbbF@gerhold.net \
--to=stephan@gerhold.net \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=computersforpeace@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=stable@vger.kernel.org \
/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