[alsa-devel] [PATCH for-5.6] ALSA: hda: Manage concurrent reg access more properly
Kai Vehmanen
kai.vehmanen at linux.intel.com
Mon Jan 13 13:33:10 CET 2020
Hi,
On Thu, 9 Jan 2020, Takashi Iwai wrote:
> In the commit 8e85def5723e ("ALSA: hda: enable regmap internal
> locking"), we re-enabled the regmap lock due to the reported
> regression that showed the possible concurrent accesses. It was a
> temporary workaround, and there are still a few opened races even
> after the revert. In this patch, we cover those still opened windows
> with a proper mutex lock and disable the regmap internal lock again.
I've been running tests on multiple HDA machines plus submitted the patch
through the GFX CI (that found the original problem) and no issues have
been found. So with that:
Tested-by: Kai Vehmanen <kai.vehmanen at linux.intel.com>
One minor nit from checkpatch:
> +/* a helper macro to call @func_call; retry with power-up if failed */
> +#define CALL_RAW_FUNC(codec, func_call) \
> + ({ \
> + int _err = func_call; \
> + if (_err == -EAGAIN) { \
> + _err = snd_hdac_power_up_pm(codec); \
> + if (_err >= 0) \
> + _err = func_call; \
> + snd_hdac_power_down_pm(codec); \
> + } \
> + _err;})
Checkpatch --strict doesn't like this:
ERROR: space required after that ';' (ctx:VxV)
#121: FILE: sound/hda/hdac_regmap.c:450:
+ _err;})
^
Br,
Kai
More information about the Alsa-devel
mailing list