]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: hda: Add sync version of snd_hda_codec_write()
authorTakashi Iwai <tiwai@suse.de>
Thu, 9 Apr 2026 09:38:14 +0000 (11:38 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 9 Apr 2026 10:05:54 +0000 (12:05 +0200)
commitb0762dd2fcab5b8b4b953314f3f6eb9d92bc16bc
tree8d6e0ee6f0d1eb1a7558bad22a56be52b990cc3b
parent9575766a682f50ec4bcb85ecd438685bdc09f9cc
ALSA: hda: Add sync version of snd_hda_codec_write()

We used snd_hda_codec_read() for the verb write when a synchronization
is needed after the write, e.g. for the power state toggle or such
cases.  It works in principle, but it looks rather confusing and too
hackish.

For improving the code readability, introduce a new helper function,
snd_hda_codec_write_sync(), which is another variant of
snd_hda_codec_write(), and replace the existing snd_hda_codec_read()
calls with this one.

No behavior change but just the code refactoring.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-2-tiwai@suse.de
include/sound/hda_codec.h
sound/hda/codecs/generic.c
sound/hda/codecs/hdmi/intelhdmi.c
sound/hda/codecs/realtek/realtek.c
sound/hda/codecs/sigmatel.c
sound/hda/common/codec.c