Commit 2c954a37 authored by Mohammad Rafi Shaik's avatar Mohammad Rafi Shaik Committed by Mark Brown

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: default avatarMohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: default avatarMohammad Rafi Shaik <quic_mohs@quicinc.com>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230619101653.9750-7-srinivas.kandagatla@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e41521b6
...@@ -787,6 +787,14 @@ static int audioreach_module_enable(struct q6apm_graph *graph, ...@@ -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); 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, static int audioreach_mfc_set_media_format(struct q6apm_graph *graph,
struct audioreach_module *module, struct audioreach_module *module,
struct audioreach_module_config *cfg) struct audioreach_module_config *cfg)
...@@ -1270,6 +1278,9 @@ int audioreach_set_media_format(struct q6apm_graph *graph, struct audioreach_mod ...@@ -1270,6 +1278,9 @@ int audioreach_set_media_format(struct q6apm_graph *graph, struct audioreach_mod
case MODULE_ID_MFC: case MODULE_ID_MFC:
rc = audioreach_mfc_set_media_format(graph, module, cfg); rc = audioreach_mfc_set_media_format(graph, module, cfg);
break; break;
case MODULE_ID_GAPLESS:
rc = audioreach_gapless_set_media_format(graph, module, cfg);
break;
default: default:
rc = 0; rc = 0;
} }
......
...@@ -27,6 +27,7 @@ struct q6apm_graph; ...@@ -27,6 +27,7 @@ struct q6apm_graph;
#define MODULE_ID_AAC_DEC 0x0700101F #define MODULE_ID_AAC_DEC 0x0700101F
#define MODULE_ID_FLAC_DEC 0x0700102F #define MODULE_ID_FLAC_DEC 0x0700102F
#define MODULE_ID_MP3_DECODE 0x0700103B #define MODULE_ID_MP3_DECODE 0x0700103B
#define MODULE_ID_GAPLESS 0x0700104D
#define MODULE_ID_DISPLAY_PORT_SINK 0x07001069 #define MODULE_ID_DISPLAY_PORT_SINK 0x07001069
#define APM_CMD_GET_SPF_STATE 0x01001021 #define APM_CMD_GET_SPF_STATE 0x01001021
...@@ -552,6 +553,8 @@ struct param_id_sal_limiter_enable { ...@@ -552,6 +553,8 @@ struct param_id_sal_limiter_enable {
} __packed; } __packed;
#define PARAM_ID_MFC_OUTPUT_MEDIA_FORMAT 0x08001024 #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 { struct param_id_mfc_media_format {
uint32_t sample_rate; uint32_t sample_rate;
...@@ -560,6 +563,10 @@ struct param_id_mfc_media_format { ...@@ -560,6 +563,10 @@ struct param_id_mfc_media_format {
uint16_t channel_mapping[]; uint16_t channel_mapping[];
} __packed; } __packed;
struct param_id_gapless_early_eos_delay_t {
uint32_t early_eos_delay_ms;
} __packed;
struct media_format { struct media_format {
uint32_t data_format; uint32_t data_format;
uint32_t fmt_id; uint32_t fmt_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment