File Index
Files and directories
Sign in
FILE

sof-client-probes.h

File preview with syntax highlighting.

linux-6.19.14/sound/soc/sof/sof-client-probes.h C
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2
 3#ifndef __SOF_CLIENT_PROBES_H
 4#define __SOF_CLIENT_PROBES_H
 5
 6struct snd_compr_stream;
 7struct snd_compr_tstamp64;
 8struct snd_compr_params;
 9struct sof_client_dev;
10struct snd_soc_dai;
11
12/*
13 * Callbacks used on platforms where the control for audio is split between
14 * DSP and host, like HDA.
15 */
16struct sof_probes_host_ops {
17	int (*startup)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream,
18		       struct snd_soc_dai *dai, u32 *stream_id);
19	int (*shutdown)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream,
20			struct snd_soc_dai *dai);
21	int (*set_params)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream,
22			  struct snd_compr_params *params,
23			  struct snd_soc_dai *dai);
24	int (*trigger)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream,
25		       int cmd, struct snd_soc_dai *dai);
26	int (*pointer)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream,
27		       struct snd_compr_tstamp64 *tstamp,
28		       struct snd_soc_dai *dai);
29};
30
31struct sof_probe_point_desc {
32	unsigned int buffer_id;
33	unsigned int purpose;
34	unsigned int stream_tag;
35} __packed;
36
37enum sof_probe_info_type {
38	PROBES_INFO_ACTIVE_PROBES,
39	PROBES_INFO_AVAILABE_PROBES,
40};
41
42struct sof_probes_ipc_ops {
43	int (*init)(struct sof_client_dev *cdev, u32 stream_tag,
44		    size_t buffer_size);
45	int (*deinit)(struct sof_client_dev *cdev);
46	int (*points_info)(struct sof_client_dev *cdev,
47			   struct sof_probe_point_desc **desc,
48			   size_t *num_desc, enum sof_probe_info_type type);
49	int (*point_print)(struct sof_client_dev *cdev, char *buf, size_t size,
50			   struct sof_probe_point_desc *desc);
51	int (*points_add)(struct sof_client_dev *cdev,
52			  struct sof_probe_point_desc *desc,
53			  size_t num_desc);
54	int (*points_remove)(struct sof_client_dev *cdev,
55			     unsigned int *buffer_id, size_t num_buffer_id);
56};
57
58extern const struct sof_probes_ipc_ops ipc3_probe_ops;
59extern const struct sof_probes_ipc_ops ipc4_probe_ops;
60
61struct sof_probes_priv {
62	struct dentry *dfs_points;
63	struct dentry *dfs_points_remove;
64	u32 extractor_stream_tag;
65	struct snd_soc_card card;
66	void *ipc_priv;
67
68	const struct sof_probes_host_ops *host_ops;
69	const struct sof_probes_ipc_ops *ipc_ops;
70};
71
72#endif
~/ Read-only file preview.