diff options
Diffstat (limited to 'sound/hda/codecs')
-rw-r--r-- | sound/hda/codecs/ca0132.c | 5 | ||||
-rw-r--r-- | sound/hda/codecs/cirrus/Kconfig | 29 | ||||
-rw-r--r-- | sound/hda/codecs/hdmi/Kconfig | 44 | ||||
-rw-r--r-- | sound/hda/codecs/hdmi/Makefile | 2 | ||||
-rw-r--r-- | sound/hda/codecs/realtek/Kconfig | 40 | ||||
-rw-r--r-- | sound/hda/codecs/realtek/alc269.c | 4 | ||||
-rw-r--r-- | sound/hda/codecs/side-codecs/cirrus_scodec_test.c | 2 | ||||
-rw-r--r-- | sound/hda/codecs/side-codecs/tas2781_hda.c | 47 | ||||
-rw-r--r-- | sound/hda/codecs/side-codecs/tas2781_hda.h | 2 | ||||
-rw-r--r-- | sound/hda/codecs/side-codecs/tas2781_hda_i2c.c | 2 |
10 files changed, 124 insertions, 53 deletions
diff --git a/sound/hda/codecs/ca0132.c b/sound/hda/codecs/ca0132.c index b716f721f25d..b7d456e16c93 100644 --- a/sound/hda/codecs/ca0132.c +++ b/sound/hda/codecs/ca0132.c @@ -4802,7 +4802,8 @@ static int ca0132_alt_select_out(struct hda_codec *codec) if (err < 0) goto exit; - if (ca0132_alt_select_out_quirk_set(codec) < 0) + err = ca0132_alt_select_out_quirk_set(codec); + if (err < 0) goto exit; switch (spec->cur_out_type) { @@ -4892,6 +4893,8 @@ static int ca0132_alt_select_out(struct hda_codec *codec) spec->bass_redirection_val); else err = ca0132_alt_surround_set_bass_redirection(codec, 0); + if (err < 0) + goto exit; /* Unmute DSP now that we're done with output selection. */ err = dspio_set_uint_param(codec, 0x96, diff --git a/sound/hda/codecs/cirrus/Kconfig b/sound/hda/codecs/cirrus/Kconfig index b3a5968e9a02..ec6cbcaf64f0 100644 --- a/sound/hda/codecs/cirrus/Kconfig +++ b/sound/hda/codecs/cirrus/Kconfig @@ -1,21 +1,32 @@ # SPDX-License-Identifier: GPL-2.0-only +menuconfig SND_HDA_CODEC_CIRRUS + tristate "Cirrus Logic HD-audio codec support" + help + Say Y or M here to include Cirrus Logic HD-audio codec support. + + This will enable both CS420x and CS421x HD-audio codec drivers + as default, but you can enable/disable each codec driver + individually, too (only when CONFIG_EXPERT is set). + +if SND_HDA_CODEC_CIRRUS + config SND_HDA_CODEC_CS420X - tristate "Build Cirrus Logic CS420x codec support" + tristate "Build Cirrus Logic CS420x codec support" if EXPERT select SND_HDA_GENERIC + default y help - Say Y or M here to include Cirrus Logic CS420x codec support in - snd-hda-intel driver + Say Y or M here to include Cirrus Logic CS420x codec support comment "Set to Y if you want auto-loading the codec driver" depends on SND_HDA=y && SND_HDA_CODEC_CS420X=m config SND_HDA_CODEC_CS421X - tristate "Build Cirrus Logic CS421x codec support" + tristate "Build Cirrus Logic CS421x codec support" if EXPERT select SND_HDA_GENERIC + default y help - Say Y or M here to include Cirrus Logic CS421x codec support in - snd-hda-intel driver + Say Y or M here to include Cirrus Logic CS421x codec support comment "Set to Y if you want auto-loading the codec driver" depends on SND_HDA=y && SND_HDA_CODEC_CS421X=m @@ -24,8 +35,10 @@ config SND_HDA_CODEC_CS8409 tristate "Build Cirrus Logic HDA bridge support" select SND_HDA_GENERIC help - Say Y or M here to include Cirrus Logic HDA bridge support in - snd-hda-intel driver, such as CS8409. + Say Y or M here to include Cirrus Logic HDA bridge support + such as CS8409. comment "Set to Y if you want auto-loading the codec driver" depends on SND_HDA=y && SND_HDA_CODEC_CS8409=m + +endif diff --git a/sound/hda/codecs/hdmi/Kconfig b/sound/hda/codecs/hdmi/Kconfig index 498000d2c6ae..6ea3553ba9f8 100644 --- a/sound/hda/codecs/hdmi/Kconfig +++ b/sound/hda/codecs/hdmi/Kconfig @@ -1,9 +1,21 @@ # SPDX-License-Identifier: GPL-2.0-only -config SND_HDA_CODEC_HDMI - tristate "Generic HDMI/DisplayPort HD-audio codec support" +menuconfig SND_HDA_CODEC_HDMI + tristate "HD-audio HDMI codec support" + help + Say Y or M here to include HD-audio HDMI/DislayPort codec support. + + This will enable all HDMI/DP codec drivers as default, but you can + enable/disable each codec driver individually, too (only when + CONFIG_EXPERT is set). + +if SND_HDA_CODEC_HDMI + +config SND_HDA_CODEC_HDMI_GENERIC + tristate "Generic HDMI/DisplayPort HD-audio codec support" if EXPERT select SND_DYNAMIC_MINORS select SND_PCM_ELD + default y help Say Y or M here to include Generic HDMI and DisplayPort HD-audio codec support. @@ -12,14 +24,16 @@ config SND_HDA_CODEC_HDMI to assure the multiple streams for DP-MST support. config SND_HDA_CODEC_HDMI_SIMPLE - tristate "Simple HDMI/DisplayPort HD-audio codec support" + tristate "Simple HDMI/DisplayPort HD-audio codec support" if EXPERT + default y help Say Y or M here to include Simple HDMI and DisplayPort HD-audio codec support for VIA and other codecs. config SND_HDA_CODEC_HDMI_INTEL - tristate "Intel HDMI/DisplayPort HD-audio codec support" - select SND_HDA_CODEC_HDMI + tristate "Intel HDMI/DisplayPort HD-audio codec support" if EXPERT + select SND_HDA_CODEC_HDMI_GENERIC + default y help Say Y or M here to include Intel graphics HDMI and DisplayPort HD-audio codec support. @@ -40,29 +54,35 @@ config SND_HDA_INTEL_HDMI_SILENT_STREAM are kept reserved both at transmitter and receiver. config SND_HDA_CODEC_HDMI_ATI - tristate "AMD/ATI HDMI/DisplayPort HD-audio codec support" - select SND_HDA_CODEC_HDMI + tristate "AMD/ATI HDMI/DisplayPort HD-audio codec support" if EXPERT + select SND_HDA_CODEC_HDMI_GENERIC + default y help Say Y or M here to include AMD/ATI graphics HDMI and DisplayPort HD-audio codec support. config SND_HDA_CODEC_HDMI_NVIDIA - tristate "Nvidia HDMI/DisplayPort HD-audio codec support" - select SND_HDA_CODEC_HDMI + tristate "Nvidia HDMI/DisplayPort HD-audio codec support" if EXPERT + select SND_HDA_CODEC_HDMI_GENERIC + default y help Say Y or M here to include HDMI and DisplayPort HD-audio codec support for the recent Nvidia graphics cards. config SND_HDA_CODEC_HDMI_NVIDIA_MCP - tristate "Legacy Nvidia HDMI/DisplayPort HD-audio codec support" + tristate "Legacy Nvidia HDMI/DisplayPort HD-audio codec support" if EXPERT select SND_HDA_CODEC_HDMI_SIMPLE + default y help Say Y or M here to include HDMI and DisplayPort HD-audio codec support for the legacy Nvidia graphics like MCP73, MCP67, MCP77/78. config SND_HDA_CODEC_HDMI_TEGRA - tristate "Nvidia Tegra HDMI/DisplayPort HD-audio codec support" - select SND_HDA_CODEC_HDMI + tristate "Nvidia Tegra HDMI/DisplayPort HD-audio codec support" if EXPERT + select SND_HDA_CODEC_HDMI_GENERIC + default y help Say Y or M here to include HDMI and DisplayPort HD-audio codec support for Nvidia Tegra. + +endif diff --git a/sound/hda/codecs/hdmi/Makefile b/sound/hda/codecs/hdmi/Makefile index c07a0a71b64f..0e49a9421e3b 100644 --- a/sound/hda/codecs/hdmi/Makefile +++ b/sound/hda/codecs/hdmi/Makefile @@ -9,7 +9,7 @@ snd-hda-codec-nvhdmi-y := nvhdmi.o snd-hda-codec-nvhdmi-mcp-y := nvhdmi-mcp.o snd-hda-codec-tegrahdmi-y := tegrahdmi.o -obj-$(CONFIG_SND_HDA_CODEC_HDMI) += snd-hda-codec-hdmi.o +obj-$(CONFIG_SND_HDA_CODEC_HDMI_GENERIC) += snd-hda-codec-hdmi.o obj-$(CONFIG_SND_HDA_CODEC_HDMI_SIMPLE) += snd-hda-codec-simplehdmi.o obj-$(CONFIG_SND_HDA_CODEC_HDMI_INTEL) += snd-hda-codec-intelhdmi.o obj-$(CONFIG_SND_HDA_CODEC_HDMI_ATI) += snd-hda-codec-atihdmi.o diff --git a/sound/hda/codecs/realtek/Kconfig b/sound/hda/codecs/realtek/Kconfig index 4b3ab28203b4..cdc6d9509a01 100644 --- a/sound/hda/codecs/realtek/Kconfig +++ b/sound/hda/codecs/realtek/Kconfig @@ -1,7 +1,13 @@ # SPDX-License-Identifier: GPL-2.0-only menuconfig SND_HDA_CODEC_REALTEK - bool "Realtek HD-audio codec support" + tristate "Realtek HD-audio codec support" + help + Say Y or M here to include Realtek HD-audio codec support. + + This will enable all Realtek HD-audio codec drivers as default, + but you can enable/disable each codec driver individually, too + (only when CONFIG_EXPERT is set). if SND_HDA_CODEC_REALTEK @@ -12,79 +18,87 @@ config SND_HDA_CODEC_REALTEK_LIB select SND_HDA_SCODEC_COMPONENT config SND_HDA_CODEC_ALC260 - tristate "Build Realtek ALC260 HD-audio codec support" + tristate "Build Realtek ALC260 HD-audio codec support" if EXPERT depends on INPUT select SND_HDA_CODEC_REALTEK_LIB + default y help Say Y or M here to include Realtek ALC260 HD-audio codec support config SND_HDA_CODEC_ALC262 - tristate "Build Realtek ALC262 HD-audio codec support" + tristate "Build Realtek ALC262 HD-audio codec support" if EXPERT depends on INPUT select SND_HDA_CODEC_REALTEK_LIB + default y help Say Y or M here to include Realtek ALC262 HD-audio codec support config SND_HDA_CODEC_ALC268 - tristate "Build Realtek ALC268 HD-audio codec support" + tristate "Build Realtek ALC268 HD-audio codec support" if EXPERT depends on INPUT select SND_HDA_CODEC_REALTEK_LIB + default y help Say Y or M here to include Realtek ALC268 and compatible HD-audio codec support config SND_HDA_CODEC_ALC269 - tristate "Build Realtek ALC269 HD-audio codecs support" + tristate "Build Realtek ALC269 HD-audio codecs support" if EXPERT depends on INPUT select SND_HDA_CODEC_REALTEK_LIB + default y help Say Y or M here to include Realtek ALC269 and compatible HD-audio codec support config SND_HDA_CODEC_ALC662 - tristate "Build Realtek ALC662 HD-audio codecs support" + tristate "Build Realtek ALC662 HD-audio codecs support" if EXPERT depends on INPUT select SND_HDA_CODEC_REALTEK_LIB + default y help Say Y or M here to include Realtek ALC662 and compatible HD-audio codec support config SND_HDA_CODEC_ALC680 - tristate "Build Realtek ALC680 HD-audio codecs support" + tristate "Build Realtek ALC680 HD-audio codecs support" if EXPERT depends on INPUT select SND_HDA_CODEC_REALTEK_LIB + default y help Say Y or M here to include Realtek ALC680 HD-audio codec support config SND_HDA_CODEC_ALC861 - tristate "Build Realtek ALC861 HD-audio codecs support" + tristate "Build Realtek ALC861 HD-audio codecs support" if EXPERT depends on INPUT select SND_HDA_CODEC_REALTEK_LIB + default y help Say Y or M here to include Realtek ALC861 HD-audio codec support config SND_HDA_CODEC_ALC861VD - tristate "Build Realtek ALC861-VD HD-audio codecs support" + tristate "Build Realtek ALC861-VD HD-audio codecs support" if EXPERT depends on INPUT select SND_HDA_CODEC_REALTEK_LIB + default y help Say Y or M here to include Realtek ALC861-VD HD-audio codec support config SND_HDA_CODEC_ALC880 - tristate "Build Realtek ALC880 HD-audio codecs support" + tristate "Build Realtek ALC880 HD-audio codecs support" if EXPERT depends on INPUT select SND_HDA_CODEC_REALTEK_LIB + default y help Say Y or M here to include Realtek ALC880 HD-audio codec support config SND_HDA_CODEC_ALC882 - tristate "Build Realtek ALC882 HD-audio codecs support" + tristate "Build Realtek ALC882 HD-audio codecs support" if EXPERT depends on INPUT select SND_HDA_CODEC_REALTEK_LIB + default y help Say Y or M here to include Realtek ALC882 and compatible HD-audio codec support endif - - diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c index 05019fa73297..e27a36e4e92a 100644 --- a/sound/hda/codecs/realtek/alc269.c +++ b/sound/hda/codecs/realtek/alc269.c @@ -6470,6 +6470,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8a0f, "HP Pavilion 14-ec1xxx", ALC287_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8a20, "HP Laptop 15s-fq5xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2), SND_PCI_QUIRK(0x103c, 0x8a25, "HP Victus 16-d1xxx (MB 8A25)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), + SND_PCI_QUIRK(0x103c, 0x8a26, "HP Victus 16-d1xxx (MB 8A26)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), SND_PCI_QUIRK(0x103c, 0x8a28, "HP Envy 13", ALC287_FIXUP_CS35L41_I2C_2), SND_PCI_QUIRK(0x103c, 0x8a29, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), SND_PCI_QUIRK(0x103c, 0x8a2a, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), @@ -6528,6 +6529,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8bbe, "HP Victus 16-r0xxx (MB 8BBE)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), SND_PCI_QUIRK(0x103c, 0x8bc8, "HP Victus 15-fa1xxx", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), SND_PCI_QUIRK(0x103c, 0x8bcd, "HP Omen 16-xd0xxx", ALC245_FIXUP_HP_MUTE_LED_V1_COEFBIT), + SND_PCI_QUIRK(0x103c, 0x8bd4, "HP Victus 16-s0xxx (MB 8BD4)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), SND_PCI_QUIRK(0x103c, 0x8bdd, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), SND_PCI_QUIRK(0x103c, 0x8bde, "HP Envy 17", ALC287_FIXUP_CS35L41_I2C_2), SND_PCI_QUIRK(0x103c, 0x8bdf, "HP Envy 15", ALC287_FIXUP_CS35L41_I2C_2), @@ -6580,6 +6582,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x103c, 0x8c91, "HP EliteBook 660", ALC236_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8c96, "HP", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), SND_PCI_QUIRK(0x103c, 0x8c97, "HP ZBook", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF), + SND_PCI_QUIRK(0x103c, 0x8c99, "HP Victus 16-r1xxx (MB 8C99)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), SND_PCI_QUIRK(0x103c, 0x8c9c, "HP Victus 16-s1xxx (MB 8C9C)", ALC245_FIXUP_HP_MUTE_LED_COEFBIT), SND_PCI_QUIRK(0x103c, 0x8ca1, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED), SND_PCI_QUIRK(0x103c, 0x8ca2, "HP ZBook Power", ALC236_FIXUP_HP_GPIO_LED), @@ -7107,6 +7110,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x1854, 0x0440, "LG CQ6", ALC256_FIXUP_HEADPHONE_AMP_VOL), SND_PCI_QUIRK(0x1854, 0x0441, "LG CQ6 AIO", ALC256_FIXUP_HEADPHONE_AMP_VOL), SND_PCI_QUIRK(0x1854, 0x0488, "LG gram 16 (16Z90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), + SND_PCI_QUIRK(0x1854, 0x0489, "LG gram 16 (16Z90R-A)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), SND_PCI_QUIRK(0x1854, 0x048a, "LG gram 17 (17ZD90R)", ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS), SND_PCI_QUIRK(0x19e5, 0x3204, "Huawei MACH-WX9", ALC256_FIXUP_HUAWEI_MACH_WX9_PINS), SND_PCI_QUIRK(0x19e5, 0x320f, "Huawei WRT-WX9 ", ALC256_FIXUP_ASUS_MIC_NO_PRESENCE), diff --git a/sound/hda/codecs/side-codecs/cirrus_scodec_test.c b/sound/hda/codecs/side-codecs/cirrus_scodec_test.c index 93b9cbf1f08a..9ba14c09c07f 100644 --- a/sound/hda/codecs/side-codecs/cirrus_scodec_test.c +++ b/sound/hda/codecs/side-codecs/cirrus_scodec_test.c @@ -86,7 +86,7 @@ static const struct gpio_chip cirrus_scodec_test_gpio_chip = { .direction_input = cirrus_scodec_test_gpio_direction_in, .get = cirrus_scodec_test_gpio_get, .direction_output = cirrus_scodec_test_gpio_direction_out, - .set_rv = cirrus_scodec_test_gpio_set, + .set = cirrus_scodec_test_gpio_set, .set_config = cirrus_scodec_test_gpio_set_config, .base = -1, .ngpio = 32, diff --git a/sound/hda/codecs/side-codecs/tas2781_hda.c b/sound/hda/codecs/side-codecs/tas2781_hda.c index 34217ce9f28e..f46d2e06c64f 100644 --- a/sound/hda/codecs/side-codecs/tas2781_hda.c +++ b/sound/hda/codecs/side-codecs/tas2781_hda.c @@ -18,6 +18,8 @@ #include "tas2781_hda.h" +#define CALIBRATION_DATA_AREA_NUM 2 + const efi_guid_t tasdev_fct_efi_guid[] = { /* DELL */ EFI_GUID(0xcc92382d, 0x6337, 0x41cb, 0xa8, 0x8b, 0x8e, 0xce, 0x74, @@ -160,36 +162,51 @@ int tas2781_save_calibration(struct tas2781_hda *hda) * manufactory. */ efi_guid_t efi_guid = tasdev_fct_efi_guid[LENOVO]; - static efi_char16_t efi_name[] = TASDEVICE_CALIBRATION_DATA_NAME; + /* + * Some devices save the calibrated data into L"CALI_DATA", + * and others into L"SmartAmpCalibrationData". + */ + static efi_char16_t *efi_name[CALIBRATION_DATA_AREA_NUM] = { + L"CALI_DATA", + L"SmartAmpCalibrationData", + }; struct tasdevice_priv *p = hda->priv; struct calidata *cali_data = &p->cali_data; unsigned long total_sz = 0; unsigned int attr, size; unsigned char *data; efi_status_t status; + int i; if (hda->catlog_id < LENOVO) efi_guid = tasdev_fct_efi_guid[hda->catlog_id]; cali_data->cali_dat_sz_per_dev = 20; size = p->ndev * (cali_data->cali_dat_sz_per_dev + 1); - /* Get real size of UEFI variable */ - status = efi.get_variable(efi_name, &efi_guid, &attr, &total_sz, NULL); - cali_data->total_sz = total_sz > size ? total_sz : size; - if (status == EFI_BUFFER_TOO_SMALL) { - /* Allocate data buffer of data_size bytes */ - data = p->cali_data.data = devm_kzalloc(p->dev, - p->cali_data.total_sz, GFP_KERNEL); - if (!data) { - p->cali_data.total_sz = 0; - return -ENOMEM; + for (i = 0; i < CALIBRATION_DATA_AREA_NUM; i++) { + /* Get real size of UEFI variable */ + status = efi.get_variable(efi_name[i], &efi_guid, &attr, + &total_sz, NULL); + cali_data->total_sz = total_sz > size ? total_sz : size; + if (status == EFI_BUFFER_TOO_SMALL) { + /* Allocate data buffer of data_size bytes */ + data = cali_data->data = devm_kzalloc(p->dev, + cali_data->total_sz, GFP_KERNEL); + if (!data) { + status = -ENOMEM; + continue; + } + /* Get variable contents into buffer */ + status = efi.get_variable(efi_name[i], &efi_guid, + &attr, &cali_data->total_sz, data); } - /* Get variable contents into buffer */ - status = efi.get_variable(efi_name, &efi_guid, &attr, - &p->cali_data.total_sz, data); + /* Check whether get the calibrated data */ + if (status == EFI_SUCCESS) + break; } + if (status != EFI_SUCCESS) { - p->cali_data.total_sz = 0; + cali_data->total_sz = 0; return status; } diff --git a/sound/hda/codecs/side-codecs/tas2781_hda.h b/sound/hda/codecs/side-codecs/tas2781_hda.h index 575a701c8dfb..66188909a0bb 100644 --- a/sound/hda/codecs/side-codecs/tas2781_hda.h +++ b/sound/hda/codecs/side-codecs/tas2781_hda.h @@ -11,7 +11,7 @@ /* Flag of calibration registers address. */ #define TASDEV_UEFI_CALI_REG_ADDR_FLG BIT(7) -#define TASDEVICE_CALIBRATION_DATA_NAME L"CALI_DATA" + #define TASDEV_CALIB_N 5 /* diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c index a0b132681804..45ac5e41bd4f 100644 --- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c +++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c @@ -260,7 +260,7 @@ static const struct snd_kcontrol_new tas2770_snd_controls[] = { 0, 0, 20, 0, tas2781_amp_getvol, tas2781_amp_putvol, tas2770_amp_tlv), ACARD_SINGLE_RANGE_EXT_TLV("Speaker Digital Volume", TAS2770_DVC_LEVEL, - 0, 0, 31, 0, tas2781_amp_getvol, + 0, 0, 200, 1, tas2781_amp_getvol, tas2781_amp_putvol, tas2770_dvc_tlv), }; |