summaryrefslogtreecommitdiff
path: root/alsa/aoc_alsa_voip.c
diff options
context:
space:
mode:
Diffstat (limited to 'alsa/aoc_alsa_voip.c')
-rw-r--r--alsa/aoc_alsa_voip.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/alsa/aoc_alsa_voip.c b/alsa/aoc_alsa_voip.c
index f9f85ba..b186330 100644
--- a/alsa/aoc_alsa_voip.c
+++ b/alsa/aoc_alsa_voip.c
@@ -376,6 +376,16 @@ static int snd_aoc_pcm_prepare(struct snd_soc_component *component,
if (mutex_lock_interruptible(&chip->audio_mutex))
return -EINTR;
+ alsa_stream->buffer_size = snd_pcm_lib_buffer_bytes(substream);
+ alsa_stream->period_size = snd_pcm_lib_period_bytes(substream);
+
+#if !IS_ENABLED(CONFIG_SOC_GS101)
+ /* Set the audio formats and flush the DRAM buffer */
+ err = aoc_voip_set_params(alsa_stream);
+ if (err < 0)
+ pr_notice("Failed to set %d VoIP Rx params\n", err);
+#endif
+
channels = alsa_stream->channels;
pr_debug("channels = %d, rate = %d, bits = %d, float-fmt = %d\n",