diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2024-10-09 20:08:15 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2024-10-09 20:08:15 +0200 |
commit | d4a54e18ca707d4bf2ab7732fce591d598a7c15e (patch) | |
tree | 8fb0ab49c0254f4629bd12f95b69b3408d6fc685 /SOURCES/rog-ally-audio-fix.patch | |
parent | 2bc81be55c381d2bfd0543f36c4eafd8517c8972 (diff) | |
download | kernel-fsync-d4a54e18ca707d4bf2ab7732fce591d598a7c15e.tar.gz kernel-fsync-d4a54e18ca707d4bf2ab7732fce591d598a7c15e.zip |
kernel 6.11.2
Diffstat (limited to 'SOURCES/rog-ally-audio-fix.patch')
-rw-r--r-- | SOURCES/rog-ally-audio-fix.patch | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/SOURCES/rog-ally-audio-fix.patch b/SOURCES/rog-ally-audio-fix.patch deleted file mode 100644 index 5bd8e03..0000000 --- a/SOURCES/rog-ally-audio-fix.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff --git a/sound/pci/hda/cs35l41_hda_property.c b/sound/pci/hda/cs35l41_hda_property.c -index 2b8f8fd52..f4933be4c 100644 ---- a/sound/pci/hda/cs35l41_hda_property.c -+++ b/sound/pci/hda/cs35l41_hda_property.c -@@ -6,8 +6,10 @@ - // - // Author: Stefan Binding <sbinding@opensource.cirrus.com> - -+#include <linux/dmi.h> - #include <linux/acpi.h> - #include <linux/gpio/consumer.h> -+#include <linux/kernel.h> - #include <linux/string.h> - #include "cs35l41_hda_property.h" - #include <linux/spi/spi.h> -@@ -335,6 +337,40 @@ static int lenovo_legion_no_acpi(struct cs35l41_hda *cs35l41, struct device *phy - return 0; - } - -+static int asus_rog_2023_ally_fix(struct cs35l41_hda *cs35l41, struct device *physdev, int id, -+ const char *hid) -+{ -+ const char *rog_ally_bios_ver = dmi_get_system_info(DMI_BIOS_VERSION); -+ const char *rog_ally_bios_num = rog_ally_bios_ver + 6; // Dropping the RC71L. part before the number -+ int rog_ally_bios_int; -+ kstrtoint(rog_ally_bios_num, 10, &rog_ally_bios_int); -+ if(rog_ally_bios_int >= 330){ -+ printk(KERN_INFO "DSD properties exist in the %d BIOS. Not applying DSD override...\n", rog_ally_bios_int); -+ return -ENOENT; //Patch not applicable. Exiting... -+ } -+ -+ 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 == 0x40 ? 0 : 1; -+ cs35l41->channel_index = 0; -+ cs35l41->reset_gpio = gpiod_get_index(physdev, NULL, 0, GPIOD_OUT_HIGH); -+ cs35l41->speaker_id = cs35l41_get_speaker_id(physdev, 0, 0, 2); -+ hw_cfg->spk_pos = cs35l41->index; -+ 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; /* 1,000nH Inductance value */ -+ hw_cfg->bst_ipk = 4500; /* 4,500mA peak current */ -+ hw_cfg->bst_cap = 24; /* 24 microFarad cap value */ -+ hw_cfg->valid = true; -+ -+ return 0; -+} -+ - struct cs35l41_prop_model { - const char *hid; - const char *ssid; -@@ -418,7 +418,7 @@ - { "CSC3551", "104316A3", 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", "10431A83", generic_dsd_config }, |