linux_dsm_epyc7002/sound/soc/qcom/qdsp6
Stephan Gerhold 7f2430cda8
ASoC: qcom: q6asm-dai: Add SNDRV_PCM_INFO_BATCH flag
At the moment, playing audio with PulseAudio with the qdsp6 driver
results in distorted sound. It seems like its timer-based scheduling
does not work properly with qdsp6 since setting tsched=0 in
the PulseAudio configuration avoids the issue.

Apparently this happens when the pointer() callback is not accurate
enough. There is a SNDRV_PCM_INFO_BATCH flag that can be used to stop
PulseAudio from using timer-based scheduling by default.

According to https://www.alsa-project.org/pipermail/alsa-devel/2014-March/073816.html:

    The flag is being used in the sense explained in the previous audio
    meeting -- the data transfer granularity isn't fine enough but aligned
    to the period size (or less).

q6asm-dai reports the position as multiple of

    prtd->pcm_count = snd_pcm_lib_period_bytes(substream)

so it indeed just a multiple of the period size.

Therefore adding the flag here seems appropriate and makes audio
work out of the box.

Fixes: 2a9e92d371 ("ASoC: qdsp6: q6asm: Add q6asm dai driver")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200330175210.47518-1-stephan@gerhold.net
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-31 19:23:54 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
q6adm.c ASoC: qcom: qdsp6: remove duplicated include from q6adm.c 2018-09-21 09:22:10 -07:00
q6adm.h ASoC: qdsp6: q6adm: Add q6adm driver 2018-05-21 16:40:24 +01:00
q6afe-dai.c ASoC: qdsp6: q6afe-dai: Add missing Slimbus0 audio route 2019-07-04 00:03:10 +01:00
q6afe.c ASoC: qdsp6: qdafe: add support for display_port_rx 2018-12-14 12:48:51 +00:00
q6afe.h ASoC: qdsp6: qdafe: add support to tdm ports 2018-05-29 15:34:23 +01:00
q6asm-dai.c ASoC: qcom: q6asm-dai: Add SNDRV_PCM_INFO_BATCH flag 2020-03-31 19:23:54 +01:00
q6asm.c ASoC: qcom: q6asm: add support for alac and ape configs 2020-03-16 17:52:10 +00:00
q6asm.h ASoC: qcom: q6asm: add support for alac and ape configs 2020-03-16 17:52:10 +00:00
q6core.c ASoC: qdsp6: q6core: Use struct_size() in kmemdup() 2019-05-24 13:01:57 +01:00
q6core.h ASoC: qdsp6: q6core: Add q6core driver 2018-05-17 15:49:38 +09:00
q6dsp-common.c
q6dsp-common.h
q6dsp-errno.h
q6routing.c ASoC: qcom: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer 2020-03-27 14:44:44 +00:00
q6routing.h ASoC: qdsp6: q6routing: Add q6routing driver 2018-05-21 16:41:48 +01:00