From ef30b65009f6bb3e7cdd60260f1a0700af4090c6 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Wed, 27 Dec 2023 00:09:35 +0100 Subject: kernel 6.6.8 --- SOURCES/Patchlist.changelog | 9 + SOURCES/asus-linux.patch | 343 +++++---- ...-the-backlight-brightness-level-on-resume.patch | 275 -------- SOURCES/kernel-aarch64-16k-debug-fedora.config | 15 +- SOURCES/kernel-aarch64-16k-fedora.config | 15 +- SOURCES/kernel-aarch64-debug-fedora.config | 15 +- SOURCES/kernel-aarch64-fedora.config | 15 +- SOURCES/kernel-ppc64le-debug-fedora.config | 21 - SOURCES/kernel-ppc64le-fedora.config | 21 - SOURCES/kernel-s390x-debug-fedora.config | 21 - SOURCES/kernel-s390x-fedora.config | 21 - SOURCES/kernel-x86_64-debug-fedora.config | 21 - SOURCES/kernel-x86_64-fedora.config | 21 - SOURCES/patch-6.6-redhat.patch | 768 ++++++++++++++++++++- ...sable-USB0-hub-on-ROG-Ally-before-suspend.patch | 147 ---- SOURCES/rog-ally-audio-fix.patch | 24 +- SOURCES/steamdeck-oled-hw-quirks.patch | 28 - 17 files changed, 991 insertions(+), 789 deletions(-) delete mode 100644 SOURCES/hid-asus-reset-the-backlight-brightness-level-on-resume.patch delete mode 100644 SOURCES/platform-x86-asus-wmi-disable-USB0-hub-on-ROG-Ally-before-suspend.patch (limited to 'SOURCES') diff --git a/SOURCES/Patchlist.changelog b/SOURCES/Patchlist.changelog index f8e12a3..0d8e46a 100644 --- a/SOURCES/Patchlist.changelog +++ b/SOURCES/Patchlist.changelog @@ -1,3 +1,12 @@ +"https://gitlab.com/cki-project/kernel-ark/-/commit"/becca34be9cd8577a101032917438af982aa7d29 + becca34be9cd8577a101032917438af982aa7d29 ALSA: hda: cs35l41: Add notification support into component binding + +"https://gitlab.com/cki-project/kernel-ark/-/commit"/2fa4b6a18ce384be968eda55c9cb12a6bb5cb4ca + 2fa4b6a18ce384be968eda55c9cb12a6bb5cb4ca ALSA: hda: cs35l41: Support mute notifications for CS35L41 HDA + +"https://gitlab.com/cki-project/kernel-ark/-/commit"/0181cc27d637d9f2606dbf33fac4ddf5a64162ca + 0181cc27d637d9f2606dbf33fac4ddf5a64162ca Add support for various laptops using CS35L41 HDA without _DSD + "https://gitlab.com/cki-project/kernel-ark/-/commit"/ed5f19c3892cc5dcfe95dd4d296c5e617a26c821 ed5f19c3892cc5dcfe95dd4d296c5e617a26c821 Revert "netfilter: nf_tables: remove catchall element in GC sync path" diff --git a/SOURCES/asus-linux.patch b/SOURCES/asus-linux.patch index d57ace0..e196e8f 100644 --- a/SOURCES/asus-linux.patch +++ b/SOURCES/asus-linux.patch @@ -1,115 +1,3 @@ -From 76556b655f7b50afe5c58006f44221900e5711a9 Mon Sep 17 00:00:00 2001 -From: "Luke D. Jones" -Date: Wed, 23 Aug 2023 11:05:59 +1200 -Subject: [PATCH v2] ALSA: hda: cs35l41: Support ASUS 2023 laptops with missing - DSD - -Support adding the missing DSD properties required for ASUS ROG 2023 -laptops and other ASUS laptops to properly utilise the cs35l41. - -The currently added laptops are: -- ASUS GS650P, i2c -- ASUS GA402X, i2c -- ASUS GU604V, spi -- ASUS GU603V, spi -- ASUS GV601V, spi -- ASUS GZ301V, spi -- ASUS ROG ALLY, i2c -- ASUS G614J, spi -- ASUS G634J, spi -- ASUS G614JI, spi -- ASUS G713P, i2c -- ASUS H7604JV, spi - -The SPI connected amps may be required to use an external DSD patch -to fix or add the "cs-gpios" property. - -Co-developed-by: Jonathan LoBue -Signed-off-by: Jonathan LoBue -Co-developed-by: Luke D. Jones -Signed-off-by: Luke D. Jones ---- - sound/pci/hda/cs35l41_hda_property.c | 57 ++++++++++++++++++++++++++++ - 1 file changed, 57 insertions(+) - -diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c -index c83328971728..de0802859849 100644 ---- a/sound/pci/hda/cs35l41_hda_property.c -+++ b/sound/pci/hda/cs35l41_hda_property.c -@@ -76,6 +76,49 @@ static int hp_vision_acpi_fix(struct cs35l41_hda *cs35l41, struct device *physde - hw_cfg->bst_ind = 1000; - hw_cfg->bst_ipk = 4500; - hw_cfg->bst_cap = 24; -+ -+ hw_cfg->valid = true; -+ -+ return 0; -+} -+ -+/* -+ * The CSC3551 is used in almost the entire ROG laptop range in 2023, this is likely to -+ * also include many non ROG labelled laptops. It is also used with either I2C connection or -+ * SPI connection. The SPI connected versions may be missing a chip select GPIO and require -+ * an DSD table patch. -+ */ -+static int asus_rog_2023_no_acpi(struct cs35l41_hda *cs35l41, struct device *physdev, int id, -+ const char *hid) -+{ -+ struct cs35l41_hw_cfg *hw_cfg = &cs35l41->hw_cfg; -+ int reset_gpio = 0; -+ int spkr_gpio = 2; -+ -+ /* check SPI or I2C address to assign the index */ -+ cs35l41->index = (id == 0 || id == 0x40) ? 0 : 1; -+ cs35l41->channel_index = 0; -+ hw_cfg->spk_pos = cs35l41->index; -+ hw_cfg->bst_type = CS35L41_EXT_BOOST; -+ hw_cfg->gpio1.func = CS35l41_VSPK_SWITCH; -+ hw_cfg->gpio1.valid = true; -+ hw_cfg->gpio2.func = CS35L41_INTERRUPT; -+ hw_cfg->gpio2.valid = true; -+ -+ if (strcmp(cs35l41->acpi_subsystem_id, "10431483") == 0) -+ spkr_gpio = 1; -+ cs35l41->speaker_id = cs35l41_get_speaker_id(physdev, 0, 0, spkr_gpio); -+ -+ if (strcmp(cs35l41->acpi_subsystem_id, "10431473") == 0 -+ || strcmp(cs35l41->acpi_subsystem_id, "10431483") == 0 -+ || strcmp(cs35l41->acpi_subsystem_id, "10431493") == 0 -+ || strcmp(cs35l41->acpi_subsystem_id, "10431CAF") == 0 -+ || strcmp(cs35l41->acpi_subsystem_id, "10431CCF") == 0 -+ || strcmp(cs35l41->acpi_subsystem_id, "10431E02") == 0) { -+ reset_gpio = 1; -+ } -+ cs35l41->reset_gpio = gpiod_get_index(physdev, NULL, reset_gpio, GPIOD_OUT_HIGH); -+ - hw_cfg->valid = true; - - return 0; -@@ -92,6 +135,20 @@ static const struct cs35l41_prop_model cs35l41_prop_model_table[] = { - { "CLSA0100", NULL, lenovo_legion_no_acpi }, - { "CLSA0101", NULL, lenovo_legion_no_acpi }, - { "CSC3551", "103C89C6", hp_vision_acpi_fix }, -+ { "CSC3551", "10431433", asus_rog_2023_no_acpi }, // GS650P i2c -+ { "CSC3551", "10431463", asus_rog_2023_no_acpi }, // GA402X/N i2c, rst=0 -+ { "CSC3551", "10431473", asus_rog_2023_no_acpi }, // GU604V spi, rst=1 -+ { "CSC3551", "10431483", asus_rog_2023_no_acpi }, // GU603V spi, rst=1, spkr=1 -+ { "CSC3551", "10431493", asus_rog_2023_no_acpi }, // GV601V spi, rst=1 -+ { "CSC3551", "10431573", asus_rog_2023_no_acpi }, // GZ301V spi, rst=0 -+ { "CSC3551", "104317F3", asus_rog_2023_no_acpi }, // ROG ALLY i2c, rst=0 -+ { "CSC3551", "10431B93", asus_rog_2023_no_acpi }, // G614J spi, rst=0 -+ { "CSC3551", "10431C9F", asus_rog_2023_no_acpi }, // G614JI spi, rst=0 -+ { "CSC3551", "10431CAF", asus_rog_2023_no_acpi }, // G634J spi, rst=1 -+ { "CSC3551", "10431CCF", asus_rog_2023_no_acpi }, // G814J spi, rst=1 -+ { "CSC3551", "10431D1F", asus_rog_2023_no_acpi }, // G713P i2c, rst=0 -+ { "CSC3551", "10431E02", asus_rog_2023_no_acpi }, // UX3042Z spi, rst=1 -+ { "CSC3551", "10431F1F", asus_rog_2023_no_acpi }, // H7604JV spi, rst=0 - {} - }; - --- -2.41.0 - From b35a4c957b3f0e5b4c7c73dec4fe3a5b9dbc4873 Mon Sep 17 00:00:00 2001 From: "Luke D. Jones" Date: Sun, 30 Apr 2023 10:56:34 +1200 @@ -157,26 +45,26 @@ index f54178d6f780..0b13be703856 100644 @@ -127,6 +128,10 @@ module_param(fnlock_default, bool, 0444); #define NVIDIA_TEMP_MIN 75 #define NVIDIA_TEMP_MAX 87 - + +#define ASUS_SCREENPAD_BRIGHT_MIN 20 +#define ASUS_SCREENPAD_BRIGHT_MAX 255 +#define ASUS_SCREENPAD_BRIGHT_DEFAULT 60 + static const char * const ashs_ids[] = { "ATK4001", "ATK4002", NULL }; - + static int throttle_thermal_policy_write(struct asus_wmi *); @@ -212,6 +217,7 @@ struct asus_wmi { - + struct input_dev *inputdev; struct backlight_device *backlight_device; + struct backlight_device *screenpad_backlight_device; struct platform_device *platform_device; - + struct led_classdev wlan_led; @@ -3776,6 +3782,124 @@ static int is_display_toggle(int code) return 0; } - + +/* Screenpad backlight *******************************************************/ + +static int read_screenpad_backlight_power(struct asus_wmi *asus) @@ -296,12 +184,12 @@ index f54178d6f780..0b13be703856 100644 +} + /* Fn-lock ********************************************************************/ - + static bool asus_wmi_has_fnlock_key(struct asus_wmi *asus) @@ -4431,6 +4555,12 @@ static int asus_wmi_add(struct platform_device *pdev) } else if (asus->driver->quirks->wmi_backlight_set_devstate) err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, 2, NULL); - + + if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_SCREENPAD_LIGHT)) { + err = asus_screenpad_init(asus); + if (err && err != -ENODEV) @@ -338,7 +226,7 @@ index a478ebfd34df..5fbdd0eafa02 100644 int panel_power; + int screenpad_brightness; int wlan_ctrl_by_user; - + const char *name; diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h index 16e99a1c37fc..63e630276499 100644 @@ -354,37 +242,188 @@ index 16e99a1c37fc..63e630276499 100644 +#define ASUS_WMI_DEVID_SCREENPAD_LIGHT 0x00050032 #define ASUS_WMI_DEVID_FAN_BOOST_MODE 0x00110018 #define ASUS_WMI_DEVID_THROTTLE_THERMAL_POLICY 0x00120075 - --- + +-- 2.41.0 -From 7760e10674dbb9127450629308c6ee1c35d5fc19 Mon Sep 17 00:00:00 2001 -From: "Luke D. Jones" -Date: Thu, 9 Nov 2023 09:41:13 +1300 -Subject: [PATCH] ALSA: hda/realtek: Add quirk for ASUS ROG G814Jx - -Adds the required quirk to enable the Cirrus amp and correct pins -on the ASUS ROG G814J series which uses an SPI connected Cirrus amp. - -While this works if the related _DSD properties are made available, these -aren't included in the ACPI of these laptops (yet). - -Signed-off-by: Luke D. Jones ---- - sound/pci/hda/patch_realtek.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c -index 58006c8bcfb9..a690baa202c5 100644 ---- a/sound/pci/hda/patch_realtek.c -+++ b/sound/pci/hda/patch_realtek.c -@@ -9924,6 +9924,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { - SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JI", ALC285_FIXUP_ASUS_HEADSET_MIC), - SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), - SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), -+ SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JI", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), - SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS ROG Strix G17 2023 (G713PV)", ALC287_FIXUP_CS35L41_I2C_2), - SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401), - SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE), --- -2.41.0 +diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_client.c b/drivers/hid/amd-sfh-hid/amd_sfh_client.c +index bdb578e0899f..f98a02eee783 100644 +--- a/drivers/hid/amd-sfh-hid/amd_sfh_client.c ++++ b/drivers/hid/amd-sfh-hid/amd_sfh_client.c +@@ -146,6 +146,8 @@ static const char *get_sensor_name(int idx) + return "gyroscope"; + case mag_idx: + return "magnetometer"; ++ case tms_idx: ++ return "tablet-mode-switch"; + case als_idx: + case ACS_IDX: /* ambient color sensor */ + return "ALS"; +diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_hid.h b/drivers/hid/amd-sfh-hid/amd_sfh_hid.h +index 97296f587bc7..cea7ec6f6288 100644 +--- a/drivers/hid/amd-sfh-hid/amd_sfh_hid.h ++++ b/drivers/hid/amd-sfh-hid/amd_sfh_hid.h +@@ -11,7 +11,7 @@ + #ifndef AMDSFH_HID_H + #define AMDSFH_HID_H + +-#define MAX_HID_DEVICES 6 ++#define MAX_HID_DEVICES 7 + #define AMD_SFH_HID_VENDOR 0x1022 + #define AMD_SFH_HID_PRODUCT 0x0001 + +diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +index 2530fa98b568..af5b37a62b10 100644 +--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c ++++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +@@ -27,6 +27,7 @@ + #define ACEL_EN BIT(0) + #define GYRO_EN BIT(1) + #define MAGNO_EN BIT(2) ++#define TMS_EN BIT(15) + #define HPD_EN BIT(16) + #define ALS_EN BIT(19) + #define ACS_EN BIT(22) +@@ -228,6 +229,9 @@ int amd_mp2_get_sensor_num(struct amd_mp2_dev *privdata, u8 *sensor_id) + if (MAGNO_EN & activestatus) + sensor_id[num_of_sensors++] = mag_idx; + ++ if (TMS_EN & activestatus) ++ sensor_id[num_of_sensors++] = tms_idx; ++ + if (ALS_EN & activestatus) + sensor_id[num_of_sensors++] = als_idx; + +diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h +index 70add75fc506..60130ad846a4 100644 +--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h ++++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h +@@ -79,6 +79,7 @@ enum sensor_idx { + accel_idx = 0, + gyro_idx = 1, + mag_idx = 2, ++ tms_idx = 15, + als_idx = 19 + }; + +diff --git a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c +index 8716a05950c8..b6725e8daf0c 100644 +--- a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c ++++ b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.c +@@ -47,6 +47,11 @@ static int get_report_descriptor(int sensor_idx, u8 *rep_desc) + memcpy(rep_desc, comp3_report_descriptor, + sizeof(comp3_report_descriptor)); + break; ++ case tms_idx: /* tablet mode switch */ ++ memset(rep_desc, 0, sizeof(tms_report_descriptor)); ++ memcpy(rep_desc, tms_report_descriptor, ++ sizeof(tms_report_descriptor)); ++ break; + case als_idx: /* ambient light sensor */ + case ACS_IDX: /* ambient color sensor */ + memset(rep_desc, 0, sizeof(als_report_descriptor)); +@@ -97,6 +102,16 @@ static u32 get_descr_sz(int sensor_idx, int descriptor_name) + return sizeof(struct magno_feature_report); + } + break; ++ case tms_idx: ++ switch (descriptor_name) { ++ case descr_size: ++ return sizeof(tms_report_descriptor); ++ case input_size: ++ return sizeof(struct tms_input_report); ++ case feature_size: ++ return sizeof(struct tms_feature_report); ++ } ++ break; + case als_idx: + case ACS_IDX: /* ambient color sensor */ + switch (descriptor_name) { +@@ -140,6 +155,7 @@ static u8 get_feature_report(int sensor_idx, int report_id, u8 *feature_report) + struct accel3_feature_report acc_feature; + struct gyro_feature_report gyro_feature; + struct magno_feature_report magno_feature; ++ struct tms_feature_report tms_feature; + struct hpd_feature_report hpd_feature; + struct als_feature_report als_feature; + u8 report_size = 0; +@@ -175,6 +191,11 @@ static u8 get_feature_report(int sensor_idx, int report_id, u8 *feature_report) + memcpy(feature_report, &magno_feature, sizeof(magno_feature)); + report_size = sizeof(magno_feature); + break; ++ case tms_idx: /* tablet mode switch */ ++ get_common_features(&tms_feature.common_property, report_id); ++ memcpy(feature_report, &tms_feature, sizeof(tms_feature)); ++ report_size = sizeof(tms_feature); ++ break; + case als_idx: /* ambient light sensor */ + case ACS_IDX: /* ambient color sensor */ + get_common_features(&als_feature.common_property, report_id); +@@ -214,6 +235,7 @@ static u8 get_input_report(u8 current_index, int sensor_idx, int report_id, + struct accel3_input_report acc_input; + struct gyro_input_report gyro_input; + struct hpd_input_report hpd_input; ++ struct tms_input_report tms_input; + struct als_input_report als_input; + struct hpd_status hpdstatus; + u8 report_size = 0; +@@ -247,6 +269,11 @@ static u8 get_input_report(u8 current_index, int sensor_idx, int report_id, + memcpy(input_report, &magno_input, sizeof(magno_input)); + report_size = sizeof(magno_input); + break; ++ case tms_idx: /* tablet mode switch */ ++ get_common_inputs(&tms_input.common_property, report_id); ++ report_size = sizeof(tms_input); ++ memcpy(input_report, &tms_input, sizeof(tms_input)); ++ break; + case als_idx: /* Als */ + case ACS_IDX: /* ambient color sensor */ + get_common_inputs(&als_input.common_property, report_id); +diff --git a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h +index ebd55675eb62..b22068a47429 100644 +--- a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h ++++ b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_desc.h +@@ -111,4 +111,11 @@ struct hpd_input_report { + u8 human_presence; + } __packed; + ++struct tms_feature_report { ++ struct common_feature_property common_property; ++} __packed; ++ ++struct tms_input_report { ++ struct common_input_property common_property; ++} __packed; + #endif +diff --git a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h +index 697f2791ea9c..96cbc1e5b9a7 100644 +--- a/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h ++++ b/drivers/hid/amd-sfh-hid/hid_descriptor/amd_sfh_hid_report_desc.h +@@ -644,6 +644,27 @@ static const u8 als_report_descriptor[] = { + 0xC0 /* HID end collection */ + }; + ++ ++/* TABLET MODE SWITCH */ ++__maybe_unused // Used by sfh1.0, but not yet implemented in sfh1.1 ++static const u8 tms_report_descriptor[] = { ++0x06, 0x43, 0xFF, // Usage Page (Vendor Defined 0xFF43) ++0x0A, 0x02, 0x02, // Usage (0x0202) ++0xA1, 0x01, // Collection (Application) ++0x85, 0x11, // Report ID (17) ++0x15, 0x00, // Logical Minimum (0) ++0x25, 0x01, // Logical Maximum (1) ++0x35, 0x00, // Physical Minimum (0) ++0x45, 0x01, // Physical Maximum (1) ++0x65, 0x00, // Unit (None) ++0x55, 0x00, // Unit Exponent (0) ++0x75, 0x01, // Report Size (1) ++0x95, 0x98, // Report Count (-104) ++0x81, 0x03, // Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) ++0x91, 0x03, // Output (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position,Non-volatile) ++0xC1, 0x00, // End Collection ++}; ++ + /* BIOMETRIC PRESENCE*/ + static const u8 hpd_report_descriptor[] = { + 0x05, 0x20, /* Usage page */ diff --git a/SOURCES/hid-asus-reset-the-backlight-brightness-level-on-resume.patch b/SOURCES/hid-asus-reset-the-backlight-brightness-level-on-resume.patch deleted file mode 100644 index 24cff73..0000000 --- a/SOURCES/hid-asus-reset-the-backlight-brightness-level-on-resume.patch +++ /dev/null @@ -1,275 +0,0 @@ -From patchwork Fri Nov 17 01:15:55 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Luke Jones -X-Patchwork-Id: 13458327 -X-Patchwork-Delegate: jikos@jikos.cz -Authentication-Results: smtp.subspace.kernel.org; - dkim=pass (2048-bit key) header.d=ljones.dev header.i=@ljones.dev - header.b="joJ1IrQk"; - dkim=pass (2048-bit key) header.d=messagingengine.com - header.i=@messagingengine.com header.b="OgcXPjZQ" -Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com - [66.111.4.29]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23A8D1AD; - Thu, 16 Nov 2023 17:16:21 -0800 (PST) -Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) - by mailout.nyi.internal (Postfix) with ESMTP id 80FF05C01D5; - Thu, 16 Nov 2023 20:16:20 -0500 (EST) -Received: from mailfrontend1 ([10.202.2.162]) - by compute1.internal (MEProxy); Thu, 16 Nov 2023 20:16:20 -0500 -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc - :cc:content-transfer-encoding:content-type:date:date:from:from - :in-reply-to:in-reply-to:message-id:mime-version:references - :reply-to:sender:subject:subject:to:to; s=fm2; t=1700183780; x= - 1700270180; bh=6VCvJjojGG/O8+rbwWkHTqMF8m/NO3fQFVfb6jMvLVc=; b=j - oJ1IrQkctNq6Z9EoVV8wV+1PpDSuUJj7CRNNwjZ28LS6BcoHLF91fsc7JggUL00w - zLKnMg5Rkxfhl5vaRFNP7LuQ1JxTbo8jenkt8KE3oMhhm5j0E1ciyHEC5tubM8C4 - hJHKFYK56dhKw4H4bv05/4K2t25zgME1BVHginuNJToupYX1Y+vZ+H1byx5CFVDR - VuhYNnoIOlUlhiMFIs4qq0ZXcEXvq0JRtE06SlwQsjlKKibILKaPsg0E4j+HI1cO - BFGOcEXD4IJgzZ7L7etIXomAWGPlCtjSyfGyFhVVT2Tkr8MRnH971E1BA+rtownx - FlcLqdYHevxGBPVF1ow/A== -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= - messagingengine.com; h=cc:cc:content-transfer-encoding - :content-type:date:date:feedback-id:feedback-id:from:from - :in-reply-to:in-reply-to:message-id:mime-version:references - :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy - :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1700183780; x= - 1700270180; bh=6VCvJjojGG/O8+rbwWkHTqMF8m/NO3fQFVfb6jMvLVc=; b=O - gcXPjZQq/MUN7cHYWBpzZy4vSH6jAzg861vtzKMzj0M0TZY1uhebF4DcK2+slxV8 - OjJOzuO8xbezJuq9oINt4k3aa/wZbHTgQMKCZp/Y/9og/NSEgAm1gcW9SXxnXQc2 - X0hgo9oWOnB71CSyZFPrRTDFMJdysZxMYX6lk3IuJxtCsDcwrRm7Ibl187Y/5b+a - eKPSR2WsoLXTatWnpyFUGUFlkH4oE8JcexVqoubex7EkvSf/RD9ruZA6lthmUg4q - 0gLFGO9wO+jKd1TdLu1KGtDpHD9nfvuZJNiY106nQNYbAslkZoumgipZX1q8DLNd - Cvfcc8ETFuHTjTCLawXww== -X-ME-Sender: - -X-ME-Received: - -X-ME-Proxy-Cause: - gggruggvucftvghtrhhoucdtuddrgedvkedrudefledgfeduucetufdoteggodetrfdotf - fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen - uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke - ertdertddtnecuhfhrohhmpedfnfhukhgvucffrdculfhonhgvshdfuceolhhukhgvsehl - jhhonhgvshdruggvvheqnecuggftrfgrthhtvghrnhepgfetfedugfetudeuheetjefhue - fggfelleetvdevtefhueeujeefvdegleevhefgnecuvehluhhsthgvrhfuihiivgeptden - ucfrrghrrghmpehmrghilhhfrhhomheplhhukhgvsehljhhonhgvshdruggvvh -X-ME-Proxy: - - - -Feedback-ID: i5ec1447f:Fastmail -Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, - 16 Nov 2023 20:16:17 -0500 (EST) -From: "Luke D. Jones" -To: jikos@kernel.org -Cc: benjamin.tissoires@redhat.com, - linux-input@vger.kernel.org, - linux-kernel@vger.kernel.org, - benato.denis96@gmail.com -Subject: [PATCH 1/2] hid-asus: add const to read-only outgoing usb buffer -Date: Fri, 17 Nov 2023 14:15:55 +1300 -Message-ID: <20231117011556.13067-2-luke@ljones.dev> -X-Mailer: git-send-email 2.41.0 -In-Reply-To: <20231117011556.13067-1-luke@ljones.dev> -References: <20231117011556.13067-1-luke@ljones.dev> -Precedence: bulk -X-Mailing-List: linux-input@vger.kernel.org -List-Id: -List-Subscribe: -List-Unsubscribe: -MIME-Version: 1.0 - -From: Denis Benato - -In the function asus_kbd_set_report the parameter buf is read-only -as it gets copied in a memory portion suitable for USB transfer, -but the parameter is not marked as const: add the missing const and mark -const immutable buffers passed to that function. - -Signed-off-by: Denis Benato ---- - drivers/hid/hid-asus.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c -index fd61dba88233..b70673a929a1 100644 ---- a/drivers/hid/hid-asus.c -+++ b/drivers/hid/hid-asus.c -@@ -381,7 +381,7 @@ static int asus_raw_event(struct hid_device *hdev, - return 0; - } - --static int asus_kbd_set_report(struct hid_device *hdev, u8 *buf, size_t buf_size) -+static int asus_kbd_set_report(struct hid_device *hdev, const u8 *buf, size_t buf_size) - { - unsigned char *dmabuf; - int ret; -@@ -404,7 +404,7 @@ static int asus_kbd_set_report(struct hid_device *hdev, u8 *buf, size_t buf_size - - static int asus_kbd_init(struct hid_device *hdev) - { -- u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x41, 0x53, 0x55, 0x53, 0x20, 0x54, -+ const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x41, 0x53, 0x55, 0x53, 0x20, 0x54, - 0x65, 0x63, 0x68, 0x2e, 0x49, 0x6e, 0x63, 0x2e, 0x00 }; - int ret; - -@@ -418,7 +418,7 @@ static int asus_kbd_init(struct hid_device *hdev) - static int asus_kbd_get_functions(struct hid_device *hdev, - unsigned char *kbd_func) - { -- u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x05, 0x20, 0x31, 0x00, 0x08 }; -+ const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0x05, 0x20, 0x31, 0x00, 0x08 }; - u8 *readbuf; - int ret; - -@@ -449,7 +449,7 @@ static int asus_kbd_get_functions(struct hid_device *hdev, - - static int rog_nkey_led_init(struct hid_device *hdev) - { -- u8 buf_init_start[] = { FEATURE_KBD_LED_REPORT_ID1, 0xB9 }; -+ const u8 buf_init_start[] = { FEATURE_KBD_LED_REPORT_ID1, 0xB9 }; - u8 buf_init2[] = { FEATURE_KBD_LED_REPORT_ID1, 0x41, 0x53, 0x55, 0x53, 0x20, - 0x54, 0x65, 0x63, 0x68, 0x2e, 0x49, 0x6e, 0x63, 0x2e, 0x00 }; - u8 buf_init3[] = { FEATURE_KBD_LED_REPORT_ID1, - -From patchwork Fri Nov 17 01:15:56 2023 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -X-Patchwork-Submitter: Luke Jones -X-Patchwork-Id: 13458328 -X-Patchwork-Delegate: jikos@jikos.cz -Authentication-Results: smtp.subspace.kernel.org; - dkim=pass (2048-bit key) header.d=ljones.dev header.i=@ljones.dev - header.b="CmfGtmGu"; - dkim=pass (2048-bit key) header.d=messagingengine.com - header.i=@messagingengine.com header.b="jzb6JGxZ" -Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com - [66.111.4.29]) - by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FDA9182; - Thu, 16 Nov 2023 17:16:24 -0800 (PST) -Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) - by mailout.nyi.internal (Postfix) with ESMTP id 9EAC45C01D0; - Thu, 16 Nov 2023 20:16:23 -0500 (EST) -Received: from mailfrontend1 ([10.202.2.162]) - by compute4.internal (MEProxy); Thu, 16 Nov 2023 20:16:23 -0500 -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ljones.dev; h=cc - :cc:content-transfer-encoding:content-type:date:date:from:from - :in-reply-to:in-reply-to:message-id:mime-version:references - :reply-to:sender:subject:subject:to:to; s=fm2; t=1700183783; x= - 1700270183; bh=eW7/wu+ICidmfZHSNxKv48b4TD+SrR9ios0hX/9qiic=; b=C - mfGtmGuSaYypQGBqeXOqsgU84svGsmxsKEI6B1P7Up6LKAMVV4memvlhpkkpvSmu - NbUpUijlEN5j+nHGZAc41KnIN2lFjlWVKkWxnfQG+LpVEhlyMHbv9/FJbxF9XvTm - GK8PcciRWt5dSntKZw+Yn8GumCwPDGy3Tzwx3M6PFwbo+SzzsKox1mTATb0BVPmz - y9yHl/CH8n6Vw1/IiILvCjT5D7Pg9R6t6n25ks6pa8lhTpGPdt+u0j2gAj+I9tKe - sGnZ36pZN0Fxe7gfgC8vnjhCKtSAmzjwHJZ/106YHvNB9KVk78hbYw3VsqmdhcBi - TPdREbF0UnXZc0T/+fAPA== -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= - messagingengine.com; h=cc:cc:content-transfer-encoding - :content-type:date:date:feedback-id:feedback-id:from:from - :in-reply-to:in-reply-to:message-id:mime-version:references - :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy - :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1700183783; x= - 1700270183; bh=eW7/wu+ICidmfZHSNxKv48b4TD+SrR9ios0hX/9qiic=; b=j - zb6JGxZ5/h3mYwvyarhtE20qVT9ZQZcRtxt/hLoF71iKmwdBcQDGwx7uza6O5KXN - gyp9FKKDeyA8B4U04jhXWIcgy4M6PP5qTD+U4YMvy8vIhA3tBa/sS1DOYHIHqFzN - QSh/bPDxrY7ztw6xouoFRm1z1pBLLHOsJCB3akgFd53xPYVx/U2f4F3qvh0rSfli - rEIh/FkqbBMGe0NLClXiKLKGAQUm1EX4wnur8HVgwuv7zc+EGZhqD03OTQSrBcIO - PYjwqjDtXen/ynFbWP03uBPKJ1cevJIRt2MWrndItRwMeuZeD7Ru/IRFxGxPOJjb - KSWodEkqKycqzJCQUnbaw== -X-ME-Sender: - -X-ME-Received: - -X-ME-Proxy-Cause: - gggruggvucftvghtrhhoucdtuddrgedvkedrudefledgfeduucetufdoteggodetrfdotf - fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen - uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtke - ertdertddtnecuhfhrohhmpedfnfhukhgvucffrdculfhonhgvshdfuceolhhukhgvsehl - jhhonhgvshdruggvvheqnecuggftrfgrthhtvghrnhepgfetfedugfetudeuheetjefhue - fggfelleetvdevtefhueeujeefvdegleevhefgnecuvehluhhsthgvrhfuihiivgeptden - ucfrrghrrghmpehmrghilhhfrhhomheplhhukhgvsehljhhonhgvshdruggvvh -X-ME-Proxy: - - - -Feedback-ID: i5ec1447f:Fastmail -Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, - 16 Nov 2023 20:16:20 -0500 (EST) -From: "Luke D. Jones" -To: jikos@kernel.org -Cc: benjamin.tissoires@redhat.com, - linux-input@vger.kernel.org, - linux-kernel@vger.kernel.org, - benato.denis96@gmail.com -Subject: [PATCH 2/2] hid-asus: reset the backlight brightness level on resume -Date: Fri, 17 Nov 2023 14:15:56 +1300 -Message-ID: <20231117011556.13067-3-luke@ljones.dev> -X-Mailer: git-send-email 2.41.0 -In-Reply-To: <20231117011556.13067-1-luke@ljones.dev> -References: <20231117011556.13067-1-luke@ljones.dev> -Precedence: bulk -X-Mailing-List: linux-input@vger.kernel.org -List-Id: -List-Subscribe: -List-Unsubscribe: -MIME-Version: 1.0 - -From: Denis Benato - -Some devices managed by this driver automatically set brightness to 0 -before entering a suspended state and reset it back to a default -brightness level after the resume: -this has the effect of having the kernel report wrong brightness -status after a sleep, and on some devices (like the Asus RC71L) that -brightness is the intensity of LEDs directly facing the user. - -Fix the above issue by setting back brightness to the level it had -before entering a sleep state. - -Signed-off-by: Denis Benato ---- - drivers/hid/hid-asus.c | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c -index b70673a929a1..78cdfb8b9a7a 100644 ---- a/drivers/hid/hid-asus.c -+++ b/drivers/hid/hid-asus.c -@@ -1000,6 +1000,24 @@ static int asus_start_multitouch(struct hid_device *hdev) - return 0; - } - -+static int __maybe_unused asus_resume(struct hid_device *hdev) { -+ struct asus_drvdata *drvdata = hid_get_drvdata(hdev); -+ int ret = 0; -+ -+ if (drvdata->kbd_backlight) { -+ const u8 buf[] = { FEATURE_KBD_REPORT_ID, 0xba, 0xc5, 0xc4, -+ drvdata->kbd_backlight->cdev.brightness }; -+ ret = asus_kbd_set_report(hdev, buf, sizeof(buf)); -+ if (ret < 0) { -+ hid_err(hdev, "Asus failed to set keyboard backlight: %d\n", ret); -+ goto asus_resume_err; -+ } -+ } -+ -+asus_resume_err: -+ return ret; -+} -+ - static int __maybe_unused asus_reset_resume(struct hid_device *hdev) - { - struct asus_drvdata *drvdata = hid_get_drvdata(hdev); -@@ -1294,6 +1312,7 @@ static struct hid_driver asus_driver = { - .input_configured = asus_input_configured, - #ifdef CONFIG_PM - .reset_resume = asus_reset_resume, -+ .resume = asus_resume, - #endif - .event = asus_event, - .raw_event = asus_raw_event diff --git a/SOURCES/kernel-aarch64-16k-debug-fedora.config b/SOURCES/kernel-aarch64-16k-debug-fedora.config index 3c947cf..aa50a8c 100644 --- a/SOURCES/kernel-aarch64-16k-debug-fedora.config +++ b/SOURCES/kernel-aarch64-16k-debug-fedora.config @@ -2226,7 +2226,7 @@ CONFIG_DVB_USB_V2=m CONFIG_DVB_USB_VP702X=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_ZD1301=m -# CONFIG_DW_AXI_DMAC is not set +CONFIG_DW_AXI_DMAC=m CONFIG_DW_DMAC_CORE=m CONFIG_DW_DMAC=m CONFIG_DW_DMAC_PCI=m @@ -5584,7 +5584,7 @@ CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEASPM=y -CONFIG_PCIE_BRCMSTB=m +CONFIG_PCIE_BRCMSTB=y CONFIG_PCIE_BUS_DEFAULT=y # CONFIG_PCIE_BUS_PEER2PEER is not set # CONFIG_PCIE_BUS_PERFORMANCE is not set @@ -5865,8 +5865,8 @@ CONFIG_PINCTRL_SM8450=m # CONFIG_PINCTRL_STMFX is not set CONFIG_PINCTRL_SUN20I_D1=y # CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set +CONFIG_PINCTRL_SUN50I_A100_R=y +CONFIG_PINCTRL_SUN50I_A100=y CONFIG_PINCTRL_SUN50I_A64_R=y CONFIG_PINCTRL_SUN50I_A64=y CONFIG_PINCTRL_SUN50I_H5=y @@ -5883,7 +5883,7 @@ CONFIG_PINCTRL_SUN50I_H6=y # CONFIG_PINCTRL_SUN8I_A83T is not set # CONFIG_PINCTRL_SUN8I_A83T_R is not set # CONFIG_PINCTRL_SUN8I_H3 is not set -# CONFIG_PINCTRL_SUN8I_H3_R is not set +CONFIG_PINCTRL_SUN8I_H3_R=y # CONFIG_PINCTRL_SUN8I_V3S is not set # CONFIG_PINCTRL_SUN9I_A80 is not set # CONFIG_PINCTRL_SUN9I_A80_R is not set @@ -7400,7 +7400,8 @@ CONFIG_SND_DARLA20=m CONFIG_SND_DARLA24=m # CONFIG_SND_DEBUG_VERBOSE is not set CONFIG_SND_DEBUG=y -# CONFIG_SND_DESIGNWARE_I2S is not set +CONFIG_SND_DESIGNWARE_I2S=m +CONFIG_SND_DESIGNWARE_PCM=y CONFIG_SND_DICE=m CONFIG_SND_DMAENGINE_PCM=m CONFIG_SND_DRIVERS=y @@ -8086,7 +8087,7 @@ CONFIG_SPI_CADENCE_XSPI=m # CONFIG_SPI_DEBUG is not set CONFIG_SPI_DESIGNWARE=m CONFIG_SPI_DLN2=m -# CONFIG_SPI_DW_DMA is not set +CONFIG_SPI_DW_DMA=y CONFIG_SPI_DW_MMIO=m CONFIG_SPI_DW_PCI=m CONFIG_SPI_FSL_DSPI=m diff --git a/SOURCES/kernel-aarch64-16k-fedora.config b/SOURCES/kernel-aarch64-16k-fedora.config index 1177adf..4a2dd09 100644 --- a/SOURCES/kernel-aarch64-16k-fedora.config +++ b/SOURCES/kernel-aarch64-16k-fedora.config @@ -2217,7 +2217,7 @@ CONFIG_DVB_USB_V2=m CONFIG_DVB_USB_VP702X=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_ZD1301=m -# CONFIG_DW_AXI_DMAC is not set +CONFIG_DW_AXI_DMAC=m CONFIG_DW_DMAC_CORE=m CONFIG_DW_DMAC=m CONFIG_DW_DMAC_PCI=m @@ -5557,7 +5557,7 @@ CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEASPM=y -CONFIG_PCIE_BRCMSTB=m +CONFIG_PCIE_BRCMSTB=y CONFIG_PCIE_BUS_DEFAULT=y # CONFIG_PCIE_BUS_PEER2PEER is not set # CONFIG_PCIE_BUS_PERFORMANCE is not set @@ -5838,8 +5838,8 @@ CONFIG_PINCTRL_SM8450=m # CONFIG_PINCTRL_STMFX is not set CONFIG_PINCTRL_SUN20I_D1=y # CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set +CONFIG_PINCTRL_SUN50I_A100_R=y +CONFIG_PINCTRL_SUN50I_A100=y CONFIG_PINCTRL_SUN50I_A64_R=y CONFIG_PINCTRL_SUN50I_A64=y CONFIG_PINCTRL_SUN50I_H5=y @@ -5856,7 +5856,7 @@ CONFIG_PINCTRL_SUN50I_H6=y # CONFIG_PINCTRL_SUN8I_A83T is not set # CONFIG_PINCTRL_SUN8I_A83T_R is not set # CONFIG_PINCTRL_SUN8I_H3 is not set -# CONFIG_PINCTRL_SUN8I_H3_R is not set +CONFIG_PINCTRL_SUN8I_H3_R=y # CONFIG_PINCTRL_SUN8I_V3S is not set # CONFIG_PINCTRL_SUN9I_A80 is not set # CONFIG_PINCTRL_SUN9I_A80_R is not set @@ -7373,7 +7373,8 @@ CONFIG_SND_DARLA20=m CONFIG_SND_DARLA24=m # CONFIG_SND_DEBUG is not set # CONFIG_SND_DEBUG_VERBOSE is not set -# CONFIG_SND_DESIGNWARE_I2S is not set +CONFIG_SND_DESIGNWARE_I2S=m +CONFIG_SND_DESIGNWARE_PCM=y CONFIG_SND_DICE=m CONFIG_SND_DMAENGINE_PCM=m CONFIG_SND_DRIVERS=y @@ -8057,7 +8058,7 @@ CONFIG_SPI_CADENCE_XSPI=m # CONFIG_SPI_DEBUG is not set CONFIG_SPI_DESIGNWARE=m CONFIG_SPI_DLN2=m -# CONFIG_SPI_DW_DMA is not set +CONFIG_SPI_DW_DMA=y CONFIG_SPI_DW_MMIO=m CONFIG_SPI_DW_PCI=m CONFIG_SPI_FSL_DSPI=m diff --git a/SOURCES/kernel-aarch64-debug-fedora.config b/SOURCES/kernel-aarch64-debug-fedora.config index fa1b08e..7a51089 100644 --- a/SOURCES/kernel-aarch64-debug-fedora.config +++ b/SOURCES/kernel-aarch64-debug-fedora.config @@ -2226,7 +2226,7 @@ CONFIG_DVB_USB_V2=m CONFIG_DVB_USB_VP702X=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_ZD1301=m -# CONFIG_DW_AXI_DMAC is not set +CONFIG_DW_AXI_DMAC=m CONFIG_DW_DMAC_CORE=m CONFIG_DW_DMAC=m CONFIG_DW_DMAC_PCI=m @@ -5584,7 +5584,7 @@ CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEASPM=y -CONFIG_PCIE_BRCMSTB=m +CONFIG_PCIE_BRCMSTB=y CONFIG_PCIE_BUS_DEFAULT=y # CONFIG_PCIE_BUS_PEER2PEER is not set # CONFIG_PCIE_BUS_PERFORMANCE is not set @@ -5865,8 +5865,8 @@ CONFIG_PINCTRL_SM8450=m # CONFIG_PINCTRL_STMFX is not set CONFIG_PINCTRL_SUN20I_D1=y # CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set +CONFIG_PINCTRL_SUN50I_A100_R=y +CONFIG_PINCTRL_SUN50I_A100=y CONFIG_PINCTRL_SUN50I_A64_R=y CONFIG_PINCTRL_SUN50I_A64=y CONFIG_PINCTRL_SUN50I_H5=y @@ -5883,7 +5883,7 @@ CONFIG_PINCTRL_SUN50I_H6=y # CONFIG_PINCTRL_SUN8I_A83T is not set # CONFIG_PINCTRL_SUN8I_A83T_R is not set # CONFIG_PINCTRL_SUN8I_H3 is not set -# CONFIG_PINCTRL_SUN8I_H3_R is not set +CONFIG_PINCTRL_SUN8I_H3_R=y # CONFIG_PINCTRL_SUN8I_V3S is not set # CONFIG_PINCTRL_SUN9I_A80 is not set # CONFIG_PINCTRL_SUN9I_A80_R is not set @@ -7400,7 +7400,8 @@ CONFIG_SND_DARLA20=m CONFIG_SND_DARLA24=m # CONFIG_SND_DEBUG_VERBOSE is not set CONFIG_SND_DEBUG=y -# CONFIG_SND_DESIGNWARE_I2S is not set +CONFIG_SND_DESIGNWARE_I2S=m +CONFIG_SND_DESIGNWARE_PCM=y CONFIG_SND_DICE=m CONFIG_SND_DMAENGINE_PCM=m CONFIG_SND_DRIVERS=y @@ -8086,7 +8087,7 @@ CONFIG_SPI_CADENCE_XSPI=m # CONFIG_SPI_DEBUG is not set CONFIG_SPI_DESIGNWARE=m CONFIG_SPI_DLN2=m -# CONFIG_SPI_DW_DMA is not set +CONFIG_SPI_DW_DMA=y CONFIG_SPI_DW_MMIO=m CONFIG_SPI_DW_PCI=m CONFIG_SPI_FSL_DSPI=m diff --git a/SOURCES/kernel-aarch64-fedora.config b/SOURCES/kernel-aarch64-fedora.config index 7b9dad2..ed5e669 100644 --- a/SOURCES/kernel-aarch64-fedora.config +++ b/SOURCES/kernel-aarch64-fedora.config @@ -2217,7 +2217,7 @@ CONFIG_DVB_USB_V2=m CONFIG_DVB_USB_VP702X=m CONFIG_DVB_USB_VP7045=m CONFIG_DVB_USB_ZD1301=m -# CONFIG_DW_AXI_DMAC is not set +CONFIG_DW_AXI_DMAC=m CONFIG_DW_DMAC_CORE=m CONFIG_DW_DMAC=m CONFIG_DW_DMAC_PCI=m @@ -5557,7 +5557,7 @@ CONFIG_PCIEASPM_DEFAULT=y # CONFIG_PCIEASPM_POWERSAVE is not set # CONFIG_PCIEASPM_POWER_SUPERSAVE is not set CONFIG_PCIEASPM=y -CONFIG_PCIE_BRCMSTB=m +CONFIG_PCIE_BRCMSTB=y CONFIG_PCIE_BUS_DEFAULT=y # CONFIG_PCIE_BUS_PEER2PEER is not set # CONFIG_PCIE_BUS_PERFORMANCE is not set @@ -5838,8 +5838,8 @@ CONFIG_PINCTRL_SM8450=m # CONFIG_PINCTRL_STMFX is not set CONFIG_PINCTRL_SUN20I_D1=y # CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set +CONFIG_PINCTRL_SUN50I_A100_R=y +CONFIG_PINCTRL_SUN50I_A100=y CONFIG_PINCTRL_SUN50I_A64_R=y CONFIG_PINCTRL_SUN50I_A64=y CONFIG_PINCTRL_SUN50I_H5=y @@ -5856,7 +5856,7 @@ CONFIG_PINCTRL_SUN50I_H6=y # CONFIG_PINCTRL_SUN8I_A83T is not set # CONFIG_PINCTRL_SUN8I_A83T_R is not set # CONFIG_PINCTRL_SUN8I_H3 is not set -# CONFIG_PINCTRL_SUN8I_H3_R is not set +CONFIG_PINCTRL_SUN8I_H3_R=y # CONFIG_PINCTRL_SUN8I_V3S is not set # CONFIG_PINCTRL_SUN9I_A80 is not set # CONFIG_PINCTRL_SUN9I_A80_R is not set @@ -7373,7 +7373,8 @@ CONFIG_SND_DARLA20=m CONFIG_SND_DARLA24=m # CONFIG_SND_DEBUG is not set # CONFIG_SND_DEBUG_VERBOSE is not set -# CONFIG_SND_DESIGNWARE_I2S is not set +CONFIG_SND_DESIGNWARE_I2S=m +CONFIG_SND_DESIGNWARE_PCM=y CONFIG_SND_DICE=m CONFIG_SND_DMAENGINE_PCM=m CONFIG_SND_DRIVERS=y @@ -8057,7 +8058,7 @@ CONFIG_SPI_CADENCE_XSPI=m # CONFIG_SPI_DEBUG is not set CONFIG_SPI_DESIGNWARE=m CONFIG_SPI_DLN2=m -# CONFIG_SPI_DW_DMA is not set +CONFIG_SPI_DW_DMA=y CONFIG_SPI_DW_MMIO=m CONFIG_SPI_DW_PCI=m CONFIG_SPI_FSL_DSPI=m diff --git a/SOURCES/kernel-ppc64le-debug-fedora.config b/SOURCES/kernel-ppc64le-debug-fedora.config index 919cfbe..c94113c 100644 --- a/SOURCES/kernel-ppc64le-debug-fedora.config +++ b/SOURCES/kernel-ppc64le-debug-fedora.config @@ -4859,27 +4859,6 @@ CONFIG_PINCTRL_RK805=m CONFIG_PINCTRL_SM8350_LPASS_LPI=m # CONFIG_PINCTRL_SM8450 is not set # CONFIG_PINCTRL_STMFX is not set -# CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set -# CONFIG_PINCTRL_SUN50I_A64 is not set -# CONFIG_PINCTRL_SUN50I_A64_R is not set -# CONFIG_PINCTRL_SUN50I_H5 is not set -# CONFIG_PINCTRL_SUN50I_H6 is not set -# CONFIG_PINCTRL_SUN50I_H6_R is not set -# CONFIG_PINCTRL_SUN5I is not set -# CONFIG_PINCTRL_SUN6I_A31 is not set -# CONFIG_PINCTRL_SUN6I_A31_R is not set -# CONFIG_PINCTRL_SUN8I_A23 is not set -# CONFIG_PINCTRL_SUN8I_A23_R is not set -# CONFIG_PINCTRL_SUN8I_A33 is not set -# CONFIG_PINCTRL_SUN8I_A83T is not set -# CONFIG_PINCTRL_SUN8I_A83T_R is not set -# CONFIG_PINCTRL_SUN8I_H3 is not set -# CONFIG_PINCTRL_SUN8I_H3_R is not set -# CONFIG_PINCTRL_SUN8I_V3S is not set -# CONFIG_PINCTRL_SUN9I_A80 is not set -# CONFIG_PINCTRL_SUN9I_A80_R is not set # CONFIG_PINCTRL_SX150X is not set # CONFIG_PING is not set # CONFIG_PINMUX is not set diff --git a/SOURCES/kernel-ppc64le-fedora.config b/SOURCES/kernel-ppc64le-fedora.config index c01d035..966bd92 100644 --- a/SOURCES/kernel-ppc64le-fedora.config +++ b/SOURCES/kernel-ppc64le-fedora.config @@ -4830,27 +4830,6 @@ CONFIG_PINCTRL_RK805=m CONFIG_PINCTRL_SM8350_LPASS_LPI=m # CONFIG_PINCTRL_SM8450 is not set # CONFIG_PINCTRL_STMFX is not set -# CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set -# CONFIG_PINCTRL_SUN50I_A64 is not set -# CONFIG_PINCTRL_SUN50I_A64_R is not set -# CONFIG_PINCTRL_SUN50I_H5 is not set -# CONFIG_PINCTRL_SUN50I_H6 is not set -# CONFIG_PINCTRL_SUN50I_H6_R is not set -# CONFIG_PINCTRL_SUN5I is not set -# CONFIG_PINCTRL_SUN6I_A31 is not set -# CONFIG_PINCTRL_SUN6I_A31_R is not set -# CONFIG_PINCTRL_SUN8I_A23 is not set -# CONFIG_PINCTRL_SUN8I_A23_R is not set -# CONFIG_PINCTRL_SUN8I_A33 is not set -# CONFIG_PINCTRL_SUN8I_A83T is not set -# CONFIG_PINCTRL_SUN8I_A83T_R is not set -# CONFIG_PINCTRL_SUN8I_H3 is not set -# CONFIG_PINCTRL_SUN8I_H3_R is not set -# CONFIG_PINCTRL_SUN8I_V3S is not set -# CONFIG_PINCTRL_SUN9I_A80 is not set -# CONFIG_PINCTRL_SUN9I_A80_R is not set # CONFIG_PINCTRL_SX150X is not set # CONFIG_PING is not set # CONFIG_PINMUX is not set diff --git a/SOURCES/kernel-s390x-debug-fedora.config b/SOURCES/kernel-s390x-debug-fedora.config index ca3d894..618ba06 100644 --- a/SOURCES/kernel-s390x-debug-fedora.config +++ b/SOURCES/kernel-s390x-debug-fedora.config @@ -4823,27 +4823,6 @@ CONFIG_PINCTRL_RK805=m CONFIG_PINCTRL_SM8350_LPASS_LPI=m # CONFIG_PINCTRL_SM8450 is not set # CONFIG_PINCTRL_STMFX is not set -# CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set -# CONFIG_PINCTRL_SUN50I_A64 is not set -# CONFIG_PINCTRL_SUN50I_A64_R is not set -# CONFIG_PINCTRL_SUN50I_H5 is not set -# CONFIG_PINCTRL_SUN50I_H6 is not set -# CONFIG_PINCTRL_SUN50I_H6_R is not set -# CONFIG_PINCTRL_SUN5I is not set -# CONFIG_PINCTRL_SUN6I_A31 is not set -# CONFIG_PINCTRL_SUN6I_A31_R is not set -# CONFIG_PINCTRL_SUN8I_A23 is not set -# CONFIG_PINCTRL_SUN8I_A23_R is not set -# CONFIG_PINCTRL_SUN8I_A33 is not set -# CONFIG_PINCTRL_SUN8I_A83T is not set -# CONFIG_PINCTRL_SUN8I_A83T_R is not set -# CONFIG_PINCTRL_SUN8I_H3 is not set -# CONFIG_PINCTRL_SUN8I_H3_R is not set -# CONFIG_PINCTRL_SUN8I_V3S is not set -# CONFIG_PINCTRL_SUN9I_A80 is not set -# CONFIG_PINCTRL_SUN9I_A80_R is not set # CONFIG_PINCTRL_SX150X is not set # CONFIG_PING is not set # CONFIG_PINMUX is not set diff --git a/SOURCES/kernel-s390x-fedora.config b/SOURCES/kernel-s390x-fedora.config index c73f851..485f5e0 100644 --- a/SOURCES/kernel-s390x-fedora.config +++ b/SOURCES/kernel-s390x-fedora.config @@ -4794,27 +4794,6 @@ CONFIG_PINCTRL_RK805=m CONFIG_PINCTRL_SM8350_LPASS_LPI=m # CONFIG_PINCTRL_SM8450 is not set # CONFIG_PINCTRL_STMFX is not set -# CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set -# CONFIG_PINCTRL_SUN50I_A64 is not set -# CONFIG_PINCTRL_SUN50I_A64_R is not set -# CONFIG_PINCTRL_SUN50I_H5 is not set -# CONFIG_PINCTRL_SUN50I_H6 is not set -# CONFIG_PINCTRL_SUN50I_H6_R is not set -# CONFIG_PINCTRL_SUN5I is not set -# CONFIG_PINCTRL_SUN6I_A31 is not set -# CONFIG_PINCTRL_SUN6I_A31_R is not set -# CONFIG_PINCTRL_SUN8I_A23 is not set -# CONFIG_PINCTRL_SUN8I_A23_R is not set -# CONFIG_PINCTRL_SUN8I_A33 is not set -# CONFIG_PINCTRL_SUN8I_A83T is not set -# CONFIG_PINCTRL_SUN8I_A83T_R is not set -# CONFIG_PINCTRL_SUN8I_H3 is not set -# CONFIG_PINCTRL_SUN8I_H3_R is not set -# CONFIG_PINCTRL_SUN8I_V3S is not set -# CONFIG_PINCTRL_SUN9I_A80 is not set -# CONFIG_PINCTRL_SUN9I_A80_R is not set # CONFIG_PINCTRL_SX150X is not set # CONFIG_PING is not set # CONFIG_PINMUX is not set diff --git a/SOURCES/kernel-x86_64-debug-fedora.config b/SOURCES/kernel-x86_64-debug-fedora.config index 515d0ae..1ae9910 100644 --- a/SOURCES/kernel-x86_64-debug-fedora.config +++ b/SOURCES/kernel-x86_64-debug-fedora.config @@ -5252,27 +5252,6 @@ CONFIG_PINCTRL_RK805=m CONFIG_PINCTRL_SM8350_LPASS_LPI=m # CONFIG_PINCTRL_SM8450 is not set # CONFIG_PINCTRL_STMFX is not set -# CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set -# CONFIG_PINCTRL_SUN50I_A64 is not set -# CONFIG_PINCTRL_SUN50I_A64_R is not set -# CONFIG_PINCTRL_SUN50I_H5 is not set -# CONFIG_PINCTRL_SUN50I_H6 is not set -# CONFIG_PINCTRL_SUN50I_H6_R is not set -# CONFIG_PINCTRL_SUN5I is not set -# CONFIG_PINCTRL_SUN6I_A31 is not set -# CONFIG_PINCTRL_SUN6I_A31_R is not set -# CONFIG_PINCTRL_SUN8I_A23 is not set -# CONFIG_PINCTRL_SUN8I_A23_R is not set -# CONFIG_PINCTRL_SUN8I_A33 is not set -# CONFIG_PINCTRL_SUN8I_A83T is not set -# CONFIG_PINCTRL_SUN8I_A83T_R is not set -# CONFIG_PINCTRL_SUN8I_H3 is not set -# CONFIG_PINCTRL_SUN8I_H3_R is not set -# CONFIG_PINCTRL_SUN8I_V3S is not set -# CONFIG_PINCTRL_SUN9I_A80 is not set -# CONFIG_PINCTRL_SUN9I_A80_R is not set CONFIG_PINCTRL_SUNRISEPOINT=m # CONFIG_PINCTRL_SX150X is not set CONFIG_PINCTRL_TIGERLAKE=m diff --git a/SOURCES/kernel-x86_64-fedora.config b/SOURCES/kernel-x86_64-fedora.config index f892ec5..6204b9b 100644 --- a/SOURCES/kernel-x86_64-fedora.config +++ b/SOURCES/kernel-x86_64-fedora.config @@ -5225,27 +5225,6 @@ CONFIG_PINCTRL_RK805=m CONFIG_PINCTRL_SM8350_LPASS_LPI=m # CONFIG_PINCTRL_SM8450 is not set # CONFIG_PINCTRL_STMFX is not set -# CONFIG_PINCTRL_SUN4I_A10 is not set -# CONFIG_PINCTRL_SUN50I_A100 is not set -# CONFIG_PINCTRL_SUN50I_A100_R is not set -# CONFIG_PINCTRL_SUN50I_A64 is not set -# CONFIG_PINCTRL_SUN50I_A64_R is not set -# CONFIG_PINCTRL_SUN50I_H5 is not set -# CONFIG_PINCTRL_SUN50I_H6 is not set -# CONFIG_PINCTRL_SUN50I_H6_R is not set -# CONFIG_PINCTRL_SUN5I is not set -# CONFIG_PINCTRL_SUN6I_A31 is not set -# CONFIG_PINCTRL_SUN6I_A31_R is not set -# CONFIG_PINCTRL_SUN8I_A23 is not set -# CONFIG_PINCTRL_SUN8I_A23_R is not set -# CONFIG_PINCTRL_SUN8I_A33 is not set -# CONFIG_PINCTRL_SUN8I_A83T is not set -# CONFIG_PINCTRL_SUN8I_A83T_R is not set -# CONFIG_PINCTRL_SUN8I_H3 is not set -# CONFIG_PINCTRL_SUN8I_H3_R is not set -# CONFIG_PINCTRL_SUN8I_V3S is not set -# CONFIG_PINCTRL_SUN9I_A80 is not set -# CONFIG_PINCTRL_SUN9I_A80_R is not set CONFIG_PINCTRL_SUNRISEPOINT=m # CONFIG_PINCTRL_SX150X is not set CONFIG_PINCTRL_TIGERLAKE=m diff --git a/SOURCES/patch-6.6-redhat.patch b/SOURCES/patch-6.6-redhat.patch index e36e4cd..6bedf26 100644 --- a/SOURCES/patch-6.6-redhat.patch +++ b/SOURCES/patch-6.6-redhat.patch @@ -1,30 +1,30 @@ - Makefile | 20 ++- + Makefile | 20 +- arch/s390/include/asm/ipl.h | 1 + arch/s390/kernel/ipl.c | 5 + arch/s390/kernel/setup.c | 4 + - arch/x86/kernel/setup.c | 22 ++- + arch/x86/kernel/setup.c | 22 +- drivers/acpi/apei/hest.c | 8 + drivers/acpi/irq.c | 17 +- - drivers/acpi/scan.c | 9 ++ - drivers/ata/libahci.c | 18 +++ - drivers/char/ipmi/ipmi_dmi.c | 15 ++ + drivers/acpi/scan.c | 9 + + drivers/ata/libahci.c | 18 ++ + drivers/char/ipmi/ipmi_dmi.c | 15 + drivers/char/ipmi/ipmi_msghandler.c | 16 +- drivers/firmware/efi/Makefile | 1 + - drivers/firmware/efi/efi.c | 124 +++++++++++---- - drivers/firmware/efi/secureboot.c | 38 +++++ - drivers/firmware/sysfb.c | 18 ++- - drivers/hid/hid-rmi.c | 66 -------- - drivers/hwtracing/coresight/coresight-etm4x-core.c | 19 +++ - drivers/input/rmi4/rmi_driver.c | 124 +++++++++------ - drivers/iommu/iommu.c | 22 +++ - drivers/pci/quirks.c | 24 +++ - drivers/rtc/rtc-cmos.c | 18 ++- - drivers/scsi/sd.c | 10 ++ + drivers/firmware/efi/efi.c | 124 +++++-- + drivers/firmware/efi/secureboot.c | 38 +++ + drivers/firmware/sysfb.c | 18 +- + drivers/hid/hid-rmi.c | 66 ---- + drivers/hwtracing/coresight/coresight-etm4x-core.c | 19 ++ + drivers/input/rmi4/rmi_driver.c | 124 ++++--- + drivers/iommu/iommu.c | 22 ++ + drivers/pci/quirks.c | 24 ++ + drivers/rtc/rtc-cmos.c | 18 +- + drivers/scsi/sd.c | 10 + drivers/usb/core/hub.c | 7 + - include/linux/efi.h | 22 ++- + include/linux/efi.h | 22 +- include/linux/lsm_hook_defs.h | 2 + include/linux/module.h | 1 + - include/linux/rh_kabi.h | 172 +++++++++++++++++++++ + include/linux/rh_kabi.h | 172 ++++++++++ include/linux/rmi.h | 1 + include/linux/security.h | 5 + kernel/module/main.c | 2 + @@ -32,13 +32,18 @@ scripts/mod/modpost.c | 8 + scripts/tags.sh | 2 + security/integrity/platform_certs/load_uefi.c | 6 +- - security/lockdown/Kconfig | 13 ++ + security/lockdown/Kconfig | 13 + security/lockdown/lockdown.c | 1 + - security/security.c | 12 ++ - 37 files changed, 681 insertions(+), 181 deletions(-) + security/security.c | 12 + + sound/pci/hda/cs35l41_hda.c | 106 +++++- + sound/pci/hda/cs35l41_hda.h | 8 +- + sound/pci/hda/cs35l41_hda_property.c | 355 +++++++++++++++++++-- + sound/pci/hda/hda_component.h | 4 + + sound/pci/hda/patch_realtek.c | 38 ++- + 42 files changed, 1132 insertions(+), 241 deletions(-) diff --git a/Makefile b/Makefile -index 707952172ece..456d7d6b52d6 100644 +index 891ef640396c..9ecd654b31bf 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,18 @@ $(if $(filter __%, $(MAKECMDGOALS)), \ @@ -1557,3 +1562,724 @@ index 23b129d482a7..55d0fe0d121b 100644 #ifdef CONFIG_PERF_EVENTS /** * security_perf_event_open() - Check if a perf event open is allowed +diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c +index 3c157b006a5a..257f71e9ec07 100644 +--- a/sound/pci/hda/cs35l41_hda.c ++++ b/sound/pci/hda/cs35l41_hda.c +@@ -33,6 +33,9 @@ + #define CAL_AMBIENT_DSP_CTL_NAME "CAL_AMBIENT" + #define CAL_DSP_CTL_TYPE 5 + #define CAL_DSP_CTL_ALG 205 ++#define CS35L41_UUID "50d90cdc-3de4-4f18-b528-c7fe3b71f40d" ++#define CS35L41_DSM_GET_MUTE 5 ++#define CS35L41_NOTIFY_EVENT 0x91 + + static bool firmware_autostart = 1; + module_param(firmware_autostart, bool, 0444); +@@ -563,6 +566,31 @@ static void cs35l41_hda_play_start(struct device *dev) + + } + ++static void cs35l41_mute(struct device *dev, bool mute) ++{ ++ struct cs35l41_hda *cs35l41 = dev_get_drvdata(dev); ++ struct regmap *reg = cs35l41->regmap; ++ ++ dev_dbg(dev, "Mute(%d:%d) Playback Started: %d\n", mute, cs35l41->mute_override, ++ cs35l41->playback_started); ++ ++ if (cs35l41->playback_started) { ++ if (mute || cs35l41->mute_override) { ++ dev_dbg(dev, "Muting\n"); ++ regmap_multi_reg_write(reg, cs35l41_hda_mute, ARRAY_SIZE(cs35l41_hda_mute)); ++ } else { ++ dev_dbg(dev, "Unmuting\n"); ++ if (cs35l41->firmware_running) { ++ regmap_multi_reg_write(reg, cs35l41_hda_unmute_dsp, ++ ARRAY_SIZE(cs35l41_hda_unmute_dsp)); ++ } else { ++ regmap_multi_reg_write(reg, cs35l41_hda_unmute, ++ ARRAY_SIZE(cs35l41_hda_unmute)); ++ } ++ } ++ } ++} ++ + static void cs35l41_hda_play_done(struct device *dev) + { + struct cs35l41_hda *cs35l41 = dev_get_drvdata(dev); +@@ -572,13 +600,7 @@ static void cs35l41_hda_play_done(struct device *dev) + + cs35l41_global_enable(dev, reg, cs35l41->hw_cfg.bst_type, 1, + cs35l41->firmware_running); +- if (cs35l41->firmware_running) { +- regmap_multi_reg_write(reg, cs35l41_hda_unmute_dsp, +- ARRAY_SIZE(cs35l41_hda_unmute_dsp)); +- } else { +- regmap_multi_reg_write(reg, cs35l41_hda_unmute, +- ARRAY_SIZE(cs35l41_hda_unmute)); +- } ++ cs35l41_mute(dev, false); + } + + static void cs35l41_hda_pause_start(struct device *dev) +@@ -588,7 +610,7 @@ static void cs35l41_hda_pause_start(struct device *dev) + + dev_dbg(dev, "Pause (Start)\n"); + +- regmap_multi_reg_write(reg, cs35l41_hda_mute, ARRAY_SIZE(cs35l41_hda_mute)); ++ cs35l41_mute(dev, true); + cs35l41_global_enable(dev, reg, cs35l41->hw_cfg.bst_type, 0, + cs35l41->firmware_running); + } +@@ -1116,6 +1138,53 @@ static int cs35l41_create_controls(struct cs35l41_hda *cs35l41) + return 0; + } + ++static bool cs35l41_dsm_supported(acpi_handle handle, unsigned int commands) ++{ ++ guid_t guid; ++ ++ guid_parse(CS35L41_UUID, &guid); ++ ++ return acpi_check_dsm(handle, &guid, 0, BIT(commands)); ++} ++ ++static int cs35l41_get_acpi_mute_state(struct cs35l41_hda *cs35l41, acpi_handle handle) ++{ ++ guid_t guid; ++ union acpi_object *ret; ++ int mute = -ENODEV; ++ ++ guid_parse(CS35L41_UUID, &guid); ++ ++ if (cs35l41_dsm_supported(handle, CS35L41_DSM_GET_MUTE)) { ++ ret = acpi_evaluate_dsm(handle, &guid, 0, CS35L41_DSM_GET_MUTE, NULL); ++ mute = *ret->buffer.pointer; ++ dev_dbg(cs35l41->dev, "CS35L41_DSM_GET_MUTE: %d\n", mute); ++ } ++ ++ dev_dbg(cs35l41->dev, "%s: %d\n", __func__, mute); ++ ++ return mute; ++} ++ ++static void cs35l41_acpi_device_notify(acpi_handle handle, u32 event, struct device *dev) ++{ ++ struct cs35l41_hda *cs35l41 = dev_get_drvdata(dev); ++ int mute; ++ ++ if (event != CS35L41_NOTIFY_EVENT) ++ return; ++ ++ mute = cs35l41_get_acpi_mute_state(cs35l41, handle); ++ if (mute < 0) { ++ dev_warn(cs35l41->dev, "Unable to retrieve mute state: %d\n", mute); ++ return; ++ } ++ ++ dev_dbg(cs35l41->dev, "Requesting mute value: %d\n", mute); ++ cs35l41->mute_override = (mute > 0); ++ cs35l41_mute(cs35l41->dev, cs35l41->mute_override); ++} ++ + static int cs35l41_hda_bind(struct device *dev, struct device *master, void *master_data) + { + struct cs35l41_hda *cs35l41 = dev_get_drvdata(dev); +@@ -1157,6 +1226,14 @@ static int cs35l41_hda_bind(struct device *dev, struct device *master, void *mas + comps->playback_hook = cs35l41_hda_playback_hook; + comps->pre_playback_hook = cs35l41_hda_pre_playback_hook; + comps->post_playback_hook = cs35l41_hda_post_playback_hook; ++ comps->acpi_notify = cs35l41_acpi_device_notify; ++ comps->adev = cs35l41->dacpi; ++ ++ comps->acpi_notifications_supported = cs35l41_dsm_supported(acpi_device_handle(comps->adev), ++ CS35L41_DSM_GET_MUTE); ++ ++ cs35l41->mute_override = cs35l41_get_acpi_mute_state(cs35l41, ++ acpi_device_handle(cs35l41->dacpi)) > 0; + + mutex_unlock(&cs35l41->fw_mutex); + +@@ -1430,8 +1507,8 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i + return -ENODEV; + } + ++ cs35l41->dacpi = adev; + physdev = get_device(acpi_get_first_physical_node(adev)); +- acpi_dev_put(adev); + + sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev)); + if (IS_ERR(sub)) +@@ -1541,6 +1618,7 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i + hw_cfg->valid = false; + hw_cfg->gpio1.valid = false; + hw_cfg->gpio2.valid = false; ++ acpi_dev_put(cs35l41->dacpi); + put_physdev: + put_device(physdev); + +@@ -1644,10 +1722,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i + if (ret) + goto err; + +- ret = regmap_multi_reg_write(cs35l41->regmap, cs35l41_hda_mute, +- ARRAY_SIZE(cs35l41_hda_mute)); +- if (ret) +- goto err; ++ cs35l41_mute(cs35l41->dev, true); + + INIT_WORK(&cs35l41->fw_load_work, cs35l41_fw_load_work); + mutex_init(&cs35l41->fw_mutex); +@@ -1684,6 +1759,8 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i + if (cs35l41_safe_reset(cs35l41->regmap, cs35l41->hw_cfg.bst_type)) + gpiod_set_value_cansleep(cs35l41->reset_gpio, 0); + gpiod_put(cs35l41->reset_gpio); ++ gpiod_put(cs35l41->cs_gpio); ++ acpi_dev_put(cs35l41->dacpi); + kfree(cs35l41->acpi_subsystem_id); + + return ret; +@@ -1703,11 +1780,14 @@ void cs35l41_hda_remove(struct device *dev) + + component_del(cs35l41->dev, &cs35l41_hda_comp_ops); + ++ acpi_dev_put(cs35l41->dacpi); ++ + pm_runtime_put_noidle(cs35l41->dev); + + if (cs35l41_safe_reset(cs35l41->regmap, cs35l41->hw_cfg.bst_type)) + gpiod_set_value_cansleep(cs35l41->reset_gpio, 0); + gpiod_put(cs35l41->reset_gpio); ++ gpiod_put(cs35l41->cs_gpio); + kfree(cs35l41->acpi_subsystem_id); + } + EXPORT_SYMBOL_NS_GPL(cs35l41_hda_remove, SND_HDA_SCODEC_CS35L41); +diff --git a/sound/pci/hda/cs35l41_hda.h b/sound/pci/hda/cs35l41_hda.h +index b93bf762976e..3d925d677213 100644 +--- a/sound/pci/hda/cs35l41_hda.h ++++ b/sound/pci/hda/cs35l41_hda.h +@@ -10,6 +10,7 @@ + #ifndef __CS35L41_HDA_H__ + #define __CS35L41_HDA_H__ + ++#include + #include + #include + #include +@@ -34,8 +35,8 @@ struct cs35l41_amp_efi_data { + } __packed; + + enum cs35l41_hda_spk_pos { +- CS35l41_LEFT, +- CS35l41_RIGHT, ++ CS35L41_LEFT, ++ CS35L41_RIGHT, + }; + + enum cs35l41_hda_gpio_function { +@@ -49,6 +50,7 @@ struct cs35l41_hda { + struct device *dev; + struct regmap *regmap; + struct gpio_desc *reset_gpio; ++ struct gpio_desc *cs_gpio; + struct cs35l41_hw_cfg hw_cfg; + struct hda_codec *codec; + +@@ -70,6 +72,8 @@ struct cs35l41_hda { + bool halo_initialized; + bool playback_started; + struct cs_dsp cs_dsp; ++ struct acpi_device *dacpi; ++ bool mute_override; + }; + + enum halo_state { +diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c +index b62a4e6968e2..c9eb70290973 100644 +--- a/sound/pci/hda/cs35l41_hda_property.c ++++ b/sound/pci/hda/cs35l41_hda_property.c +@@ -6,9 +6,300 @@ + // + // Author: Stefan Binding + ++#include + #include + #include + #include "cs35l41_hda_property.h" ++#include ++ ++#define MAX_AMPS 4 ++ ++struct cs35l41_config { ++ const char *ssid; ++ enum { ++ SPI, ++ I2C ++ } bus; ++ int num_amps; ++ enum { ++ INTERNAL, ++ EXTERNAL ++ } boost_type; ++ u8 channel[MAX_AMPS]; ++ int reset_gpio_index; /* -1 if no reset gpio */ ++ int spkid_gpio_index; /* -1 if no spkid gpio */ ++ int cs_gpio_index; /* -1 if no cs gpio, or cs-gpios already exists, max num amps == 2 */ ++ int boost_ind_nanohenry; /* Required if boost_type == Internal */ ++ int boost_peak_milliamp; /* Required if boost_type == Internal */ ++ int boost_cap_microfarad; /* Required if boost_type == Internal */ ++}; ++ ++static const struct cs35l41_config cs35l41_config_table[] = { ++/* ++ * Device 103C89C6 does have _DSD, however it is setup to use the wrong boost type. ++ * We can override the _DSD to correct the boost type here. ++ * Since this laptop has valid ACPI, we do not need to handle cs-gpios, since that already exists ++ * in the ACPI. The Reset GPIO is also valid, so we can use the Reset defined in _DSD. ++ */ ++ { "103C89C6", SPI, 2, INTERNAL, { CS35L41_RIGHT, CS35L41_LEFT, 0, 0 }, -1, -1, -1, 1000, 4500, 24 }, ++ { "104312AF", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, ++ { "10431433", I2C, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 1000, 4500, 24 }, ++ { "10431463", I2C, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 1000, 4500, 24 }, ++ { "10431473", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, -1, 0, 1000, 4500, 24 }, ++ { "10431483", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, -1, 0, 1000, 4500, 24 }, ++ { "10431493", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, ++ { "104314D3", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, ++ { "104314E3", I2C, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 1000, 4500, 24 }, ++ { "10431503", I2C, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 1000, 4500, 24 }, ++ { "10431533", I2C, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 1000, 4500, 24 }, ++ { "10431573", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, ++ { "10431663", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, -1, 0, 1000, 4500, 24 }, ++ { "104316D3", SPI, 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 0, 0, 0 }, ++ { "104316F3", SPI, 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 0, 0, 0 }, ++ { "104317F3", I2C, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 1000, 4500, 24 }, ++ { "10431863", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, ++ { "104318D3", I2C, 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 0, 0, 0 }, ++ { "10431C9F", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, ++ { "10431CAF", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, ++ { "10431CCF", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, ++ { "10431CDF", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, ++ { "10431CEF", SPI, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 1000, 4500, 24 }, ++ { "10431D1F", I2C, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 1000, 4500, 24 }, ++ { "10431DA2", SPI, 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 0, 0, 0 }, ++ { "10431E02", SPI, 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 0, 0, 0 }, ++ { "10431EE2", I2C, 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, -1, -1, 0, 0, 0 }, ++ { "10431F12", I2C, 2, INTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 0, 1, -1, 1000, 4500, 24 }, ++ { "10431F1F", SPI, 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, -1, 0, 0, 0, 0 }, ++ { "10431F62", SPI, 2, EXTERNAL, { CS35L41_LEFT, CS35L41_RIGHT, 0, 0 }, 1, 2, 0, 0, 0, 0 }, ++ {} ++}; ++ ++static int cs35l41_add_gpios(struct cs35l41_hda *cs35l41, struct device *physdev, int reset_gpio, ++ int spkid_gpio, int cs_gpio_index, int num_amps) ++{ ++ struct acpi_gpio_mapping *gpio_mapping; ++ struct acpi_gpio_params *reset_gpio_params; ++ struct acpi_gpio_params *spkid_gpio_params; ++ struct acpi_gpio_params *cs_gpio_params; ++ unsigned int num_entries = 0; ++ unsigned int reset_index, spkid_index, csgpio_index; ++ int i; ++ ++ /* ++ * GPIO Mapping only needs to be done once, since it would be available for subsequent amps ++ */ ++ if (cs35l41->dacpi->driver_gpios) ++ return 0; ++ ++ if (reset_gpio >= 0) { ++ reset_index = num_entries; ++ num_entries++; ++ } ++ ++ if (spkid_gpio >= 0) { ++ spkid_index = num_entries; ++ num_entries++; ++ } ++ ++ if ((cs_gpio_index >= 0) && (num_amps == 2)) { ++ csgpio_index = num_entries; ++ num_entries++; ++ } ++ ++ if (!num_entries) ++ return 0; ++ ++ /* must include termination entry */ ++ num_entries++; ++ ++ gpio_mapping = devm_kcalloc(physdev, num_entries, sizeof(struct acpi_gpio_mapping), ++ GFP_KERNEL); ++ ++ if (!gpio_mapping) ++ goto err; ++ ++ if (reset_gpio >= 0) { ++ gpio_mapping[reset_index].name = "reset-gpios"; ++ reset_gpio_params = devm_kcalloc(physdev, num_amps, sizeof(struct acpi_gpio_params), ++ GFP_KERNEL); ++ if (!reset_gpio_params) ++ goto err; ++ ++ for (i = 0; i < num_amps; i++) ++ reset_gpio_params[i].crs_entry_index = reset_gpio; ++ ++ gpio_mapping[reset_index].data = reset_gpio_params; ++ gpio_mapping[reset_index].size = num_amps; ++ } ++ ++ if (spkid_gpio >= 0) { ++ gpio_mapping[spkid_index].name = "spk-id-gpios"; ++ spkid_gpio_params = devm_kcalloc(physdev, num_amps, sizeof(struct acpi_gpio_params), ++ GFP_KERNEL); ++ if (!spkid_gpio_params) ++ goto err; ++ ++ for (i = 0; i < num_amps; i++) ++ spkid_gpio_params[i].crs_entry_index = spkid_gpio; ++ ++ gpio_mapping[spkid_index].data = spkid_gpio_params; ++ gpio_mapping[spkid_index].size = num_amps; ++ } ++ ++ if ((cs_gpio_index >= 0) && (num_amps == 2)) { ++ gpio_mapping[csgpio_index].name = "cs-gpios"; ++ /* only one GPIO CS is supported without using _DSD, obtained using index 0 */ ++ cs_gpio_params = devm_kzalloc(physdev, sizeof(struct acpi_gpio_params), GFP_KERNEL); ++ if (!cs_gpio_params) ++ goto err; ++ ++ cs_gpio_params->crs_entry_index = cs_gpio_index; ++ ++ gpio_mapping[csgpio_index].data = cs_gpio_params; ++ gpio_mapping[csgpio_index].size = 1; ++ } ++ ++ return devm_acpi_dev_add_driver_gpios(physdev, gpio_mapping); ++err: ++ devm_kfree(physdev, gpio_mapping); ++ devm_kfree(physdev, reset_gpio_params); ++ devm_kfree(physdev, spkid_gpio_params); ++ devm_kfree(physdev, cs_gpio_params); ++ return -ENOMEM; ++} ++ ++static int generic_dsd_config(struct cs35l41_hda *cs35l41, struct device *physdev, int id, ++ const char *hid) ++{ ++ struct cs35l41_hw_cfg *hw_cfg = &cs35l41->hw_cfg; ++ const struct cs35l41_config *cfg; ++ struct gpio_desc *cs_gpiod; ++ struct spi_device *spi; ++ bool dsd_found; ++ int ret; ++ ++ for (cfg = cs35l41_config_table; cfg->ssid; cfg++) { ++ if (!strcasecmp(cfg->ssid, cs35l41->acpi_subsystem_id)) ++ break; ++ } ++ ++ if (!cfg->ssid) ++ return -ENOENT; ++ ++ if (!cs35l41->dacpi || cs35l41->dacpi != ACPI_COMPANION(physdev)) { ++ dev_err(cs35l41->dev, "ACPI Device does not match, cannot override _DSD.\n"); ++ return -ENODEV; ++ } ++ ++ dev_info(cs35l41->dev, "Adding DSD properties for %s\n", cs35l41->acpi_subsystem_id); ++ ++ dsd_found = acpi_dev_has_props(cs35l41->dacpi); ++ ++ if (!dsd_found) { ++ ret = cs35l41_add_gpios(cs35l41, physdev, cfg->reset_gpio_index, ++ cfg->spkid_gpio_index, cfg->cs_gpio_index, ++ cfg->num_amps); ++ if (ret) { ++ dev_err(cs35l41->dev, "Error adding GPIO mapping: %d\n", ret); ++ return ret; ++ } ++ } else if (cfg->reset_gpio_index >= 0 || cfg->spkid_gpio_index >= 0) { ++ dev_warn(cs35l41->dev, "Cannot add Reset/Speaker ID/SPI CS GPIO Mapping, " ++ "_DSD already exists.\n"); ++ } ++ ++ if (cfg->bus == SPI) { ++ cs35l41->index = id; ++ /* ++ * Manually set the Chip Select for the second amp in the node. ++ * This is only supported for systems with 2 amps, since we cannot expand the ++ * default number of chip selects without using cs-gpios ++ * The CS GPIO must be set high prior to communicating with the first amp (which ++ * uses a native chip select), to ensure the second amp does not clash with the ++ * first. ++ */ ++ if (cfg->cs_gpio_index >= 0) { ++ spi = to_spi_device(cs35l41->dev); ++ ++ if (cfg->num_amps != 2) { ++ dev_warn(cs35l41->dev, ++ "Cannot update SPI CS, Number of Amps (%d) != 2\n", ++ cfg->num_amps); ++ } else if (dsd_found) { ++ dev_warn(cs35l41->dev, ++ "Cannot update SPI CS, _DSD already exists.\n"); ++ } else { ++ /* ++ * This is obtained using driver_gpios, since only one GPIO for CS ++ * exists, this can be obtained using index 0. ++ */ ++ cs_gpiod = gpiod_get_index(physdev, "cs", 0, GPIOD_OUT_LOW); ++ if (IS_ERR(cs_gpiod)) { ++ dev_err(cs35l41->dev, ++ "Unable to get Chip Select GPIO descriptor\n"); ++ return PTR_ERR(cs_gpiod); ++ } ++ if (id == 1) { ++ spi_set_csgpiod(spi, 0, cs_gpiod); ++ cs35l41->cs_gpio = cs_gpiod; ++ } else { ++ gpiod_set_value_cansleep(cs_gpiod, true); ++ gpiod_put(cs_gpiod); ++ } ++ spi_setup(spi); ++ } ++ } ++ } else { ++ if (cfg->num_amps > 2) ++ /* ++ * i2c addresses for 3/4 amps are used in order: 0x40, 0x41, 0x42, 0x43, ++ * subtracting 0x40 would give zero-based index ++ */ ++ cs35l41->index = id - 0x40; ++ else ++ /* i2c addr 0x40 for first amp (always), 0x41/0x42 for 2nd amp */ ++ cs35l41->index = id == 0x40 ? 0 : 1; ++ } ++ ++ if (cfg->num_amps == 3) ++ /* 3 amps means a center channel, so no duplicate channels */ ++ cs35l41->channel_index = 0; ++ else ++ /* ++ * if 4 amps, there are duplicate channels, so they need different indexes ++ * if 2 amps, no duplicate channels, channel_index would be 0 ++ */ ++ cs35l41->channel_index = cs35l41->index / 2; ++ ++ cs35l41->reset_gpio = fwnode_gpiod_get_index(acpi_fwnode_handle(cs35l41->dacpi), "reset", ++ cs35l41->index, GPIOD_OUT_LOW, ++ "cs35l41-reset"); ++ cs35l41->speaker_id = cs35l41_get_speaker_id(physdev, cs35l41->index, cfg->num_amps, -1); ++ ++ hw_cfg->spk_pos = cfg->channel[cs35l41->index]; ++ ++ if (cfg->boost_type == INTERNAL) { ++ hw_cfg->bst_type = CS35L41_INT_BOOST; ++ hw_cfg->bst_ind = cfg->boost_ind_nanohenry; ++ hw_cfg->bst_ipk = cfg->boost_peak_milliamp; ++ hw_cfg->bst_cap = cfg->boost_cap_microfarad; ++ hw_cfg->gpio1.func = CS35L41_NOT_USED; ++ hw_cfg->gpio1.valid = true; ++ } else { ++ hw_cfg->bst_type = CS35L41_EXT_BOOST; ++ hw_cfg->bst_ind = -1; ++ hw_cfg->bst_ipk = -1; ++ hw_cfg->bst_cap = -1; ++ hw_cfg->gpio1.func = CS35l41_VSPK_SWITCH; ++ hw_cfg->gpio1.valid = true; ++ } ++ ++ hw_cfg->gpio2.func = CS35L41_INTERRUPT; ++ hw_cfg->gpio2.valid = true; ++ hw_cfg->valid = true; ++ ++ return 0; ++} + + /* + * Device CLSA010(0/1) doesn't have _DSD so a gpiod_get by the label reset won't work. +@@ -43,37 +334,6 @@ static int lenovo_legion_no_acpi(struct cs35l41_hda *cs35l41, struct device *phy + return 0; + } + +-/* +- * Device 103C89C6 does have _DSD, however it is setup to use the wrong boost type. +- * We can override the _DSD to correct the boost type here. +- * Since this laptop has valid ACPI, we do not need to handle cs-gpios, since that already exists +- * in the ACPI. +- */ +-static int hp_vision_acpi_fix(struct cs35l41_hda *cs35l41, struct device *physdev, int id, +- const char *hid) +-{ +- struct cs35l41_hw_cfg *hw_cfg = &cs35l41->hw_cfg; +- +- dev_info(cs35l41->dev, "Adding DSD properties for %s\n", cs35l41->acpi_subsystem_id); +- +- cs35l41->index = id; +- cs35l41->channel_index = 0; +- cs35l41->reset_gpio = gpiod_get_index(physdev, NULL, 1, GPIOD_OUT_HIGH); +- cs35l41->speaker_id = -ENOENT; +- hw_cfg->spk_pos = cs35l41->index ? 1 : 0; // right:left +- hw_cfg->gpio1.func = CS35L41_NOT_USED; +- hw_cfg->gpio1.valid = true; +- hw_cfg->gpio2.func = CS35L41_INTERRUPT; +- hw_cfg->gpio2.valid = true; +- hw_cfg->bst_type = CS35L41_INT_BOOST; +- hw_cfg->bst_ind = 1000; +- hw_cfg->bst_ipk = 4500; +- hw_cfg->bst_cap = 24; +- hw_cfg->valid = true; +- +- return 0; +-} +- + struct cs35l41_prop_model { + const char *hid; + const char *ssid; +@@ -84,7 +344,36 @@ struct cs35l41_prop_model { + static const struct cs35l41_prop_model cs35l41_prop_model_table[] = { + { "CLSA0100", NULL, lenovo_legion_no_acpi }, + { "CLSA0101", NULL, lenovo_legion_no_acpi }, +- { "CSC3551", "103C89C6", hp_vision_acpi_fix }, ++ { "CSC3551", "103C89C6", generic_dsd_config }, ++ { "CSC3551", "104312AF", generic_dsd_config }, ++ { "CSC3551", "10431433", generic_dsd_config }, ++ { "CSC3551", "10431463", generic_dsd_config }, ++ { "CSC3551", "10431473", generic_dsd_config }, ++ { "CSC3551", "10431483", generic_dsd_config }, ++ { "CSC3551", "10431493", generic_dsd_config }, ++ { "CSC3551", "104314D3", generic_dsd_config }, ++ { "CSC3551", "104314E3", generic_dsd_config }, ++ { "CSC3551", "10431503", generic_dsd_config }, ++ { "CSC3551", "10431533", generic_dsd_config }, ++ { "CSC3551", "10431573", generic_dsd_config }, ++ { "CSC3551", "10431663", generic_dsd_config }, ++ { "CSC3551", "104316D3", generic_dsd_config }, ++ { "CSC3551", "104316F3", generic_dsd_config }, ++ { "CSC3551", "104317F3", generic_dsd_config }, ++ { "CSC3551", "10431863", generic_dsd_config }, ++ { "CSC3551", "104318D3", generic_dsd_config }, ++ { "CSC3551", "10431C9F", generic_dsd_config }, ++ { "CSC3551", "10431CAF", generic_dsd_config }, ++ { "CSC3551", "10431CCF", generic_dsd_config }, ++ { "CSC3551", "10431CDF", generic_dsd_config }, ++ { "CSC3551", "10431CEF", generic_dsd_config }, ++ { "CSC3551", "10431D1F", generic_dsd_config }, ++ { "CSC3551", "10431DA2", generic_dsd_config }, ++ { "CSC3551", "10431E02", generic_dsd_config }, ++ { "CSC3551", "10431EE2", generic_dsd_config }, ++ { "CSC3551", "10431F12", generic_dsd_config }, ++ { "CSC3551", "10431F1F", generic_dsd_config }, ++ { "CSC3551", "10431F62", generic_dsd_config }, + {} + }; + +@@ -97,7 +386,7 @@ int cs35l41_add_dsd_properties(struct cs35l41_hda *cs35l41, struct device *physd + if (!strcmp(model->hid, hid) && + (!model->ssid || + (cs35l41->acpi_subsystem_id && +- !strcmp(model->ssid, cs35l41->acpi_subsystem_id)))) ++ !strcasecmp(model->ssid, cs35l41->acpi_subsystem_id)))) + return model->add_prop(cs35l41, physdev, id, hid); + } + +diff --git a/sound/pci/hda/hda_component.h b/sound/pci/hda/hda_component.h +index f170aec967c1..bbd6f0ed16c1 100644 +--- a/sound/pci/hda/hda_component.h ++++ b/sound/pci/hda/hda_component.h +@@ -6,6 +6,7 @@ + * Cirrus Logic International Semiconductor Ltd. + */ + ++#include + #include + + #define HDA_MAX_COMPONENTS 4 +@@ -15,6 +16,9 @@ struct hda_component { + struct device *dev; + char name[HDA_MAX_NAME_SIZE]; + struct hda_codec *codec; ++ struct acpi_device *adev; ++ bool acpi_notifications_supported; ++ void (*acpi_notify)(acpi_handle handle, u32 event, struct device *dev); + void (*pre_playback_hook)(struct device *dev, int action); + void (*playback_hook)(struct device *dev, int action); + void (*post_playback_hook)(struct device *dev, int action); +diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c +index 2590879f0a84..e5fdec1c4065 100644 +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -9858,21 +9858,28 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x1043, 0x1313, "Asus K42JZ", ALC269VB_FIXUP_ASUS_MIC_NO_PRESENCE), + SND_PCI_QUIRK(0x1043, 0x13b0, "ASUS Z550SA", ALC256_FIXUP_ASUS_MIC), + SND_PCI_QUIRK(0x1043, 0x1427, "Asus Zenbook UX31E", ALC269VB_FIXUP_ASUS_ZENBOOK), +- SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650P", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), +- SND_PCI_QUIRK(0x1043, 0x1463, "Asus GA402X", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), +- SND_PCI_QUIRK(0x1043, 0x1473, "ASUS GU604V", ALC285_FIXUP_ASUS_HEADSET_MIC), +- SND_PCI_QUIRK(0x1043, 0x1483, "ASUS GU603V", ALC285_FIXUP_ASUS_HEADSET_MIC), +- SND_PCI_QUIRK(0x1043, 0x1493, "ASUS GV601V", ALC285_FIXUP_ASUS_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1043, 0x1433, "ASUS GX650PY/PZ/PV/PU/PYV/PZV/PIV/PVV", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1043, 0x1463, "Asus GA402X/GA402N", ALC285_FIXUP_ASUS_I2C_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1043, 0x1473, "ASUS GU604VI/VC/VE/VG/VJ/VQ/VU/VV/VY/VZ", ALC285_FIXUP_ASUS_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1043, 0x1483, "ASUS GU603VQ/VU/VV/VJ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1043, 0x1493, "ASUS GV601VV/VU/VJ/VQ/VI", ALC285_FIXUP_ASUS_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G614JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2), ++ SND_PCI_QUIRK(0x1043, 0x14e3, "ASUS G513PI/PU/PV", ALC287_FIXUP_CS35L41_I2C_2), ++ SND_PCI_QUIRK(0x1043, 0x1503, "ASUS G733PY/PZ/PZV/PYV", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x1043, 0x1517, "Asus Zenbook UX31A", ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A), +- SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301V", ALC285_FIXUP_ASUS_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1043, 0x1533, "ASUS GV302XA/XJ/XQ/XU/XV/XI", ALC287_FIXUP_CS35L41_I2C_2), ++ SND_PCI_QUIRK(0x1043, 0x1573, "ASUS GZ301VV/VQ/VU/VJ/VA/VC/VE/VVC/VQC/VUC/VJC/VEC/VCC", ALC285_FIXUP_ASUS_HEADSET_MIC), + SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK), +- SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZV", ALC285_FIXUP_ASUS_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1043, 0x1663, "ASUS GU603ZI/ZJ/ZQ/ZU/ZV", ALC285_FIXUP_ASUS_HEADSET_MIC), + SND_PCI_QUIRK(0x1043, 0x1683, "ASUS UM3402YAR", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x1043, 0x16b2, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), ++ SND_PCI_QUIRK(0x1043, 0x16d3, "ASUS UX5304VA", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x16e3, "ASUS UX50", ALC269_FIXUP_STEREO_DMIC), ++ SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS UX7602VI/BZ", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS), + SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), +- SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally RC71L_RC71L", ALC294_FIXUP_ASUS_ALLY), ++ SND_PCI_QUIRK(0x1043, 0x17f3, "ROG Ally NR2301L/X", ALC294_FIXUP_ASUS_ALLY), ++ SND_PCI_QUIRK(0x1043, 0x1863, "ASUS UX6404VI/VV", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), + SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), + SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS UM3504DA", ALC294_FIXUP_CS35L41_I2C_2), +@@ -9897,23 +9904,30 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { + SND_PCI_QUIRK(0x1043, 0x1c43, "ASUS UX8406MA", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x1c62, "ASUS GU603", ALC289_FIXUP_ASUS_GA401), + SND_PCI_QUIRK(0x1043, 0x1c92, "ASUS ROG Strix G15", ALC285_FIXUP_ASUS_G533Z_PINS), +- SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JI", ALC285_FIXUP_ASUS_HEADSET_MIC), +- SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JYR/JZR", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), ++ SND_PCI_QUIRK(0x1043, 0x1c9f, "ASUS G614JU/JV/JI", ALC285_FIXUP_ASUS_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1043, 0x1caf, "ASUS G634JY/JZ/JI/JG", ALC285_FIXUP_ASUS_SPI_REAR_SPEAKERS), + SND_PCI_QUIRK(0x1043, 0x1ccd, "ASUS X555UB", ALC256_FIXUP_ASUS_MIC), +- SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS ROG Strix G17 2023 (G713PV)", ALC287_FIXUP_CS35L41_I2C_2), ++ SND_PCI_QUIRK(0x1043, 0x1ccf, "ASUS G814JU/JV/JI", ALC245_FIXUP_CS35L41_SPI_2), ++ SND_PCI_QUIRK(0x1043, 0x1cdf, "ASUS G814JY/JZ/JG", ALC245_FIXUP_CS35L41_SPI_2), ++ SND_PCI_QUIRK(0x1043, 0x1cef, "ASUS G834JY/JZ/JI/JG", ALC285_FIXUP_ASUS_HEADSET_MIC), ++ SND_PCI_QUIRK(0x1043, 0x1d1f, "ASUS G713PI/PU/PV/PVN", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x1043, 0x1d42, "ASUS Zephyrus G14 2022", ALC289_FIXUP_ASUS_GA401), + SND_PCI_QUIRK(0x1043, 0x1d4e, "ASUS TM420", ALC256_FIXUP_ASUS_HPE), ++ SND_PCI_QUIRK(0x1043, 0x1da2, "ASUS UP6502ZA/ZD", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x1e02, "ASUS UX3402ZA", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x16a3, "ASUS UX3402VA", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x1e11, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA502), +- SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2), ++ SND_PCI_QUIRK(0x1043, 0x1e12, "ASUS UM6702RA/RC", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x1043, 0x1e51, "ASUS Zephyrus M15", ALC294_FIXUP_ASUS_GU502_PINS), + SND_PCI_QUIRK(0x1043, 0x1e5e, "ASUS ROG Strix G513", ALC294_FIXUP_ASUS_G513_PINS), + SND_PCI_QUIRK(0x1043, 0x1e8e, "ASUS Zephyrus G15", ALC289_FIXUP_ASUS_GA401), ++ SND_PCI_QUIRK(0x1043, 0x1ee2, "ASUS UM3402", ALC287_FIXUP_CS35L41_I2C_2), + SND_PCI_QUIRK(0x1043, 0x1c52, "ASUS Zephyrus G15 2022", ALC289_FIXUP_ASUS_GA401), + SND_PCI_QUIRK(0x1043, 0x1f11, "ASUS Zephyrus G14", ALC289_FIXUP_ASUS_GA401), + SND_PCI_QUIRK(0x1043, 0x1f12, "ASUS UM5302", ALC287_FIXUP_CS35L41_I2C_2), ++ SND_PCI_QUIRK(0x1043, 0x1f1f, "ASUS H7604JI/JV/J3D", ALC245_FIXUP_CS35L41_SPI_2), ++ SND_PCI_QUIRK(0x1043, 0x1f62, "ASUS UX7602ZM", ALC245_FIXUP_CS35L41_SPI_2), + SND_PCI_QUIRK(0x1043, 0x1f92, "ASUS ROG Flow X16", ALC289_FIXUP_ASUS_GA401), + SND_PCI_QUIRK(0x1043, 0x3030, "ASUS ZN270IE", ALC256_FIXUP_ASUS_AIO_GPIO2), + SND_PCI_QUIRK(0x1043, 0x3a20, "ASUS G614JZR", ALC245_FIXUP_CS35L41_SPI_2), diff --git a/SOURCES/platform-x86-asus-wmi-disable-USB0-hub-on-ROG-Ally-before-suspend.patch b/SOURCES/platform-x86-asus-wmi-disable-USB0-hub-on-ROG-Ally-before-suspend.patch deleted file mode 100644 index aec1ecc..0000000 --- a/SOURCES/platform-x86-asus-wmi-disable-USB0-hub-on-ROG-Ally-before-suspend.patch +++ /dev/null @@ -1,147 +0,0 @@ -From: "Luke D. Jones" -To: hdegoede@redhat.com -Cc: ilpo.jarvinen@linux.intel.com, - corentin.chary@gmail.com, - platform-driver-x86@vger.kernel.org, - linux-kernel@vger.kernel.org, - "Luke D. Jones" -Subject: [PATCH v2 1/1] platform/x86: asus-wmi: disable USB0 hub on ROG Ally - before suspend - -ASUS have worked around an issue in XInput where it doesn't support USB -selective suspend, which causes suspend issues in Windows. They worked -around this by adjusting the MCU firmware to disable the USB0 hub when -the screen is switched off during the Microsoft DSM suspend path in ACPI. - -The issue we have with this however is one of timing - the call the tells -the MCU to this isn't able to complete before suspend is done so we call -this in a prepare() and add a small msleep() to ensure it is done. This -must be done before the screen is switched off to prevent a variety of -possible races. - -Further to this the MCU powersave option must also be disabled as it can -cause a number of issues such as: -- unreliable resume connection of N-Key -- complete loss of N-Key if the power is plugged in while suspended -Disabling the powersave option prevents this. - -Without this the MCU is unable to initialise itself correctly on resume. - -Signed-off-by: Luke D. Jones -Tested-by: Philip Mueller -Reviewed-by: Hans de Goede ---- - drivers/platform/x86/asus-wmi.c | 50 ++++++++++++++++++++++ - include/linux/platform_data/x86/asus-wmi.h | 3 ++ - 2 files changed, 53 insertions(+) - -diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c -index 6a79f16233ab..4ba33dfebfd4 100644 ---- a/drivers/platform/x86/asus-wmi.c -+++ b/drivers/platform/x86/asus-wmi.c -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -132,6 +133,11 @@ module_param(fnlock_default, bool, 0444); - #define ASUS_SCREENPAD_BRIGHT_MAX 255 - #define ASUS_SCREENPAD_BRIGHT_DEFAULT 60 - -+/* Controls the power state of the USB0 hub on ROG Ally which input is on */ -+#define ASUS_USB0_PWR_EC0_CSEE "\\_SB.PCI0.SBRG.EC0.CSEE" -+/* 300ms so far seems to produce a reliable result on AC and battery */ -+#define ASUS_USB0_PWR_EC0_CSEE_WAIT 300 -+ - static const char * const ashs_ids[] = { "ATK4001", "ATK4002", NULL }; - - static int throttle_thermal_policy_write(struct asus_wmi *); -@@ -300,6 +306,9 @@ struct asus_wmi { - - bool fnlock_locked; - -+ /* The ROG Ally device requires the MCU USB device be disconnected before suspend */ -+ bool ally_mcu_usb_switch; -+ - struct asus_wmi_debug debug; - - struct asus_wmi_driver *driver; -@@ -4488,6 +4497,8 @@ static int asus_wmi_add(struct platform_device *pdev) - asus->nv_temp_tgt_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_NV_THERM_TARGET); - asus->panel_overdrive_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_PANEL_OD); - asus->mini_led_mode_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_MINI_LED_MODE); -+ asus->ally_mcu_usb_switch = acpi_has_method(NULL, ASUS_USB0_PWR_EC0_CSEE) -+ && dmi_match(DMI_BOARD_NAME, "RC71L"); - - err = fan_boost_mode_check_present(asus); - if (err) -@@ -4654,6 +4665,43 @@ static int asus_hotk_resume(struct device *device) - asus_wmi_fnlock_update(asus); - - asus_wmi_tablet_mode_get_state(asus); -+ -+ return 0; -+} -+ -+static int asus_hotk_resume_early(struct device *device) -+{ -+ struct asus_wmi *asus = dev_get_drvdata(device); -+ -+ if (asus->ally_mcu_usb_switch) { -+ if (ACPI_FAILURE(acpi_execute_simple_method(NULL, ASUS_USB0_PWR_EC0_CSEE, 0xB8))) -+ dev_err(device, "ROG Ally MCU failed to connect USB dev\n"); -+ else -+ msleep(ASUS_USB0_PWR_EC0_CSEE_WAIT); -+ } -+ return 0; -+} -+ -+static int asus_hotk_prepare(struct device *device) -+{ -+ struct asus_wmi *asus = dev_get_drvdata(device); -+ int result, err; -+ -+ if (asus->ally_mcu_usb_switch) { -+ /* When powersave is enabled it causes many issues with resume of USB hub */ -+ result = asus_wmi_get_devstate_simple(asus, ASUS_WMI_DEVID_MCU_POWERSAVE); -+ if (result == 1) { -+ dev_warn(device, "MCU powersave enabled, disabling to prevent resume issues"); -+ err = asus_wmi_set_devstate(ASUS_WMI_DEVID_MCU_POWERSAVE, 0, &result); -+ if (err || result != 1) -+ dev_err(device, "Failed to set MCU powersave mode: %d\n", err); -+ } -+ /* sleep required to ensure USB0 is disabled before sleep continues */ -+ if (ACPI_FAILURE(acpi_execute_simple_method(NULL, ASUS_USB0_PWR_EC0_CSEE, 0xB7))) -+ dev_err(device, "ROG Ally MCU failed to disconnect USB dev\n"); -+ else -+ msleep(ASUS_USB0_PWR_EC0_CSEE_WAIT); -+ } - return 0; - } - -@@ -4701,6 +4749,8 @@ static const struct dev_pm_ops asus_pm_ops = { - .thaw = asus_hotk_thaw, - .restore = asus_hotk_restore, - .resume = asus_hotk_resume, -+ .resume_early = asus_hotk_resume_early, -+ .prepare = asus_hotk_prepare, - }; - - /* Registration ***************************************************************/ -diff --git a/include/linux/platform_data/x86/asus-wmi.h b/include/linux/platform_data/x86/asus-wmi.h -index 63e630276499..ab1c7deff118 100644 ---- a/include/linux/platform_data/x86/asus-wmi.h -+++ b/include/linux/platform_data/x86/asus-wmi.h -@@ -114,6 +114,9 @@ - /* Charging mode - 1=Barrel, 2=USB */ - #define ASUS_WMI_DEVID_CHARGE_MODE 0x0012006C - -+/* MCU powersave mode */ -+#define ASUS_WMI_DEVID_MCU_POWERSAVE 0x001200E2 -+ - /* epu is connected? 1 == true */ - #define ASUS_WMI_DEVID_EGPU_CONNECTED 0x00090018 - /* egpu on/off */ diff --git a/SOURCES/rog-ally-audio-fix.patch b/SOURCES/rog-ally-audio-fix.patch index 9626c61..e3f6e1d 100644 --- a/SOURCES/rog-ally-audio-fix.patch +++ b/SOURCES/rog-ally-audio-fix.patch @@ -2,16 +2,16 @@ diff --git a/sound/pci/hda/cd35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_pr index 6b704fd..d63617f 100644 --- a/sound/pci/hda/cs35l41_hda_property.c +++ b/sound/pci/hda/cs35l41_hda_property.c -@@ -6,7 +6,9 @@ - // +@@ -7,7 +7,9 @@ // Author: Stefan Binding + #include +#include #include +#include #include #include "cs35l41_hda_property.h" - + #include @@ -117,6 +119,40 @@ static int asus_rog_2023_no_acpi(struct cs35l41_hda *cs35l41, struct device *phy return 0; } @@ -53,12 +53,12 @@ index 6b704fd..d63617f 100644 struct cs35l41_prop_model { const char *hid; const char *ssid; -@@ -134,7 +170,7 @@ static const struct cs35l41_prop_model cs35l41_prop_model_table[] = { - { "CSC3551", "10431483", asus_rog_2023_no_acpi }, // GU603V spi, rst=1, spkr=1 - { "CSC3551", "10431493", asus_rog_2023_no_acpi }, // GV601V spi, rst=1 - { "CSC3551", "10431573", asus_rog_2023_no_acpi }, // GZ301V spi, rst=0 -- { "CSC3551", "104317F3", asus_rog_2023_no_acpi }, // ROG ALLY i2c, rst=0 -+ { "CSC3551", "104317F3", asus_rog_2023_ally_fix }, // ASUS ROG ALLY - i2c, rst=0 - { "CSC3551", "10431B93", asus_rog_2023_no_acpi }, // G614J spi, rst=0 - { "CSC3551", "10431C9F", asus_rog_2023_no_acpi }, // G614JI spi, rst=0 - { "CSC3551", "10431CAF", asus_rog_2023_no_acpi }, // G634J spi, rst=1 +@@ -359,7 +359,7 @@ + { "CSC3551", "10431663", generic_dsd_config }, + { "CSC3551", "104316D3", generic_dsd_config }, + { "CSC3551", "104316F3", generic_dsd_config }, +- { "CSC3551", "104317F3", generic_dsd_config }, ++ { "CSC3551", "104317F3", asus_rog_2023_ally_fix }, + { "CSC3551", "10431863", generic_dsd_config }, + { "CSC3551", "104318D3", generic_dsd_config }, + { "CSC3551", "10431C9F", generic_dsd_config }, diff --git a/SOURCES/steamdeck-oled-hw-quirks.patch b/SOURCES/steamdeck-oled-hw-quirks.patch index 8c39260..e233674 100644 --- a/SOURCES/steamdeck-oled-hw-quirks.patch +++ b/SOURCES/steamdeck-oled-hw-quirks.patch @@ -71,34 +71,6 @@ index e8b2fc4002a52..3c69d860e1c9d 100644 -- GitLab -From a32cc4f110bcd8d4595ff0812a72a521e99006ac Mon Sep 17 00:00:00 2001 -From: Keith Mikoleit -Date: Fri, 22 Sep 2023 17:30:44 -0700 -Subject: [PATCH] drm/amd/display: change default edp brightness check to min 1 - nit - ---- - .../amd/display/dc/link/protocols/link_edp_panel_control.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c -index 2039a345f23a1..e4626f2072f0f 100644 ---- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c -+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c -@@ -280,8 +280,8 @@ - if (link && link->dpcd_sink_ext_caps.bits.oled == 1) { - if (!read_default_bl_aux(link, &default_backlight)) - default_backlight = 150000; -- // if > 5000, it might be wrong readback -- if (default_backlight > 5000000) -+ // if < 1 nits or > 5000, it might be wrong readback -+ if (default_backlight < 1000 || default_backlight > 5000000) - default_backlight = 150000; - - return edp_set_backlight_level_nits(link, true, --- -GitLab - From b59fed802470f07fafe72f6a2bdda2163da5ba33 Mon Sep 17 00:00:00 2001 From: Swapnil Patel Date: Tue, 26 Sep 2023 16:24:25 -0400 -- cgit v1.2.3