lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 1 Jan 2023 12:36:24 +0100
From:   Stephan Gerhold <stephan@...hold.net>
To:     Brian Norris <computersforpeace@...il.com>
Cc:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Banajit Goswami <bgoswami@...cinc.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] ASoC: qcom: lpass-cpu: Fix fallback SD line index
 handling

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@...r.kernel.org>
> Signed-off-by: Brian Norris <computersforpeace@...il.com>

Reviewed-by: Stephan Gerhold <stephan@...hold.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ