mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Val Packett <val@packett.cool>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Bhushan Shah <bhushan.shah@machinesoul.in>,
	Luca Weiss <luca.weiss@fairphone.com>,
	phone-devel@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ASoC: codecs: aw88261: fix changing sample rate and bit width
Date: Tue, 21 Apr 2026 13:03:48 -0300	[thread overview]
Message-ID: <d9522700-3366-4a45-9a4a-fb226a7d4c54@packett.cool> (raw)
In-Reply-To: <ddd25025-74ac-4363-8be7-9d2c70f8e623@sirena.org.uk>


On 4/21/26 12:59 PM, Mark Brown wrote:
> 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.

Oops, I never realized that SNDRV_PCM_RATE_8000_48000 includes so much 
"unreasonable" junk!

Ack.

I thought of updating the rates to include 192000 but I'm not sure how 
actually supported it is. The definition for it is present in downstream 
headers, but the datasheet for the AW88258 mentions 96 kHz as the 
largest rate, and I couldn't find a datasheet for the 88261 itself..

~val


      reply	other threads:[~2026-04-21 16:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 19:39 Val Packett
2026-04-20 19:40 ` [PATCH 2/2] ASoC: codecs: aw88261: use correct registers for AW88258 Val Packett
2026-04-21 15:59 ` [PATCH 1/2] ASoC: codecs: aw88261: fix changing sample rate and bit width Mark Brown
2026-04-21 16:03   ` Val Packett [this message]

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=d9522700-3366-4a45-9a4a-fb226a7d4c54@packett.cool \
    --to=val@packett.cool \
    --cc=bhushan.shah@machinesoul.in \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=luca.weiss@fairphone.com \
    --cc=perex@perex.cz \
    --cc=phone-devel@vger.kernel.org \
    --cc=tiwai@suse.com \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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®