Re: [PATCH v7 2/2] ASoC: codecs: nau8360: Add support for NAU83G60 amplifier

YLCHANG2 <[email protected]> Thu, 6 Aug 2026 11:27:43 +0800
Newsgroups org.kernel.vger.linux-sound,org.alsa-project.alsa-devel,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
On 8/5/26 18:30, Mark Brown wrote:
> On Wed, Aug 05, 2026 at 05:03:01PM +0800, YLCHANG2 wrote:
>> On 8/4/26 23:58, Mark Brown wrote:
>>> On Tue, Aug 04, 2026 at 11:29:51AM +0800, Neo Chang wrote:
>>>> +	switch (clk_id) {
>>>> +	case NAU8360_CLK_ID_INT:
>>> Usually we don't have a lot of fine grained control of the internal
>>> clock dividers of the device, things are a lot easier when the device
>>> just figures out what it needs based on it's input clocks.
>> To make sure I understand: Should we remove the internal clock IDs from
>> set_sysclk and handle clock configurations automatically inside the codec
>> driver?
> That's ideal.
>
>> Does this mean we should avoid configuring them via the machine driver
>> entirely? If so, what is the preferred way to handle clock fallback when
>> playback stops or MCLK is absent
>> (e.g., via PCM shutdown hooks or DAPM events)?
> What do you mean by clock fallbacks here?  Presumably there's some clock
> still running, if that's the only one running it's reasonable for the
> device to switch over to it.
Hi Mark,

After further internal discussion with the team, we prefer to keep 
NAU8360_CLK_ID_INT in set_sysclk purely
for clock source switching to maintain consistency with other Nuvoton 
drivers (e.g., nau8824, nau8825).
In the v8 patch, I will remove all fine-grained clock divider 
configurations from nau8360_dsp_hw_clk and nau8360_dig_sys_clk,
leaving them to only handle source switching.
Is this approach acceptable?