mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-25 23:02:51 -04:00
Create debugfs files that can be used to perform factory calibration. During manufacture, the production line must perform a factory calibration of the amps. This commit adds this functionality via debugfs files. As this is only needed during manufacture, there is no need for this to be available in a normal system so a Kconfig item has been added to enable this. The new Kconfig option is inside a sub-menu because items do not group and indent if the parent is invisible or there are multiple parent dependencies. Anyway the sub-menu reduces the clutter. cs35l56_hda_apply_calibration() has been changed to return an error code that can be reported back through the debugfs write. The original call to this function doesn't check the return code because in normal use it doesn't matter whether this fails - the firmware will default to a safe calibration for the platform. But tooling using the debugfs files might want to know if there was an error. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20251021105022.1013685-6-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
144 lines
3.9 KiB
Plaintext
144 lines
3.9 KiB
Plaintext
config SND_HDA_CIRRUS_SCODEC
|
|
tristate
|
|
|
|
config SND_HDA_CIRRUS_SCODEC_KUNIT_TEST
|
|
tristate "KUnit test for Cirrus side-codec library" if !KUNIT_ALL_TESTS
|
|
depends on SND_HDA_CIRRUS_SCODEC && GPIOLIB && KUNIT
|
|
default KUNIT_ALL_TESTS
|
|
help
|
|
This builds KUnit tests for the cirrus side-codec library.
|
|
For more information on KUnit and unit tests in general,
|
|
please refer to the KUnit documentation in
|
|
Documentation/dev-tools/kunit/.
|
|
If in doubt, say "N".
|
|
|
|
config SND_HDA_SCODEC_CS35L41
|
|
tristate
|
|
select SND_HDA_GENERIC
|
|
select REGMAP_IRQ
|
|
select FW_CS_DSP
|
|
|
|
config SND_HDA_SCODEC_COMPONENT
|
|
tristate
|
|
|
|
config SND_HDA_SCODEC_CS35L41_I2C
|
|
tristate "Build CS35L41 HD-audio side codec support for I2C Bus"
|
|
depends on I2C
|
|
depends on ACPI
|
|
depends on EFI
|
|
depends on SND_SOC
|
|
select SND_SOC_CS35L41_LIB
|
|
select SND_HDA_SCODEC_CS35L41
|
|
select SND_SOC_CS_AMP_LIB
|
|
help
|
|
Say Y or M here to include CS35L41 I2C HD-audio side codec support
|
|
in snd-hda-intel driver, such as ALC287.
|
|
|
|
comment "Set to Y if you want auto-loading the side codec driver"
|
|
depends on SND_HDA=y && SND_HDA_SCODEC_CS35L41_I2C=m
|
|
|
|
config SND_HDA_SCODEC_CS35L41_SPI
|
|
tristate "Build CS35L41 HD-audio codec support for SPI Bus"
|
|
depends on SPI_MASTER
|
|
depends on ACPI
|
|
depends on EFI
|
|
depends on SND_SOC
|
|
select SND_SOC_CS35L41_LIB
|
|
select SND_HDA_SCODEC_CS35L41
|
|
select SND_SOC_CS_AMP_LIB
|
|
help
|
|
Say Y or M here to include CS35L41 SPI HD-audio side codec support
|
|
in snd-hda-intel driver, such as ALC287.
|
|
|
|
comment "Set to Y if you want auto-loading the side codec driver"
|
|
depends on SND_HDA=y && SND_HDA_SCODEC_CS35L41_SPI=m
|
|
|
|
config SND_HDA_SCODEC_CS35L56
|
|
tristate
|
|
|
|
config SND_HDA_SCODEC_CS35L56_I2C
|
|
tristate "Build CS35L56 HD-audio side codec support for I2C Bus"
|
|
depends on I2C
|
|
depends on ACPI
|
|
depends on SND_SOC
|
|
select FW_CS_DSP
|
|
imply SERIAL_MULTI_INSTANTIATE
|
|
select SND_HDA_GENERIC
|
|
select SND_SOC_CS35L56_SHARED
|
|
select SND_HDA_SCODEC_CS35L56
|
|
select SND_HDA_CIRRUS_SCODEC
|
|
select SND_SOC_CS_AMP_LIB
|
|
help
|
|
Say Y or M here to include CS35L56 amplifier support with
|
|
I2C control.
|
|
|
|
config SND_HDA_SCODEC_CS35L56_SPI
|
|
tristate "Build CS35L56 HD-audio side codec support for SPI Bus"
|
|
depends on SPI_MASTER
|
|
depends on ACPI
|
|
depends on SND_SOC
|
|
select FW_CS_DSP
|
|
imply SERIAL_MULTI_INSTANTIATE
|
|
select SND_HDA_GENERIC
|
|
select SND_SOC_CS35L56_SHARED
|
|
select SND_HDA_SCODEC_CS35L56
|
|
select SND_HDA_CIRRUS_SCODEC
|
|
select SND_SOC_CS_AMP_LIB
|
|
help
|
|
Say Y or M here to include CS35L56 amplifier support with
|
|
SPI control.
|
|
|
|
menu "CS35L56 driver options"
|
|
depends on SND_HDA_SCODEC_CS35L56
|
|
|
|
config SND_HDA_SCODEC_CS35L56_CAL_DEBUGFS
|
|
bool "CS35L56 create debugfs for factory calibration"
|
|
default N
|
|
depends on DEBUG_FS
|
|
select SND_SOC_CS35L56_CAL_DEBUGFS_COMMON
|
|
help
|
|
Create debugfs entries used during factory-line manufacture
|
|
for factory calibration.
|
|
|
|
If unsure select "N".
|
|
endmenu
|
|
|
|
config SND_HDA_SCODEC_TAS2781
|
|
tristate
|
|
select SND_HDA_GENERIC
|
|
|
|
config SND_HDA_SCODEC_TAS2781_I2C
|
|
tristate "Build TAS2781 HD-audio side codec support for I2C Bus"
|
|
depends on I2C
|
|
depends on ACPI
|
|
depends on EFI
|
|
depends on SND_SOC
|
|
select SND_HDA_SCODEC_TAS2781
|
|
select SND_SOC_TAS2781_COMLIB_I2C
|
|
select SND_SOC_TAS2781_FMWLIB
|
|
select CRC32
|
|
help
|
|
Say Y or M here to include TAS2781 I2C HD-audio side codec support
|
|
in snd-hda-intel driver, such as ALC287.
|
|
|
|
comment "Set to Y if you want auto-loading the side codec driver"
|
|
depends on SND_HDA=y && SND_HDA_SCODEC_TAS2781_I2C=m
|
|
|
|
config SND_HDA_SCODEC_TAS2781_SPI
|
|
tristate "Build TAS2781 HD-audio side codec support for SPI Bus"
|
|
depends on SPI_MASTER
|
|
depends on ACPI
|
|
depends on EFI
|
|
depends on SND_SOC
|
|
select SND_HDA_SCODEC_TAS2781
|
|
select SND_SOC_TAS2781_COMLIB
|
|
select SND_SOC_TAS2781_FMWLIB
|
|
select CRC8
|
|
select CRC32
|
|
help
|
|
Say Y or M here to include TAS2781 SPI HD-audio side codec support
|
|
in snd-hda-intel driver, such as ALC287.
|
|
|
|
comment "Set to Y if you want auto-loading the side codec driver"
|
|
depends on SND_HDA=y && SND_HDA_SCODEC_TAS2781_SPI=m
|