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

Commit 205c6bb4 authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat Committed by Gerrit - the friendly Code Review server
Browse files

ASoC: open ASM session with 24 bit for 24 bit playback



For 24 bit playback decoder is opened with 16 bits per sample, So
decoder output is 16 bit only.
Set bits per sample to 24 if codec format is SNDRV_PCM_FORMAT_S24_3LE.
Set bits per sample to 16 as default value in capture prepare use case.

CRs-Fixed: 1035154
Change-Id: I14271b17441308f8ec6dfaea566c01887d1233f4
Signed-off-by: default avatarPreetam Singh Ranawat <apranawat@codeaurora.org>
parent beb1eeec
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -953,7 +953,8 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream)
		return -EINVAL;
	}

	if (prtd->codec_param.codec.format == SNDRV_PCM_FORMAT_S24_LE)
	if ((prtd->codec_param.codec.format == SNDRV_PCM_FORMAT_S24_LE) ||
		(prtd->codec_param.codec.format == SNDRV_PCM_FORMAT_S24_3LE))
		bits_per_sample = 24;
	else if (prtd->codec_param.codec.format == SNDRV_PCM_FORMAT_S32_LE)
		bits_per_sample = 32;
+1 −1
Original line number Diff line number Diff line
@@ -375,7 +375,7 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)
	struct msm_pcm_routing_evt event;
	int ret = 0;
	int i = 0;
	uint16_t bits_per_sample;
	uint16_t bits_per_sample = 16;
	uint16_t sample_word_size;

	pdata = (struct msm_plat_data *)