History log of /linux-master/sound/soc/qcom/qdsp6/q6asm.h
Revision Date Author Comments
# bb339245 04-Dec-2023 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

ASoC: qcom: Fix trivial code style issues

Fix few trivial code style issues, pointed out by checkpatch, so they do
not get copied to new code (when old code is used as template):

WARNING: Prefer "GPL" over "GPL v2" - see commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
WARNING: function definition argument 'struct platform_device *' should also have an identifier name
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line
WARNING: Missing a blank line after declarations
WARNING: unnecessary whitespace before a quoted newline

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20231204100048.211800-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 528a4a0b 05-Oct-2023 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

ASoC: qcom: reduce number of binding headers includes

Move the includes of binding headers from Qualcomm SoC sound drivers
headers to unit files actually using these bindings. This reduces the
amount of work for C preprocessor and makes usage of bindings easier to
follow. No impact expected on the final binaries.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20231005075250.88159-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# be79e73e 18-Feb-2021 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ASoC: qcom: q6asm: align function prototypes

cppcheck warnings:

sound/soc/qcom/qdsp6/q6asm.c:502:16: style:inconclusive: Function
'q6asm_map_memory_regions' argument 4 names different: declaration
'bufsz' definition 'period_sz'. [funcArgNamesDifferent]
size_t period_sz, unsigned int periods)
^
sound/soc/qcom/qdsp6/q6asm.h:150:16: note: Function
'q6asm_map_memory_regions' argument 4 names different: declaration
'bufsz' definition 'period_sz'.
size_t bufsz, unsigned int bufcnt);
^
sound/soc/qcom/qdsp6/q6asm.c:502:16: note: Function
'q6asm_map_memory_regions' argument 4 names different: declaration
'bufsz' definition 'period_sz'.
size_t period_sz, unsigned int periods)
^
sound/soc/qcom/qdsp6/q6asm.c:502:40: style:inconclusive: Function
'q6asm_map_memory_regions' argument 5 names different: declaration
'bufcnt' definition 'periods'. [funcArgNamesDifferent]
size_t period_sz, unsigned int periods)
^
sound/soc/qcom/qdsp6/q6asm.h:150:36: note: Function
'q6asm_map_memory_regions' argument 5 names different: declaration
'bufcnt' definition 'periods'.
size_t bufsz, unsigned int bufcnt);
^
sound/soc/qcom/qdsp6/q6asm.c:502:40: note: Function
'q6asm_map_memory_regions' argument 5 names different: declaration
'bufcnt' definition 'periods'.
size_t period_sz, unsigned int periods)
^
sound/soc/qcom/qdsp6/q6asm.c:823:47: style:inconclusive: Function
'q6asm_get_session_id' argument 1 names different: declaration 'ac'
definition 'c'. [funcArgNamesDifferent]
int q6asm_get_session_id(struct audio_client *c)
^
sound/soc/qcom/qdsp6/q6asm.h:146:47: note: Function
'q6asm_get_session_id' argument 1 names different: declaration 'ac'
definition 'c'.
int q6asm_get_session_id(struct audio_client *ac);
^
sound/soc/qcom/qdsp6/q6asm.c:823:47: note: Function
'q6asm_get_session_id' argument 1 names different: declaration 'ac'
definition 'c'.
int q6asm_get_session_id(struct audio_client *c)
^
sound/soc/qcom/qdsp6/q6asm.c:1573:52: style:inconclusive: Function
'q6asm_write_async' argument 6 names different: declaration 'flags'
definition 'wflags'. [funcArgNamesDifferent]
uint32_t msw_ts, uint32_t lsw_ts, uint32_t wflags)
^
sound/soc/qcom/qdsp6/q6asm.h:100:52: note: Function
'q6asm_write_async' argument 6 names different: declaration 'flags'
definition 'wflags'.
uint32_t msw_ts, uint32_t lsw_ts, uint32_t flags);
^
sound/soc/qcom/qdsp6/q6asm.c:1573:52: note: Function
'q6asm_write_async' argument 6 names different: declaration 'flags'
definition 'wflags'.
uint32_t msw_ts, uint32_t lsw_ts, uint32_t wflags)
^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210218222916.89809-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# ee941a33 27-Jul-2020 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

ASoC: q6asm-dai: add gapless support

Add support to gapless playback by implementing metadata,
next_track, drain and partial drain support.

Gapless on Q6ASM is implemented by opening 2 streams in a single
q6asm stream and toggling them on next track.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-10-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 983b8864 27-Jul-2020 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

ASoC: q6asm: add support to gapless flag in q6asm open

This patch adds support to gapless flag to q6asm_open_write().

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-7-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 39376129 27-Jul-2020 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

ASoC: q6asm: add support to remove intial and trailing silence

This patch adds support to ASM_DATA_CMD_REMOVE_INITIAL_SILENCE
and ASM_DATA_CMD_REMOVE_TRAILING_SILENCE q6asm command to support
compressed metadata for gapless playback.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-6-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 50d4e214 27-Jul-2020 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

ASoC: q6asm: add length to write command token

Add length to write command packet token so that we can track exactly
how many bytes are consumed by DSP in the command reply.

This is useful in some use-cases where the end of the file/stream
is not aligned with period size.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# e0c078a8 27-Jul-2020 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

ASoC: q6asm: use flags directly from q6asm-dai

use flags set by q6asm-dais directly!

This will be useful gapless case where write needs a special flag to indicate
that last buffer.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 789e3b6c 27-Jul-2020 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

ASoC: q6asm: make commands specific to streams

Each ASM session can have multiple streams attached to it,
current design was to allow only one static stream id 1 per each session.
However for use-case like gapless, we would need 2 streams to open per session.

This patch converts all the q6asm apis to take stream id as argument
to allow multiple streams to open on a single session, This is useful
for gapless playback cases.

Now the dai driver can specify which stream id for each command.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200727093806.17089-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 7076bf4d 15-Mar-2020 Vinod Koul <vkoul@kernel.org>

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>


# 97163ead 15-Mar-2020 Vinod Koul <vkoul@kernel.org>

ASoC: qcom: q6asm: add support to wma config

Qualcomm DSPs expect wma v9 and wma v10 configs to be set for wma
decoders, so add the API to program the respective wma 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-5-vkoul@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 8504a72f 15-Mar-2020 Vinod Koul <vkoul@kernel.org>

ASoC: qcom: q6asm: pass codec profile to q6asm_open_write

Codec profile is required to be passed for WMA codecs so that we know
the codec profile present and tell DSP accordingly, so update this API
to pass the codec profile as argument

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-4-vkoul@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 51d2584a 15-Nov-2019 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

ASoC: qcom: q6asm: add support to flac config

Qualcomm DSPs expect flac config to be set for flac decoders, so add the
API to program the flac config to the DSP

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20191115102705.649976-3-vkoul@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 68fd8480 18-May-2018 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

ASoC: qdsp6: q6asm: Add support to audio stream apis

This patch adds support to open, write and media format commands
in the q6asm module.

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>


# a2a5d302 18-May-2018 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

ASoC: qdsp6: q6asm: Add support to memory map and unmap

This patch adds support to memory map and unmap regions commands in
q6asm module.

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>


# a13e8723 18-May-2018 Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

ASoC: qdsp6: q6asm: Add q6asm driver

This patch adds basic support to Q6 ASM (Audio Stream Manager) module on
Q6DSP. ASM supports up to 8 concurrent streams. each stream can be setup
as playback/capture. ASM provides top control functions like
Pause/flush/resume for playback and record. ASM can Create/destroy encoder,
decoder and also provides POPP dynamic services.

This patch adds support to basic features to allow hdmi playback.

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>