mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: webgeek1234@gmail.com
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Weidong Wang <wangweidong.a@awinic.com>,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	Val Packett <val@packett.cool>
Subject: Re: [PATCH 1/6] ASoC: codecs: aw88166: support changing sample rate and bit width
Date: Fri, 25 Sep 2026 15:00:43 +0100	[thread overview]
Message-ID: <93d91d10-3d3c-4dae-bd5a-62a2f71458a0@sirena.org.uk> (raw)
In-Reply-To: <20260925-aw88166-cleanup-v1-1-11f74cb5fe28@gmail.com>

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

On Fri, Sep 25, 2026 at 02:47:29AM -0500, Aaron Kling via B4 Relay wrote:

> The aw88166 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 by the
> hw_params/set_fmt ops. This replaces the strange downstream routine
> that tries two divider modes in sequence.

> -	ret = regmap_read(aw_dev->regmap, AW88166_PLLCTRL2_REG, &reg_val);
> +	/* PLL divider must be used for 8/16/32 kHz modes */
> +	ret = regmap_update_bits(aw_dev->regmap, AW88166_PLLCTRL1_REG,
> +			~AW88166_CCO_MUX_MASK, aw88166->cco_mux_value);

We seem to just completely drop all reference to PLLCTRL2 and switch
over to PLLCTRL1, I'm going to guess that this means that something that
used to work now no longer works...

> +static int aw88166_hw_params(struct snd_pcm_substream *substream,
> +	struct snd_pcm_hw_params *params,
> +	struct snd_soc_dai *dai)
> +{
> +	struct snd_soc_component *component = dai->component;
> +	struct aw88166 *aw88166 = snd_soc_component_get_drvdata(component);
> +
> +	case 32:
> +		aw88166->bck_value = AW88166_I2SBCK_64FS_VALUE;
> +		break;
> +	default:
> +		dev_err(aw88166->aw_pa->dev, "unsupported physical bit width %d\n",
> +			params_physical_width(params));
> +		return -EINVAL;
> +	}
> +
> +	return 0;
> +}

This doesn't touch the hardware, it just writes state so if hw_params()
is called while things are powered up nothing is going to take effect
until the next stream.

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

  reply	other threads:[~2026-09-25 14:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25  7:47 [PATCH 0/6] ASoC: codecs: aw88166: fixes and cleanup Aaron Kling via B4 Relay
2026-09-25  7:47 ` [PATCH 1/6] ASoC: codecs: aw88166: support changing sample rate and bit width Aaron Kling via B4 Relay
2026-09-25 14:00   ` Mark Brown [this message]
2026-09-25 15:56     ` Aaron Kling
2026-09-25  7:47 ` [PATCH 2/6] ASoC: codecs: aw88166: add TDM support Aaron Kling via B4 Relay
2026-09-25  7:47 ` [PATCH 3/6] ASoC: codecs: aw88166: reduce log spam Aaron Kling via B4 Relay
2026-09-25  7:47 ` [PATCH 4/6] ASoC: codecs: aw88166: remove fade in/out on start/stop Aaron Kling via B4 Relay
2026-09-25 14:11   ` Mark Brown
2026-09-25 15:59     ` Aaron Kling
2026-09-25 16:27       ` Mark Brown
2026-09-25  7:47 ` [PATCH 5/6] ASoC: codecs: aw88166: remove async start Aaron Kling via B4 Relay
2026-09-25 14:12   ` Mark Brown
2026-09-25 15:44     ` Aaron Kling
2026-09-25 16:06       ` Mark Brown
2026-09-25 16:16         ` Aaron Kling
2026-09-25 16:27           ` Mark Brown
2026-09-25 14:35   ` Cezary Rojewski
2026-09-25 15:42     ` Aaron Kling
2026-09-25  7:47 ` [PATCH 6/6] ASoC: codecs: aw88166: make volume control usable Aaron Kling via B4 Relay
2026-09-25 14:18   ` Mark Brown
2026-09-25 16:05     ` Aaron Kling
2026-09-25 16:18       ` Mark Brown
2026-09-25 16:25         ` Aaron Kling
2026-09-25 16:33           ` 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=93d91d10-3d3c-4dae-bd5a-62a2f71458a0@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    --cc=val@packett.cool \
    --cc=wangweidong.a@awinic.com \
    --cc=webgeek1234@gmail.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®