aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/qcom/qdsp6/q6asm.h
diff options
context:
space:
mode:
authorVinod Koul <vkoul@kernel.org>2020-03-16 11:22:19 +0530
committerMark Brown <broonie@kernel.org>2020-03-16 17:52:10 +0000
commit7076bf4da0b1b53dd5d96dc930c9899a8ad6f217 (patch)
treecebe6175981345c6d7ada2ee0695c0343f4d777f /sound/soc/qcom/qdsp6/q6asm.h
parentALSA: compress: add alac & ape decoder params (diff)
downloadwireguard-linux-7076bf4da0b1b53dd5d96dc930c9899a8ad6f217.tar.xz
wireguard-linux-7076bf4da0b1b53dd5d96dc930c9899a8ad6f217.zip
ASoC: qcom: q6asm: add support for alac and ape configs
Qualcomm DSPs expect ALAC and APE configs to be send for decoders, so add the API to program the respective config to the DSP. Signed-off-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20200316055221.1944464-8-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/qcom/qdsp6/q6asm.h')
-rw-r--r--sound/soc/qcom/qdsp6/q6asm.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/sound/soc/qcom/qdsp6/q6asm.h b/sound/soc/qcom/qdsp6/q6asm.h
index 5d9fbc75688c..38a207d6cd95 100644
--- a/sound/soc/qcom/qdsp6/q6asm.h
+++ b/sound/soc/qcom/qdsp6/q6asm.h
@@ -58,6 +58,34 @@ struct q6asm_wma_cfg {
u32 adv_enc_options2;
};
+struct q6asm_alac_cfg {
+ u32 frame_length;
+ u8 compatible_version;
+ u8 bit_depth;
+ u8 pb;
+ u8 mb;
+ u8 kb;
+ u8 num_channels;
+ u16 max_run;
+ u32 max_frame_bytes;
+ u32 avg_bit_rate;
+ u32 sample_rate;
+ u32 channel_layout_tag;
+};
+
+struct q6asm_ape_cfg {
+ u16 compatible_version;
+ u16 compression_level;
+ u32 format_flags;
+ u32 blocks_per_frame;
+ u32 final_frame_blocks;
+ u32 total_frames;
+ u16 bits_per_sample;
+ u16 num_channels;
+ u32 sample_rate;
+ u32 seek_table_present;
+};
+
typedef void (*q6asm_cb) (uint32_t opcode, uint32_t token,
void *payload, void *priv);
struct audio_client;
@@ -86,6 +114,10 @@ int q6asm_stream_media_format_block_wma_v9(struct audio_client *ac,
struct q6asm_wma_cfg *cfg);
int q6asm_stream_media_format_block_wma_v10(struct audio_client *ac,
struct q6asm_wma_cfg *cfg);
+int q6asm_stream_media_format_block_alac(struct audio_client *ac,
+ struct q6asm_alac_cfg *cfg);
+int q6asm_stream_media_format_block_ape(struct audio_client *ac,
+ struct q6asm_ape_cfg *cfg);
int q6asm_run(struct audio_client *ac, uint32_t flags, uint32_t msw_ts,
uint32_t lsw_ts);
int q6asm_run_nowait(struct audio_client *ac, uint32_t flags, uint32_t msw_ts,