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

Commit 65f58e77 authored by Asish Bhattacharya's avatar Asish Bhattacharya Committed by Gerrit - the friendly Code Review server
Browse files

msm: qdsp6v2: Buffer address for Record and playback is 32-byte aligned.



Use 32-byte aligned buffer address to ADSP for playback
and record usecases. ADSP expects 32-byte aligned buffers,
and if they are not received, ADSP will return them.
This causes failure in record and playback.

Change-Id: I62ee59ae761b89545cdb61e5834b7389bc151e32
CRs-Fixed: 549103
Signed-off-by: default avatarAsish Bhattacharya <asishb@codeaurora.org>
parent bfc96c5e
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -397,6 +397,18 @@ static int msm_pcm_open(struct snd_pcm_substream *substream)
									ret);
		}
	}
	ret = snd_pcm_hw_constraint_step(runtime, 0,
		SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 32);
	if (ret < 0) {
		pr_err("constraint for period bytes step ret = %d\n",
								ret);
	}
	ret = snd_pcm_hw_constraint_step(runtime, 0,
		SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 32);
	if (ret < 0) {
		pr_err("constraint for buffer bytes step ret = %d\n",
								ret);
	}

	prtd->dsp_cnt = 0;
	prtd->set_channel_map = false;
+2 −2
Original line number Diff line number Diff line
@@ -1221,8 +1221,8 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology,
			open.dev_channel_mapping[1] = PCM_CHANNEL_FR;
		} else if (channel_mode == 3)	{
			open.dev_channel_mapping[0] = PCM_CHANNEL_FL;
			open.dev_channel_mapping[0] = PCM_CHANNEL_FR;
			open.dev_channel_mapping[1] = PCM_CHANNEL_FC;
			open.dev_channel_mapping[1] = PCM_CHANNEL_FR;
			open.dev_channel_mapping[2] = PCM_CHANNEL_FC;
		} else if (channel_mode == 4) {
			open.dev_channel_mapping[0] = PCM_CHANNEL_FL;
			open.dev_channel_mapping[1] = PCM_CHANNEL_FR;