~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/soc/sof/sof-acpi-dev.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/soc/sof/sof-acpi-dev.c (Version linux-6.11-rc3) and /sound/soc/sof/sof-acpi-dev.c (Version linux-4.14.336)


  1 // SPDX-License-Identifier: (GPL-2.0-only OR B      1 
  2 //                                                
  3 // This file is provided under a dual BSD/GPLv    
  4 // redistributing this file, you may do so und    
  5 //                                                
  6 // Copyright(c) 2018 Intel Corporation            
  7 //                                                
  8 // Author: Liam Girdwood <liam.r.girdwood@linu    
  9 //                                                
 10                                                   
 11 #include <linux/acpi.h>                           
 12 #include <linux/firmware.h>                       
 13 #include <linux/module.h>                         
 14 #include <linux/pm_runtime.h>                     
 15 #include <sound/soc-acpi.h>                       
 16 #include <sound/soc-acpi-intel-match.h>           
 17 #include <sound/sof.h>                            
 18 #include "../intel/common/soc-intel-quirks.h"     
 19 #include "ops.h"                                  
 20 #include "sof-acpi-dev.h"                         
 21                                                   
 22 /* platform specific devices */                   
 23 #include "intel/shim.h"                           
 24                                                   
 25 static char *fw_path;                             
 26 module_param(fw_path, charp, 0444);               
 27 MODULE_PARM_DESC(fw_path, "alternate path for     
 28                                                   
 29 static char *tplg_path;                           
 30 module_param(tplg_path, charp, 0444);             
 31 MODULE_PARM_DESC(tplg_path, "alternate path fo    
 32                                                   
 33 static int sof_acpi_debug;                        
 34 module_param_named(sof_acpi_debug, sof_acpi_de    
 35 MODULE_PARM_DESC(sof_acpi_debug, "SOF ACPI deb    
 36                                                   
 37 #define SOF_ACPI_DISABLE_PM_RUNTIME BIT(0)        
 38                                                   
 39 const struct dev_pm_ops sof_acpi_pm = {           
 40         SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspen    
 41         SET_RUNTIME_PM_OPS(snd_sof_runtime_sus    
 42                            snd_sof_runtime_idl    
 43 };                                                
 44 EXPORT_SYMBOL_NS(sof_acpi_pm, SND_SOC_SOF_ACPI    
 45                                                   
 46 static void sof_acpi_probe_complete(struct dev    
 47 {                                                 
 48         dev_dbg(dev, "Completing SOF ACPI prob    
 49                                                   
 50         if (sof_acpi_debug & SOF_ACPI_DISABLE_    
 51                 return;                           
 52                                                   
 53         /* allow runtime_pm */                    
 54         pm_runtime_set_autosuspend_delay(dev,     
 55         pm_runtime_use_autosuspend(dev);          
 56         pm_runtime_enable(dev);                   
 57 }                                                 
 58                                                   
 59 int sof_acpi_probe(struct platform_device *pde    
 60 {                                                 
 61         struct device *dev = &pdev->dev;          
 62         struct snd_sof_pdata *sof_pdata;          
 63                                                   
 64         dev_dbg(dev, "ACPI DSP detected");        
 65                                                   
 66         sof_pdata = devm_kzalloc(dev, sizeof(*    
 67         if (!sof_pdata)                           
 68                 return -ENOMEM;                   
 69                                                   
 70         if (!desc->ops) {                         
 71                 dev_err(dev, "error: no matchi    
 72                 return -ENODEV;                   
 73         }                                         
 74                                                   
 75         sof_pdata->desc = desc;                   
 76         sof_pdata->dev = &pdev->dev;              
 77                                                   
 78         sof_pdata->ipc_file_profile_base.ipc_t    
 79         sof_pdata->ipc_file_profile_base.fw_pa    
 80         sof_pdata->ipc_file_profile_base.tplg_    
 81                                                   
 82         /* set callback to be called on succes    
 83         sof_pdata->sof_probe_complete = sof_ac    
 84                                                   
 85         /* call sof helper for DSP hardware pr    
 86         return snd_sof_device_probe(dev, sof_p    
 87 }                                                 
 88 EXPORT_SYMBOL_NS(sof_acpi_probe, SND_SOC_SOF_A    
 89                                                   
 90 void sof_acpi_remove(struct platform_device *p    
 91 {                                                 
 92         struct device *dev = &pdev->dev;          
 93                                                   
 94         if (!(sof_acpi_debug & SOF_ACPI_DISABL    
 95                 pm_runtime_disable(dev);          
 96                                                   
 97         /* call sof helper for DSP hardware re    
 98         snd_sof_device_remove(dev);               
 99 }                                                 
100 EXPORT_SYMBOL_NS(sof_acpi_remove, SND_SOC_SOF_    
101                                                   
102 MODULE_LICENSE("Dual BSD/GPL");                   
103 MODULE_DESCRIPTION("SOF support for ACPI platf    
104                                                   

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php