]>
git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blob - include/sound/sof.h
1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
6 * Copyright(c) 2018 Intel Corporation. All rights reserved.
8 * Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
11 #ifndef __INCLUDE_SOUND_SOF_H
12 #define __INCLUDE_SOUND_SOF_H
14 #include <linux/pci.h>
15 #include <sound/soc.h>
16 #include <sound/soc-acpi.h>
18 struct snd_sof_dsp_ops
;
23 struct snd_sof_pdata
{
24 const struct firmware
*fw
;
30 /* indicate how many first bytes shouldn't be loaded into DSP memory. */
34 * notification callback used if the hardware initialization
35 * can take time or is handled in a workqueue. This callback
36 * can be used by the caller to e.g. enable runtime_pm
37 * or limit functionality until all low-level inits are
40 void (*sof_probe_complete
)(struct device
*dev
);
43 const struct sof_dev_desc
*desc
;
45 /* firmware and topology filenames */
46 const char *fw_filename_prefix
;
47 const char *fw_filename
;
48 const char *tplg_filename_prefix
;
49 const char *tplg_filename
;
52 struct platform_device
*pdev_mach
;
53 const struct snd_soc_acpi_mach
*machine
;
59 * Descriptor used for setting up SOF platform data. This is used when
60 * ACPI/PCI data is missing or mapped differently.
63 /* list of machines using this configuration */
64 struct snd_soc_acpi_mach
*machines
;
66 /* alternate list of machines using this configuration */
67 struct snd_soc_acpi_mach
*alt_machines
;
69 /* Platform resource indexes in BAR / ACPI resources. */
70 /* Must set to -1 if not used - add new items to end */
71 int resindex_lpe_base
;
72 int resindex_pcicfg_base
;
73 int resindex_imr_base
;
74 int irqindex_host_ipc
;
75 int resindex_dma_base
;
77 /* DMA only valid when resindex_dma_base != -1*/
81 /* IPC timeouts in ms */
85 /* chip information for dsp */
86 const void *chip_info
;
88 /* defaults for no codec mode */
89 const char *nocodec_tplg_filename
;
91 /* defaults paths for firmware and topology files */
92 const char *default_fw_path
;
93 const char *default_tplg_path
;
95 /* default firmware name */
96 const char *default_fw_filename
;
98 const struct snd_sof_dsp_ops
*ops
;
101 int sof_nocodec_setup(struct device
*dev
,
102 const struct snd_sof_dsp_ops
*ops
);