You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
ASoC: qdsp6: q6adm: Add q6adm driver
This patch adds support to Q6ADM (Audio Device Manager) module in q6dsp. ADM performs routing between audio streams and AFE ports. It does Rate matching for streams going to devices driven by different clocks, it handles volume ramping, Mixing with channel and bit-width. ADM creates and destroys dynamic COPP services for device-related audio processing as needed. This patch adds basic support to ADM. 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
ccfbb4f572
commit
7b20b2be51
@@ -50,12 +50,16 @@ config SND_SOC_QDSP6_CORE
|
||||
config SND_SOC_QDSP6_AFE
|
||||
tristate
|
||||
|
||||
config SND_SOC_QDSP6_ADM
|
||||
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
|
||||
select SND_SOC_QDSP6_ADM
|
||||
help
|
||||
To add support for MSM QDSP6 Soc Audio.
|
||||
This will enable sound soc platform specific
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
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
|
||||
obj-$(CONFIG_SND_SOC_QDSP6_ADM) += q6adm.o
|
||||
|
||||
646
sound/soc/qcom/qdsp6/q6adm.c
Normal file
646
sound/soc/qcom/qdsp6/q6adm.c
Normal file
File diff suppressed because it is too large
Load Diff
27
sound/soc/qcom/qdsp6/q6adm.h
Normal file
27
sound/soc/qcom/qdsp6/q6adm.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __Q6_ADM_V2_H__
|
||||
#define __Q6_ADM_V2_H__
|
||||
|
||||
#define ADM_PATH_PLAYBACK 0x1
|
||||
#define ADM_PATH_LIVE_REC 0x2
|
||||
#define MAX_COPPS_PER_PORT 8
|
||||
#define NULL_COPP_TOPOLOGY 0x00010312
|
||||
|
||||
/* multiple copp per stream. */
|
||||
struct route_payload {
|
||||
int num_copps;
|
||||
int session_id;
|
||||
int copp_idx[MAX_COPPS_PER_PORT];
|
||||
int port_id[MAX_COPPS_PER_PORT];
|
||||
};
|
||||
|
||||
struct q6copp;
|
||||
struct q6copp *q6adm_open(struct device *dev, int port_id, int path, int rate,
|
||||
int channel_mode, int topology, int perf_mode,
|
||||
uint16_t bit_width, int app_type, int acdb_id);
|
||||
int q6adm_close(struct device *dev, struct q6copp *copp);
|
||||
int q6adm_get_copp_id(struct q6copp *copp);
|
||||
int q6adm_matrix_map(struct device *dev, int path,
|
||||
struct route_payload payload_map, int perf_mode);
|
||||
|
||||
#endif /* __Q6_ADM_V2_H__ */
|
||||
Reference in New Issue
Block a user