Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a325cd0 authored by Vignesh Kulothungan's avatar Vignesh Kulothungan Committed by ssizon
Browse files

asoc: fix silence data during concurrent capture



Remove static definition of size and index variables, which are
unique to each capture session. Static definition of index variable
may incorrectly copy data from wrong memory offset. This might inject
silence/clutter in data copied to audio HAL.

CRs-Fixed: 2457887
Change-Id: I7b2f48d21545655ddaa13566ab4ea87a1cbd7424
Signed-off-by: default avatarVignesh Kulothungan <vigneshk@codeaurora.org>
parent 99bf61af
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -882,8 +882,8 @@ static int msm_pcm_capture_copy(struct snd_pcm_substream *substream,
	int xfer;
	int xfer;
	char *bufptr;
	char *bufptr;
	void *data = NULL;
	void *data = NULL;
	static uint32_t idx;
	uint32_t idx = 0;
	static uint32_t size;
	uint32_t size = 0;
	uint32_t offset = 0;
	uint32_t offset = 0;
	struct snd_pcm_runtime *runtime = substream->runtime;
	struct snd_pcm_runtime *runtime = substream->runtime;
	struct msm_audio *prtd = substream->runtime->private_data;
	struct msm_audio *prtd = substream->runtime->private_data;