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

Commit c3727835 authored by Satish Babu Patakokila's avatar Satish Babu Patakokila Committed by Gerrit - the friendly Code Review server
Browse files

ASoc: msm: qdsp6v2: Fix audio noise issue during incall recording



The timestamp API is called even when timestamp flag is not set.
Correct the read API calls based on timestamp flag.

CRs-fixed: 1107319
Change-Id: Ic40b166e9ddd42f20fecadcd4eafe187b3ff8785
Signed-off-by: default avatarSatish Babu Patakokila <sbpata@codeaurora.org>
parent 06eb35a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -270,7 +270,7 @@ int q6asm_open_read_v3(struct audio_client *ac, uint32_t format,
		       uint16_t bits_per_sample);

int q6asm_open_read_v4(struct audio_client *ac, uint32_t format,
		       uint16_t bits_per_sample);
		       uint16_t bits_per_sample, bool ts_mode);

int q6asm_open_write(struct audio_client *ac, uint32_t format
		/*, uint16_t bits_per_sample*/);
+7 −2
Original line number Diff line number Diff line
@@ -1250,8 +1250,13 @@ static int msm_compr_configure_dsp_for_capture(struct snd_compr_stream *cstream)
	pr_debug("%s: stream_id %d bits_per_sample %d\n",
			__func__, ac->stream_id, bits_per_sample);

	if (prtd->codec_param.codec.flags & COMPRESSED_TIMESTAMP_FLAG) {
		ret = q6asm_open_read_v4(prtd->audio_client, FORMAT_LINEAR_PCM,
		bits_per_sample);
			bits_per_sample, true);
	} else {
		ret = q6asm_open_read_v4(prtd->audio_client, FORMAT_LINEAR_PCM,
			bits_per_sample, false);
	}
	if (ret < 0) {
		pr_err("%s: q6asm_open_read failed:%d\n", __func__, ret);
		return ret;
+1 −1
Original line number Diff line number Diff line
@@ -424,7 +424,7 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)
				prtd->audio_client->perf_mode);

		ret = q6asm_open_read_v4(prtd->audio_client, FORMAT_LINEAR_PCM,
				bits_per_sample);
				bits_per_sample, false);
		if (ret < 0) {
			pr_err("%s: q6asm_open_read failed\n", __func__);
			q6asm_audio_client_free(prtd->audio_client);
+3 −2
Original line number Diff line number Diff line
@@ -2432,13 +2432,14 @@ EXPORT_SYMBOL(q6asm_open_read_v3);
 * @ac: Client session handle
 * @format: encoder format
 * @bits_per_sample: bit width of capture session
 * @ts_mode: timestamp mode
 */
int q6asm_open_read_v4(struct audio_client *ac, uint32_t format,
			uint16_t bits_per_sample)
			uint16_t bits_per_sample, bool ts_mode)
{
	return __q6asm_open_read(ac, format, bits_per_sample,
				 PCM_MEDIA_FORMAT_V4 /*media fmt block ver*/,
				 true/*ts_mode*/);
				 ts_mode);
}
EXPORT_SYMBOL(q6asm_open_read_v4);