mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 03:44:27 +08:00
ASoC: q6dsp: audioreach: Add gapless feature support
Add support for setting EOS delay command and receive the EOS response from ADSP, for seamless compress offload playback feature. Co-developed-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Mohammad Rafi Shaik <quic_mohs@quicinc.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230619101653.9750-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
e41521b6e2
commit
2c954a3714
@ -787,6 +787,14 @@ static int audioreach_module_enable(struct q6apm_graph *graph,
|
||||
return audioreach_send_u32_param(graph, module, PARAM_ID_MODULE_ENABLE, enable);
|
||||
}
|
||||
|
||||
static int audioreach_gapless_set_media_format(struct q6apm_graph *graph,
|
||||
struct audioreach_module *module,
|
||||
struct audioreach_module_config *cfg)
|
||||
{
|
||||
return audioreach_send_u32_param(graph, module, PARAM_ID_EARLY_EOS_DELAY,
|
||||
EARLY_EOS_DELAY_MS);
|
||||
}
|
||||
|
||||
static int audioreach_mfc_set_media_format(struct q6apm_graph *graph,
|
||||
struct audioreach_module *module,
|
||||
struct audioreach_module_config *cfg)
|
||||
@ -1270,6 +1278,9 @@ int audioreach_set_media_format(struct q6apm_graph *graph, struct audioreach_mod
|
||||
case MODULE_ID_MFC:
|
||||
rc = audioreach_mfc_set_media_format(graph, module, cfg);
|
||||
break;
|
||||
case MODULE_ID_GAPLESS:
|
||||
rc = audioreach_gapless_set_media_format(graph, module, cfg);
|
||||
break;
|
||||
default:
|
||||
rc = 0;
|
||||
}
|
||||
|
@ -27,6 +27,7 @@ struct q6apm_graph;
|
||||
#define MODULE_ID_AAC_DEC 0x0700101F
|
||||
#define MODULE_ID_FLAC_DEC 0x0700102F
|
||||
#define MODULE_ID_MP3_DECODE 0x0700103B
|
||||
#define MODULE_ID_GAPLESS 0x0700104D
|
||||
#define MODULE_ID_DISPLAY_PORT_SINK 0x07001069
|
||||
|
||||
#define APM_CMD_GET_SPF_STATE 0x01001021
|
||||
@ -552,6 +553,8 @@ struct param_id_sal_limiter_enable {
|
||||
} __packed;
|
||||
|
||||
#define PARAM_ID_MFC_OUTPUT_MEDIA_FORMAT 0x08001024
|
||||
#define PARAM_ID_EARLY_EOS_DELAY 0x0800114C
|
||||
#define EARLY_EOS_DELAY_MS 150
|
||||
|
||||
struct param_id_mfc_media_format {
|
||||
uint32_t sample_rate;
|
||||
@ -560,6 +563,10 @@ struct param_id_mfc_media_format {
|
||||
uint16_t channel_mapping[];
|
||||
} __packed;
|
||||
|
||||
struct param_id_gapless_early_eos_delay_t {
|
||||
uint32_t early_eos_delay_ms;
|
||||
} __packed;
|
||||
|
||||
struct media_format {
|
||||
uint32_t data_format;
|
||||
uint32_t fmt_id;
|
||||
|
Loading…
Reference in New Issue
Block a user