Patch "mfd: arizona-spi: Set pdata.hpdet_channel for ACPI enumerated devs" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mfd: arizona-spi: Set pdata.hpdet_channel for ACPI enumerated devs

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mfd-arizona-spi-set-pdata.hpdet_channel-for-acpi-enu.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit aff479b76ba1279385b3343b3344a9f8f7d5e552
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Sat Oct 14 22:54:14 2023 +0200

    mfd: arizona-spi: Set pdata.hpdet_channel for ACPI enumerated devs
    
    [ Upstream commit 831d1af85133e1763d41e20414912d9a1058ea72 ]
    
    Commit 9e86b2ad4c11 changed the channel used for HPDET detection
    (headphones vs lineout detection) from being hardcoded to
    ARIZONA_ACCDET_MODE_HPL (HP left channel) to it being configurable
    through arizona_pdata.hpdet_channel the DT/OF parsing added for
    filling arizona_pdata on devicetree platforms ensures that
    arizona_pdata.hpdet_channel gets set to ARIZONA_ACCDET_MODE_HPL
    when not specified in the devicetree-node.
    
    But on ACPI platforms where arizona_pdata is filled by
    arizona_spi_acpi_probe() arizona_pdata.hpdet_channel was not
    getting set, causing it to default to 0 aka ARIZONA_ACCDET_MODE_MIC.
    
    This causes headphones to get misdetected as line-out on some models.
    Fix this by setting hpdet_channel = ARIZONA_ACCDET_MODE_HPL.
    
    Fixes: e933836744a2 ("mfd: arizona: Add support for ACPI enumeration of WM5102 connected over SPI")
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231014205414.59415-1-hdegoede@xxxxxxxxxx
    Signed-off-by: Lee Jones <lee@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mfd/arizona-spi.c b/drivers/mfd/arizona-spi.c
index 5c4af05ed0440..3f83a77ce69e7 100644
--- a/drivers/mfd/arizona-spi.c
+++ b/drivers/mfd/arizona-spi.c
@@ -159,6 +159,9 @@ static int arizona_spi_acpi_probe(struct arizona *arizona)
 	arizona->pdata.micd_ranges = arizona_micd_aosp_ranges;
 	arizona->pdata.num_micd_ranges = ARRAY_SIZE(arizona_micd_aosp_ranges);
 
+	/* Use left headphone speaker for HP vs line-out detection */
+	arizona->pdata.hpdet_channel = ARIZONA_ACCDET_MODE_HPL;
+
 	return 0;
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux