All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Cc: David Yang <yangxiaohua@everest-semi.com>,
	Daniel Drake <drake@endlessm.com>,
	Hans de Goede <hdegoede@redhat.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] ASoC: es8316: judge PCM rate at later timing
Date: Mon, 2 Sep 2019 13:02:49 +0100	[thread overview]
Message-ID: <20190902120248.GA5819@sirena.co.uk> (raw)
In-Reply-To: <20190831162650.19822-1-katsuhiro@katsuster.net>

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

On Sun, Sep 01, 2019 at 01:26:48AM +0900, Katsuhiro Suzuki wrote:
> This patch change the judge timing about playing/capturing PCM rate.
> 
> Original code set constraints list of PCM rate limits at set_sysclk.
> This strategy works well if system is using fixed rate clock.
> 
> But some boards and SoC (such as RockPro64 and RockChip I2S) has
> connected SoC MCLK out to ES8316 MCLK in. In this case, SoC side I2S
> will choose suitable frequency of MCLK such as fs * mclk-fs when
> user starts playing or capturing.

The best way to handle this is to try to support both fixed and variable
clock rates, some other drivers do this by setting constraints based on
MCLK only if the MCLK has been set to a non-zero value.  They have the
machine drivers reset the clock rate to 0 when it goes idle so that no
constraints are applied then.  This means that if the machine has a
fixed clock there will be constraints, and that constraints get applied
if one direction has started and fixed the clock, but still allows the
clock to be varied where possible.

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

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Katsuhiro Suzuki <katsuhiro@katsuster.net>
Cc: Hans de Goede <hdegoede@redhat.com>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	David Yang <yangxiaohua@everest-semi.com>,
	Daniel Drake <drake@endlessm.com>
Subject: Re: [alsa-devel] [PATCH v2 1/3] ASoC: es8316: judge PCM rate at later timing
Date: Mon, 2 Sep 2019 13:02:49 +0100	[thread overview]
Message-ID: <20190902120248.GA5819@sirena.co.uk> (raw)
In-Reply-To: <20190831162650.19822-1-katsuhiro@katsuster.net>


[-- Attachment #1.1: Type: text/plain, Size: 1072 bytes --]

On Sun, Sep 01, 2019 at 01:26:48AM +0900, Katsuhiro Suzuki wrote:
> This patch change the judge timing about playing/capturing PCM rate.
> 
> Original code set constraints list of PCM rate limits at set_sysclk.
> This strategy works well if system is using fixed rate clock.
> 
> But some boards and SoC (such as RockPro64 and RockChip I2S) has
> connected SoC MCLK out to ES8316 MCLK in. In this case, SoC side I2S
> will choose suitable frequency of MCLK such as fs * mclk-fs when
> user starts playing or capturing.

The best way to handle this is to try to support both fixed and variable
clock rates, some other drivers do this by setting constraints based on
MCLK only if the MCLK has been set to a non-zero value.  They have the
machine drivers reset the clock rate to 0 when it goes idle so that no
constraints are applied then.  This means that if the machine has a
fixed clock there will be constraints, and that constraints get applied
if one direction has started and fixed the clock, but still allows the
clock to be varied where possible.

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

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2019-09-02 12:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-31 16:26 [PATCH v2 1/3] ASoC: es8316: judge PCM rate at later timing Katsuhiro Suzuki
2019-08-31 16:26 ` [alsa-devel] " Katsuhiro Suzuki
2019-08-31 16:26 ` [PATCH v2 2/3] ASoC: es8316: Add clock control of MCLK Katsuhiro Suzuki
2019-08-31 16:26   ` [alsa-devel] " Katsuhiro Suzuki
2019-08-31 16:26 ` [PATCH v2 3/3] ASoC: es8316: add DT-bindings Katsuhiro Suzuki
2019-08-31 16:26   ` [alsa-devel] " Katsuhiro Suzuki
2019-09-02 12:02 ` Mark Brown [this message]
2019-09-02 12:02   ` [alsa-devel] [PATCH v2 1/3] ASoC: es8316: judge PCM rate at later timing Mark Brown
2019-09-02 19:19   ` Katsuhiro Suzuki
2019-09-02 19:19     ` [alsa-devel] " Katsuhiro Suzuki
2019-09-03 11:11     ` Mark Brown
2019-09-03 11:11       ` [alsa-devel] " Mark Brown
2019-09-03 16:03       ` Katsuhiro Suzuki
2019-09-03 16:03         ` [alsa-devel] " Katsuhiro Suzuki

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=20190902120248.GA5819@sirena.co.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=drake@endlessm.com \
    --cc=hdegoede@redhat.com \
    --cc=katsuhiro@katsuster.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yangxiaohua@everest-semi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.