[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87woei5mzj.wl-kuninori.morimoto.gx@renesas.com>
Date: 09 Sep 2019 09:31:28 +0900
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Katsuhiro Suzuki <katsuhiro@...suster.net>
Cc: Mark Brown <broonie@...nel.org>, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] SoC: simple-card-utils: set 0Hz to sysclk when shutdown
Hi Katsuhiro
> This patch set 0Hz to sysclk when shutdown the card.
>
> Some codecs set rate constraints that derives from sysclk. This
> mechanism works correctly if machine drivers give fixed frequency.
>
> But simple-audio and audio-graph card set variable clock rate if
> 'mclk-fs' property exists. In this case, rate constraints will go
> bad scenario. For example a codec accepts three limited rates
> (mclk / 256, mclk / 384, mclk / 512).
>
> Bad scenario as follows (mclk-fs = 256):
> - Initialize sysclk by correct value (Ex. 12.288MHz)
> - Codec set constraints of PCM rate by sysclk
> 48kHz (1/256), 32kHz (1/384), 24kHz (1/512)
> - Play 48kHz sound, it's acceptable
> - Sysclk is not changed
>
> - Play 32kHz sound, it's acceptable
> - Set sysclk to 8.192MHz (= fs * mclk-fs = 32k * 256)
> - Codec set constraints of PCM rate by sysclk
> 32kHz (1/256), 21.33kHz (1/384), 16kHz (1/512)
>
> - Play 48kHz again, but it's NOT acceptable because constraints
> do not allow 48kHz
>
> So codecs treat 0Hz sysclk as signal of applying no constraints to
> avoid this problem.
>
> Signed-off-by: Katsuhiro Suzuki <katsuhiro@...suster.net>
> ---
I'm not 100% understand your issue.
.hw_params (= set mclk/sysclk) is not called in bad case ??
Or it is called but Codec driver ignores it somehow ??
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Powered by blists - more mailing lists