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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <673374d2-e8fb-496d-b89d-092df2f1fbc0@sirena.org.uk>
Date:   Mon, 23 Oct 2023 16:18:14 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Banajit Goswami <bgoswami@...cinc.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: qcom: q6apm-lpass-dais: pass max number of
 channels to Audioreach

On Wed, Oct 18, 2023 at 10:14:03AM +0200, Krzysztof Kozlowski wrote:
> On 17/10/2023 18:14, Krzysztof Kozlowski wrote:

> > Using the params_channels() helper when setting hw_params, results in
> > passing to Audioreach minimum number of channels valid for given
> > hardware.  This is not valid for any hardware which sets minimum
> > channels to two and maximum to something bigger, like four channels.
> > 
> > Instead pass the maximum number of supported channels to allow playback
> > of multi-channel formats.

> I am not sure if this is correct fix. I think sound machine drivers
> should just not override channels like:

You *can* get cases where machine specific wiring or clocking limits
mean that even if both ends of a link are capable of some number of
channels the actual limit is lower.

> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/soc/qcom/sm8250.c?h=v6.6-rc6#n44

That's:

| static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
|				     struct snd_pcm_hw_params *params)

...

|	rate->min = rate->max = 48000;
|	channels->min = channels->max = 2;

which is DPCM which is it's own special thing - in this case it's saying
that whatever the front end takes in the thing that comes out of the SoC
will have been reformatted to 48kHz stereo (so mono will be turned into
stereo for example) which is a perfectly reasonable thing for a DSP to
do.  See previous discussions of how we should handle this better, DPCM
isn't ideal.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ