mirror of
https://github.com/ukui/kernel.git
synced 2026-03-09 10:07:04 -07:00
ASoC: qdsp6: q6afe: Add q6afe driver
This patch adds support to Q6AFE (Audio Front End) module on Q6DSP. AFE module sits right at the other end of cpu where the codec/audio devices are connected. AFE provides abstraced interfaces to both hardware and virtual devices. Each AFE tx/rx port can be configured to connect to one of the hardware devices like codec, hdmi, slimbus, i2s and so on. AFE services include starting, stopping, and if needed, any configurations of the ports. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-and-tested-by: Rohit kumar <rohitkr@codeaurora.org> Reviewed-by: Banajit Goswami <bgoswami@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
637917b1ef
commit
7fa2d70f97
@@ -47,11 +47,15 @@ config SND_SOC_QDSP6_COMMON
|
||||
config SND_SOC_QDSP6_CORE
|
||||
tristate
|
||||
|
||||
config SND_SOC_QDSP6_AFE
|
||||
tristate
|
||||
|
||||
config SND_SOC_QDSP6
|
||||
tristate "SoC ALSA audio driver for QDSP6"
|
||||
depends on QCOM_APR && HAS_DMA
|
||||
select SND_SOC_QDSP6_COMMON
|
||||
select SND_SOC_QDSP6_CORE
|
||||
select SND_SOC_QDSP6_AFE
|
||||
help
|
||||
To add support for MSM QDSP6 Soc Audio.
|
||||
This will enable sound soc platform specific
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
obj-$(CONFIG_SND_SOC_QDSP6_COMMON) += q6dsp-common.o
|
||||
obj-$(CONFIG_SND_SOC_QDSP6_CORE) += q6core.o
|
||||
obj-$(CONFIG_SND_SOC_QDSP6_AFE) += q6afe.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,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__ */
|
||||
Reference in New Issue
Block a user