ALSA: hda: Split Realtek HD-audio codec driver
authorTakashi Iwai <tiwai@suse.de>
Wed, 9 Jul 2025 16:04:10 +0000 (18:04 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 11 Jul 2025 07:55:37 +0000 (09:55 +0200)
commitaeeb85f26c3bbef6f702ac20167c45812251501d
treec1d99f816b408bacfefbd696acf4e6ddf0e68f31
parent6014e9021b28e634935c776c0271b5cbcabdc5d6
ALSA: hda: Split Realtek HD-audio codec driver

The snd-hda-codec-realtek driver supports many different codec models
and accumulated lots of quirks.  Now let's split it to multiple
modules per probe function, i.e. for ALC260, ALC262, ALC269, etc.

The common code and quirks are provided by the common library module,
snd-hda-codec-realtek-lib now.  One drawback of this action is that
many symbols have to be exported.  But they are limited with
SND_HDA_CODEC_REALTEK namespace, at least.

This patch tries to be idiomatic and doesn't try to rewrite the
existing code.  We can move the codec model-specific code into each
codec driver later.

The HD-audio sub-codec component binding is currently specific to
ALC269, hence the management is moved into alc269.c.
After that, alc_free() became identical with snd_hda_gen_free(), and
it's replaced as a macro just to call snd_hda_gen_free().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-8-tiwai@suse.de
17 files changed:
sound/hda/codecs/Kconfig
sound/hda/codecs/Makefile
sound/hda/codecs/realtek.c [deleted file]
sound/hda/codecs/realtek/Kconfig [new file with mode: 0644]
sound/hda/codecs/realtek/Makefile [new file with mode: 0644]
sound/hda/codecs/realtek/alc260.c [new file with mode: 0644]
sound/hda/codecs/realtek/alc262.c [new file with mode: 0644]
sound/hda/codecs/realtek/alc268.c [new file with mode: 0644]
sound/hda/codecs/realtek/alc269.c [new file with mode: 0644]
sound/hda/codecs/realtek/alc662.c [new file with mode: 0644]
sound/hda/codecs/realtek/alc680.c [new file with mode: 0644]
sound/hda/codecs/realtek/alc861.c [new file with mode: 0644]
sound/hda/codecs/realtek/alc861vd.c [new file with mode: 0644]
sound/hda/codecs/realtek/alc880.c [new file with mode: 0644]
sound/hda/codecs/realtek/alc882.c [new file with mode: 0644]
sound/hda/codecs/realtek/realtek.c [new file with mode: 0644]
sound/hda/codecs/realtek/realtek.h [new file with mode: 0644]