Commit 05be28fe authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda: Move common codec driver into sound/hda/common directory



The snd-hda-codec module contains the most of common code used by both
HD-audio controller and codec drivers, and it's basically independent
from PCI.  Let's move the code to sound/hda/common directory as a part
of code reorganization.

The hda_ prefix is dropped from the most of file names as it's rather
superfluous.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250709160434.1859-4-tiwai@suse.de
parent b2660d1e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
menu "HD-Audio"

source "sound/hda/common/Kconfig"
source "sound/hda/core/Kconfig"

endmenu
+1 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-y += core/
obj-$(CONFIG_SND_HDA) += common/
+80 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only

config SND_HDA
	tristate
	select SND_PCM
	select SND_VMASTER
	select SND_JACK
	select SND_HDA_CORE

if SND_HDA

config SND_HDA_HWDEP
	bool "Build hwdep interface for HD-audio driver"
	select SND_HWDEP
	help
	  Say Y here to build a hwdep interface for HD-audio driver.
	  This interface can be used for out-of-band communication
	  with codecs for debugging purposes.

config SND_HDA_RECONFIG
	bool "Allow dynamic codec reconfiguration"
	help
	  Say Y here to enable the HD-audio codec re-configuration feature.
	  It allows user to clear the whole codec configuration, change the
	  codec setup, add extra verbs, and re-configure the codec dynamically.

	  Note that this item alone doesn't provide the sysfs interface, but
	  enables the feature just for the patch loader below.
	  If you need the traditional sysfs entries for the manual interaction,
	  turn on CONFIG_SND_HDA_HWDEP as well.

config SND_HDA_INPUT_BEEP
	bool "Support digital beep via input layer"
	depends on INPUT=y || INPUT=SND_HDA
	help
	  Say Y here to build a digital beep interface for HD-audio
	  driver. This interface is used to generate digital beeps.

config SND_HDA_INPUT_BEEP_MODE
	int "Digital beep registration mode (0=off, 1=on)"
	depends on SND_HDA_INPUT_BEEP=y
	default "1"
	range 0 1
	help
	  Set 0 to disable the digital beep interface for HD-audio by default.
	  Set 1 to always enable the digital beep interface for HD-audio by
	  default.

config SND_HDA_PATCH_LOADER
	bool "Support initialization patch loading for HD-audio"
	select FW_LOADER
	select SND_HDA_RECONFIG
	help
	  Say Y here to allow the HD-audio driver to load a pseudo
	  firmware file ("patch") for overriding the BIOS setup at
	  start up.  The "patch" file can be specified via patch module
	  option, such as patch=hda-init.

config SND_HDA_POWER_SAVE_DEFAULT
	int "Default time-out for HD-audio power-save mode"
	depends on PM
	default 0
	help
	  The default time-out value in seconds for HD-audio automatic
	  power-save mode.  0 means to disable the power-save mode.

config SND_HDA_CTL_DEV_ID
	bool "Use the device identifier field for controls"
	depends on SND_HDA_INTEL
	help
	  Say Y to use the device identifier field for (mixer)
	  controls (old behaviour until this option is available).

	  When enabled, the multiple HDA codecs may set the device
	  field in control (mixer) element identifiers. The use
	  of this field is not recommended and defined for mixer controls.

	  The old behaviour (Y) is obsolete and will be removed. Consider
	  to not enable this option.
endif
+13 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
snd-hda-codec-y := bind.o codec.o jack.o auto_parser.o sysfs.o
snd-hda-codec-y += controller.o
snd-hda-codec-$(CONFIG_SND_PROC_FS) += proc.o

snd-hda-codec-$(CONFIG_SND_HDA_HWDEP) += hwdep.o
snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += beep.o

# for trace-points
CFLAGS_controller.o := -I$(src)

# common driver
obj-$(CONFIG_SND_HDA) := snd-hda-codec.o
Loading