]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: cpcap: Implement set_tdm_slot for voice call support
authorTony Lindgren <tony@atomide.com>
Tue, 12 Jan 2021 17:47:04 +0000 (18:47 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 19 Jan 2021 14:09:24 +0000 (14:09 +0000)
commitf0d437ea05919f22f281aa1e9950347a2d7dd733
tree222ab9e7d63738265dc35b81d1174030c1b921a7
parent673a56d4a120dca82fe3bb397d13667fae51b0cd
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: Tony Lindgren <tony@atomide.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Link: https://lore.kernel.org/r/20210112174704.GA13496@duo.ucw.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cpcap.c