Re: [PATCH 1/2] ASoC: codecs: aw88261: fix changing sample rate and bit width

Mark Brown
2026-04-21T15:59:38Z

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

On Mon, Apr 20, 2026 at 04:39:58PM -0300, Val Packett wrote:
> The aw88261 driver only worked with 32-bit 48kHz streams so far due to
> the lack of a proper PLL initialization sequence. Fix by selecting all
> the necessary PLL settings based on what was passed to us in the
> hw_params DAI callback. This replaces the strange downstream routine
> that tries two divider modes in sequence.

> +static int aw88261_dev_configure_syspll(struct aw88261 *aw88261)
> {

> + switch (aw88261->sample_rate) {
> + case 8000:
> + case 16000:
> + case 32000:
> + case 44100:
> + case 48000:
> + case 96000:
> + case 192000:

...

> + default:
> + dev_err(aw_dev->dev, "unsupported sample rate %d\n",
> + aw88261->sample_rate);
> + return -EINVAL;
> }

The driver advertises more rats than this, including 11.025kHz, 12kHz
and multiples thereof. It's unlikely anything would actually *use* them
but it'd be better to update the constraints.

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