From 6503a2bb420b5c3b11a34396ca5d0ae5239aa0e1 Mon Sep 17 00:00:00 2001 From: Meng Wang Date: Fri, 6 Dec 2019 09:48:09 +0800 Subject: [PATCH] ALSA: compress: Add support to send codec specific data Codec specific metadata is sent only for first stream in gapless playback. This causes incorrect configuration to be set for second stream and distortions are observed due to framedrops in adsp. Add support to send codec specific format during start of next stream in gapless using set_next_track_param. Change-Id: Ieec6b2afedec156e47873efcad9b3571160b0a29 Signed-off-by: Chaithanya Krishna Bacharaju Signed-off-by: Alexy Joseph Signed-off-by: Banajit Goswami Signed-off-by: Meng Wang --- include/uapi/sound/compress_offload.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/uapi/sound/compress_offload.h b/include/uapi/sound/compress_offload.h index 3cd93ab7b6e6..67e28320020f 100644 --- a/include/uapi/sound/compress_offload.h +++ b/include/uapi/sound/compress_offload.h @@ -185,6 +185,8 @@ struct snd_compr_metadata { * SNDRV_COMPRESS_STOP: stop a running stream, discarding ring buffer content * and the buffers currently with DSP * SNDRV_COMPRESS_DRAIN: Play till end of buffers and stop after that + * SNDRV_COMPRESS_SET_NEXT_TRACK_PARAM: send codec specific data for the next + * track in gapless * SNDRV_COMPRESS_IOCTL_VERSION: Query the API version */ #define SNDRV_COMPRESS_IOCTL_VERSION _IOR('C', 0x00, int) @@ -206,6 +208,10 @@ struct snd_compr_metadata { #define SNDRV_COMPRESS_DRAIN _IO('C', 0x34) #define SNDRV_COMPRESS_NEXT_TRACK _IO('C', 0x35) #define SNDRV_COMPRESS_PARTIAL_DRAIN _IO('C', 0x36) +#ifdef CONFIG_AUDIO_QGKI +#define SNDRV_COMPRESS_SET_NEXT_TRACK_PARAM\ + _IOW('C', 0x80, union snd_codec_options) +#endif /* * TODO * 1. add mmap support