Skip to content
Unverified Commit 0dedbde5 authored by Tony Lindgren's avatar Tony Lindgren Committed by Mark Brown
Browse files

ASoC: cpcap: Implement set_tdm_slot for voice call support



ASoC: cpcap: Implement set_tdm_slot for voice call support

For using cpcap for voice calls, we need to route audio directly from
the modem to cpcap for TDM (Time Division Multiplexing). The voice call
is direct data between the modem and cpcap with no CPU involvment. In
this mode, the cpcap related audio mixer controls work for the speaker
selection and volume though.

To do this, we need to implement standard snd_soc_dai_set_tdm_slot()
for cpcap. Then the modem codec driver can use snd_soc_dai_set_sysclk(),
snd_soc_dai_set_fmt(), and snd_soc_dai_set_tdm_slot() to configure a
voice call.

Let's add cpcap_voice_set_tdm_slot() for this, and cpcap_voice_call()
helper to configure the additional registers needed for voice call.

Let's also clear CPCAP_REG_VAUDIOC on init in case we have the bit for
CPCAP_BIT_VAUDIO_MODE0 set on init.

Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
Link: https://lore.kernel.org/r/20210112174704.GA13496@duo.ucw.cz


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7f1f7ae1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment