summaryrefslogtreecommitdiff
path: root/sound/hda
diff options
context:
space:
mode:
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/codecs/ca0132.c5
-rw-r--r--sound/hda/codecs/cirrus/Kconfig20
-rw-r--r--sound/hda/codecs/hdmi/Kconfig20
-rw-r--r--sound/hda/codecs/realtek/Kconfig28
-rw-r--r--sound/hda/codecs/realtek/alc269.c1
-rw-r--r--sound/hda/codecs/side-codecs/cirrus_scodec_test.c2
-rw-r--r--sound/hda/codecs/side-codecs/tas2781_hda.c47
-rw-r--r--sound/hda/codecs/side-codecs/tas2781_hda.h2
8 files changed, 80 insertions, 45 deletions
diff --git a/sound/hda/codecs/ca0132.c b/sound/hda/codecs/ca0132.c
index b716f721f25d6..b7d456e16c93f 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 33cfe52713bc9..ec6cbcaf64f0e 100644
--- a/sound/hda/codecs/cirrus/Kconfig
+++ b/sound/hda/codecs/cirrus/Kconfig
@@ -2,27 +2,31 @@
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
@@ -31,8 +35,8 @@ 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
diff --git a/sound/hda/codecs/hdmi/Kconfig b/sound/hda/codecs/hdmi/Kconfig
index 973ca4ca077bd..6ea3553ba9f85 100644
--- a/sound/hda/codecs/hdmi/Kconfig
+++ b/sound/hda/codecs/hdmi/Kconfig
@@ -2,11 +2,17 @@
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"
+ tristate "Generic HDMI/DisplayPort HD-audio codec support" if EXPERT
select SND_DYNAMIC_MINORS
select SND_PCM_ELD
default y
@@ -18,14 +24,14 @@ config SND_HDA_CODEC_HDMI_GENERIC
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"
+ tristate "Intel HDMI/DisplayPort HD-audio codec support" if EXPERT
select SND_HDA_CODEC_HDMI_GENERIC
default y
help
@@ -48,7 +54,7 @@ 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"
+ tristate "AMD/ATI HDMI/DisplayPort HD-audio codec support" if EXPERT
select SND_HDA_CODEC_HDMI_GENERIC
default y
help
@@ -56,7 +62,7 @@ config SND_HDA_CODEC_HDMI_ATI
HD-audio codec support.
config SND_HDA_CODEC_HDMI_NVIDIA
- tristate "Nvidia HDMI/DisplayPort HD-audio codec support"
+ tristate "Nvidia HDMI/DisplayPort HD-audio codec support" if EXPERT
select SND_HDA_CODEC_HDMI_GENERIC
default y
help
@@ -64,7 +70,7 @@ config SND_HDA_CODEC_HDMI_NVIDIA
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
@@ -72,7 +78,7 @@ config SND_HDA_CODEC_HDMI_NVIDIA_MCP
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"
+ tristate "Nvidia Tegra HDMI/DisplayPort HD-audio codec support" if EXPERT
select SND_HDA_CODEC_HDMI_GENERIC
default y
help
diff --git a/sound/hda/codecs/realtek/Kconfig b/sound/hda/codecs/realtek/Kconfig
index 20899f3fc0514..cdc6d9509a01a 100644
--- a/sound/hda/codecs/realtek/Kconfig
+++ b/sound/hda/codecs/realtek/Kconfig
@@ -2,6 +2,12 @@
menuconfig SND_HDA_CODEC_REALTEK
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,7 +18,7 @@ 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
@@ -20,7 +26,7 @@ config SND_HDA_CODEC_ALC260
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
@@ -28,7 +34,7 @@ config SND_HDA_CODEC_ALC262
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
@@ -37,7 +43,7 @@ config SND_HDA_CODEC_ALC268
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
@@ -46,7 +52,7 @@ config SND_HDA_CODEC_ALC269
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
@@ -55,7 +61,7 @@ config SND_HDA_CODEC_ALC662
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
@@ -63,7 +69,7 @@ config SND_HDA_CODEC_ALC680
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
@@ -71,7 +77,7 @@ config SND_HDA_CODEC_ALC861
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
@@ -79,7 +85,7 @@ config SND_HDA_CODEC_ALC861VD
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
@@ -87,7 +93,7 @@ config SND_HDA_CODEC_ALC880
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
@@ -96,5 +102,3 @@ config SND_HDA_CODEC_ALC882
codec support
endif
-
-
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 2554b42eeb0fe..e27a36e4e92a5 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7110,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 93b9cbf1f08ad..9ba14c09c07ff 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 34217ce9f28e8..f46d2e06c64f3 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 575a701c8dfb8..66188909a0bb6 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
/*