mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	Banajit Goswami <bgoswami@quicinc.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: qcom: q6apm-lpass-dais: pass max number of channels to Audioreach
Date: Mon, 23 Oct 2023 16:18:14 +0100	[thread overview]
Message-ID: <673374d2-e8fb-496d-b89d-092df2f1fbc0@sirena.org.uk> (raw)
In-Reply-To: <2c2941f5-9909-433a-a35e-fbe7611c0ef4@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1530 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2023-10-23 15:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-17 16:14 Krzysztof Kozlowski
2023-10-18  8:14 ` Krzysztof Kozlowski
2023-10-23 15:18   ` Mark Brown [this message]
2023-10-26 15:12 ` 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=673374d2-e8fb-496d-b89d-092df2f1fbc0@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@quicinc.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=srinivas.kandagatla@linaro.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

all inboxes | Powered by JetHome®