Re: [PATCH 7/8] ALSA: hda: Fix single byte writing issue for Hygon family 18h model 5h

From: Fu Hao

Date: Fri Mar 27 2026 - 22:41:29 EST


On 2026/3/27 21:02, David Laight wrote:
On Fri, 27 Mar 2026 16:11:13 +0800
Fu Hao <fuhao@xxxxxxxxxxxxxx> wrote:

On Hygon family 18h model 5h controller, some registers such as
GCTL, SD_CTL and SD_CTL_3B should be accessed in dword, or the
writing will fail.

What's a 'dword' ?
It is short for 'double word', a 64bit cpu has a word size of
64 bits, so a dword would be 128 bits.

On Hygon family 18h model 5h controller 32bit accesses must be
used to access registers such as CTL, SD_CTL and SD_CTL_3B.

David


Accessing in dword alignment means performing register read and write
operations in 32-bit increments. In the current driver, some HDA
registers are accessed by default in byte increments. However, for
certain registers of the Hygon HD-audio controller, such as CTL, SD_CTL,
and SD_CTL_3B, they need to be accessed in 32-bit increments during
initialization, in accordance with the 32-bit nature of the registers
themselves.

If you access it using dword, the API snd_hdac_stream_updatel(writel,
32bit) will be used.

--
Regards,
Fu Hao