aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/qcom/qdsp6/q6afe.h
blob: 3bd991a7c42d8ff07712756134be2178ef076f04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* SPDX-License-Identifier: GPL-2.0 */

#ifndef __Q6AFE_H__
#define __Q6AFE_H__

#include <dt-bindings/sound/qcom,q6afe.h>

#define AFE_PORT_MAX		48

#define MSM_AFE_PORT_TYPE_RX 0
#define MSM_AFE_PORT_TYPE_TX 1
#define AFE_MAX_PORTS AFE_PORT_MAX

struct q6afe_hdmi_cfg {
	u16                  datatype;
	u16                  channel_allocation;
	u32                  sample_rate;
	u16                  bit_width;
};

struct q6afe_port_config {
	struct q6afe_hdmi_cfg hdmi;
};

struct q6afe_port;

struct q6afe_port *q6afe_port_get_from_id(struct device *dev, int id);
int q6afe_port_start(struct q6afe_port *port);
int q6afe_port_stop(struct q6afe_port *port);
void q6afe_port_put(struct q6afe_port *port);
int q6afe_get_port_id(int index);
void q6afe_hdmi_port_prepare(struct q6afe_port *port,
			    struct q6afe_hdmi_cfg *cfg);

#endif /* __Q6AFE_H__ */