Patch "ASoC: soc-acpi: add helper to identify parent driver." has been added to the 5.10-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

    ASoC: soc-acpi: add helper to identify parent driver.

to the 5.10-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:
     asoc-soc-acpi-add-helper-to-identify-parent-driver.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 206e3f5f29eb40f8eebffffb0f7a25603f8fe351
Author: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
Date:   Thu Nov 12 16:38:15 2020 -0600

    ASoC: soc-acpi: add helper to identify parent driver.
    
    [ Upstream commit 644eebdbbf1154c995d6319c133d7d5b898c5ed2 ]
    
    Intel machine drivers are used by parent platform drivers based on
    closed-source firmware (Atom/SST and catpt) and SOF-based ones.
    
    In some cases for ACPI-based platforms, the behavior of machine
    drivers needs to be modified depending on the parent type, typically
    for card names and power management.
    
    An initial solution based on passing a boolean flag as a platform
    device parameter was tested earlier. Since it looked overkill, this
    patch suggests instead a simple string comparison to identify an SOF
    parent device/driver.
    
    Suggested-by: Kai Vehmanen <kai.vehmanen@xxxxxxxxxxxxxxx>
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx>
    Reviewed-by: Ranjani Sridharan <ranjani.sridharan@xxxxxxxxxxxxxxx>
    Reviewed-by: Rander Wang <rander.wang@xxxxxxxxxxxxxxx>
    Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20201112223825.39765-5-pierre-louis.bossart@xxxxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Stable-dep-of: 0cb3b7fd530b ("ASoC: Intel: Disable route checks for Skylake boards")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/include/sound/soc-acpi.h b/include/sound/soc-acpi.h
index b16a844d16ef9..9a43c44dcbbba 100644
--- a/include/sound/soc-acpi.h
+++ b/include/sound/soc-acpi.h
@@ -171,4 +171,10 @@ struct snd_soc_acpi_codecs {
 	u8 codecs[SND_SOC_ACPI_MAX_CODECS][ACPI_ID_LEN];
 };
 
+static inline bool snd_soc_acpi_sof_parent(struct device *dev)
+{
+	return dev->parent && dev->parent->driver && dev->parent->driver->name &&
+		!strcmp(dev->parent->driver->name, "sof-audio-acpi");
+}
+
 #endif




[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