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

Commit 8443b263 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: Track compress stream open properly"

parents d41783cb 3a4b1a3f
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -947,6 +947,12 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream)
	};

	pr_debug("%s: stream_id %d\n", __func__, ac->stream_id);
	stream_index = STREAM_ARRAY_INDEX(ac->stream_id);
	if (stream_index >= MAX_NUMBER_OF_STREAMS || stream_index < 0) {
		pr_err("%s: Invalid stream index:%d", __func__, stream_index);
		return -EINVAL;
	}

	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)
@@ -960,6 +966,8 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream)
				__func__, ret, prtd->compr_passthr);
			return ret;
		}
		prtd->gapless_state.stream_opened[stream_index] = 1;

		ret = msm_pcm_routing_reg_phy_compr_stream(
				soc_prtd->dai_link->be_id,
				ac->perf_mode,
@@ -983,6 +991,7 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream)
				__func__, ret, prtd->compr_passthr);
			 return -ENOMEM;
		}
		prtd->gapless_state.stream_opened[stream_index] = 1;

		pr_debug("%s: be_id %d\n", __func__, soc_prtd->dai_link->be_id);
		ret = msm_pcm_routing_reg_phy_stream(soc_prtd->dai_link->be_id,
@@ -1017,13 +1026,7 @@ static int msm_compr_configure_dsp(struct snd_compr_stream *cstream)
		pr_err("%s: Set IO mode failed\n", __func__);
		return -EINVAL;
	}
	stream_index = STREAM_ARRAY_INDEX(ac->stream_id);
	if (stream_index >= MAX_NUMBER_OF_STREAMS || stream_index < 0) {
		pr_err("%s: Invalid stream index:%d", __func__, stream_index);
		return -EINVAL;
	}

	prtd->gapless_state.stream_opened[stream_index] = 1;
	runtime->fragments = prtd->codec_param.buffer.fragments;
	runtime->fragment_size = prtd->codec_param.buffer.fragment_size;
	pr_debug("allocate %d buffers each of size %d\n",