Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * This file is provided under a dual BSD/GPLv2 license.  When using or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  * redistributing this file, you may do so under either license.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  * Copyright(c) 2018 Intel Corporation. All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #ifndef __INCLUDE_SOUND_SOF_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #define __INCLUDE_SOUND_SOF_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include <linux/pci.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include <sound/soc.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include <sound/soc-acpi.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) struct snd_sof_dsp_ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  * SOF Platform data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) struct snd_sof_pdata {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 	const struct firmware *fw;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 	const char *name;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 	const char *platform;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 	struct device *dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) 	/* indicate how many first bytes shouldn't be loaded into DSP memory. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	size_t fw_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 	 * notification callback used if the hardware initialization
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 	 * can take time or is handled in a workqueue. This callback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 	 * can be used by the caller to e.g. enable runtime_pm
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) 	 * or limit functionality until all low-level inits are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 	 * complete.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 	void (*sof_probe_complete)(struct device *dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	/* descriptor */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 	const struct sof_dev_desc *desc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 	/* firmware and topology filenames */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	const char *fw_filename_prefix;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	const char *fw_filename;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	const char *tplg_filename_prefix;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	const char *tplg_filename;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	/* machine */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	struct platform_device *pdev_mach;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	const struct snd_soc_acpi_mach *machine;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	void *hw_pdata;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59)  * Descriptor used for setting up SOF platform data. This is used when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)  * ACPI/PCI data is missing or mapped differently.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) struct sof_dev_desc {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	/* list of machines using this configuration */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	struct snd_soc_acpi_mach *machines;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	/* alternate list of machines using this configuration */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	struct snd_soc_acpi_mach *alt_machines;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	bool use_acpi_target_states;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	/* Platform resource indexes in BAR / ACPI resources. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	/* Must set to -1 if not used - add new items to end */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	int resindex_lpe_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	int resindex_pcicfg_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	int resindex_imr_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	int irqindex_host_ipc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	int resindex_dma_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	/* DMA only valid when resindex_dma_base != -1*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	int dma_engine;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	int dma_size;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	/* IPC timeouts in ms */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	int ipc_timeout;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	int boot_timeout;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	/* chip information for dsp */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	const void *chip_info;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	/* defaults for no codec mode */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	const char *nocodec_tplg_filename;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 	/* defaults paths for firmware and topology files */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	const char *default_fw_path;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 	const char *default_tplg_path;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	/* default firmware name */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	const char *default_fw_filename;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	const struct snd_sof_dsp_ops *ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) int sof_nocodec_setup(struct device *dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		      const struct snd_sof_dsp_ops *ops);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) #endif