1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __SOF_CLIENT_PROBES_H
4 #define __SOF_CLIENT_PROBES_H
6 struct snd_compr_stream;
7 struct snd_compr_tstamp;
8 struct snd_compr_params;
13 * Callbacks used on platforms where the control for audio is split between
14 * DSP and host, like HDA.
16 struct 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_tstamp *tstamp,
28 struct snd_soc_dai *dai);
31 struct sof_probe_point_desc {
32 unsigned int buffer_id;
34 unsigned int stream_tag;
37 struct sof_probes_ipc_ops {
38 int (*init)(struct sof_client_dev *cdev, u32 stream_tag,
40 int (*deinit)(struct sof_client_dev *cdev);
41 int (*points_info)(struct sof_client_dev *cdev,
42 struct sof_probe_point_desc **desc,
44 int (*points_add)(struct sof_client_dev *cdev,
45 struct sof_probe_point_desc *desc,
47 int (*points_remove)(struct sof_client_dev *cdev,
48 unsigned int *buffer_id, size_t num_buffer_id);
51 extern const struct sof_probes_ipc_ops ipc3_probe_ops;
52 extern const struct sof_probes_ipc_ops ipc4_probe_ops;
54 struct sof_probes_priv {
55 struct dentry *dfs_points;
56 struct dentry *dfs_points_remove;
57 u32 extractor_stream_tag;
58 struct snd_soc_card card;
61 const struct sof_probes_host_ops *host_ops;
62 const struct sof_probes_ipc_ops *ipc_ops;