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

Commit 58f8d8be authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ASoC: msm: qdsp6v2: Fix asm bitwidth for next track in gapless mode"

parents 9195406e 54f0b765
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -812,7 +812,7 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream)
	pr_debug("%s: stream_id %d\n", __func__, ac->stream_id);
	if (prtd->codec_param.codec.format == SNDRV_PCM_FORMAT_S24_LE)
		bits_per_sample = 24;
	if (prtd->codec_param.codec.format == SNDRV_PCM_FORMAT_S32_LE)
	else if (prtd->codec_param.codec.format == SNDRV_PCM_FORMAT_S32_LE)
		bits_per_sample = 32;

	if (prtd->compr_passthr != LEGACY_PCM) {
@@ -835,7 +835,8 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream)
			return ret;
		}
	} else {
		pr_debug("%s: stream_id %d\n", __func__, ac->stream_id);
		pr_debug("%s: stream_id %d bits_per_sample %d\n",
				__func__, ac->stream_id, bits_per_sample);
		ret = q6asm_stream_open_write_v2(ac,
				prtd->codec, bits_per_sample,
				ac->stream_id,
@@ -1358,6 +1359,7 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd)
	unsigned long flags;
	int stream_id;
	uint32_t stream_index;
	uint16_t bits_per_sample = 16;

	if (cstream->direction != SND_COMPRESS_PLAYBACK) {
		pr_err("%s: Unsupported stream type\n", __func__);
@@ -1731,9 +1733,17 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd)
			}
			break;
		}
		pr_debug("%s: open_write stream_id %d", __func__, stream_id);

		if (prtd->codec_param.codec.format == SNDRV_PCM_FORMAT_S24_LE)
			bits_per_sample = 24;
		else if (prtd->codec_param.codec.format ==
			 SNDRV_PCM_FORMAT_S32_LE)
			bits_per_sample = 32;

		pr_debug("%s: open_write stream_id %d bits_per_sample %d",
				__func__, stream_id, bits_per_sample);
		rc = q6asm_stream_open_write_v2(prtd->audio_client,
				prtd->codec, 16,
				prtd->codec, bits_per_sample,
				stream_id,
				prtd->gapless_state.use_dsp_gapless_mode);
		if (rc < 0) {