ASoC: simple-card-utils: Ignore sysclk 0Hz request
The simple-card-util driver sends 0Hz frequency requests during stream
shutdown (change commit id 2458adb8f), which can request frequencies
lower than FMON (Frequency Monitor) minimum allowed rate.
For T264 AUD_MCLK, FMON sets minimum allowed clock frequency to 1.5MHz,
but 0Hz requests trigger BPMP to use its minimum rate
(clock parent rate / max clock divider) causing FMON fault logs:
verify_rate_range: FMON_AUD_MCLK: rate 383999 below min 1500000
fmon_update_config: FMON_AUD_MCLK: detected fault 0x80
Add ignore_zero_clk_rate_req flag to ignore these requests for Tegra
clocks.
Bug 5135928
Change-Id: I302bf1ad2f54e3b8308c999e5f021aafc1868250
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/3rdparty/canonical/linux-noble/+/3411615
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mohan kumar <mkumard@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
49467e4376
commit
6ec228aa4e
@@ -76,6 +76,7 @@ struct simple_util_priv {
|
||||
const struct snd_soc_ops *ops;
|
||||
unsigned int dpcm_selectable:1;
|
||||
unsigned int force_dpcm:1;
|
||||
unsigned int ignore_zero_clk_rate_req:1;
|
||||
};
|
||||
#define simple_priv_to_card(priv) (&(priv)->snd_card)
|
||||
#define simple_priv_to_props(priv, i) ((priv)->dai_props + (i))
|
||||
|
||||
@@ -364,7 +364,8 @@ void simple_util_shutdown(struct snd_pcm_substream *substream)
|
||||
for_each_prop_dai_cpu(props, i, dai) {
|
||||
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, i);
|
||||
|
||||
if (props->mclk_fs && !dai->clk_fixed && !snd_soc_dai_active(cpu_dai))
|
||||
if (!priv->ignore_zero_clk_rate_req && props->mclk_fs && !dai->clk_fixed
|
||||
&& !snd_soc_dai_active(cpu_dai))
|
||||
snd_soc_dai_set_sysclk(cpu_dai,
|
||||
0, 0, SND_SOC_CLOCK_OUT);
|
||||
|
||||
@@ -373,7 +374,8 @@ void simple_util_shutdown(struct snd_pcm_substream *substream)
|
||||
for_each_prop_dai_codec(props, i, dai) {
|
||||
struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, i);
|
||||
|
||||
if (props->mclk_fs && !dai->clk_fixed && !snd_soc_dai_active(codec_dai))
|
||||
if (!priv->ignore_zero_clk_rate_req && props->mclk_fs && !dai->clk_fixed
|
||||
&& !snd_soc_dai_active(codec_dai))
|
||||
snd_soc_dai_set_sysclk(codec_dai,
|
||||
0, 0, SND_SOC_CLOCK_IN);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2020-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
//
|
||||
// tegra_audio_graph_card.c - Audio Graph based Tegra Machine Driver
|
||||
|
||||
@@ -300,6 +300,7 @@ static int tegra_audio_graph_probe(struct platform_device *pdev)
|
||||
if (!of_property_read_bool(dev->of_node, "nvidia,ahub-c2c-links")) {
|
||||
card->component_chaining = 1;
|
||||
priv->simple.force_dpcm = 1;
|
||||
priv->simple.ignore_zero_clk_rate_req = 1;
|
||||
}
|
||||
|
||||
ret = devm_snd_soc_register_component(dev, &tegra_dummy_component,
|
||||
|
||||
Reference in New Issue
Block a user