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

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

Merge "Revert "ASoC: msm: Add support for AVS version check""

parents a26e07ee 19d973d3
Loading
Loading
Loading
Loading
+3 −26
Original line number Diff line number Diff line
@@ -1017,16 +1017,6 @@ static int msm_compr_send_media_format_block(struct snd_compr_stream *cstream,
			sample_word_size = 16;
			break;
		}
		if (q6core_get_avs_version() == Q6_SUBSYS_AVS2_7)
			ret = q6asm_media_format_block_pcm_format_support_v3(
							prtd->audio_client,
							prtd->sample_rate,
							prtd->num_channels,
							bit_width, stream_id,
							use_default_chmap,
							chmap,
							sample_word_size);
		else
		ret = q6asm_media_format_block_pcm_format_support_v4(
							prtd->audio_client,
							prtd->sample_rate,
@@ -1333,12 +1323,6 @@ static int msm_compr_configure_dsp_for_playback
	} else {
		pr_debug("%s: stream_id %d bits_per_sample %d\n",
				__func__, ac->stream_id, bits_per_sample);
		if (q6core_get_avs_version() == Q6_SUBSYS_AVS2_7)
			ret = q6asm_stream_open_write_v3(ac,
				prtd->codec, bits_per_sample,
				ac->stream_id,
				prtd->gapless_state.use_dsp_gapless_mode);
		else
		ret = q6asm_stream_open_write_v4(ac,
				prtd->codec, bits_per_sample,
				ac->stream_id,
@@ -2655,17 +2639,10 @@ static int msm_compr_trigger(struct snd_compr_stream *cstream, int cmd)

		pr_debug("%s: open_write stream_id %d bits_per_sample %d",
				__func__, stream_id, bits_per_sample);
		if (q6core_get_avs_version() == Q6_SUBSYS_AVS2_7)
			rc = q6asm_stream_open_write_v3(prtd->audio_client,
				prtd->codec, bits_per_sample,
				stream_id,
				prtd->gapless_state.use_dsp_gapless_mode);
		else
		rc = q6asm_stream_open_write_v4(prtd->audio_client,
				prtd->codec, bits_per_sample,
				stream_id,
				prtd->gapless_state.use_dsp_gapless_mode);
			break;
		if (rc < 0) {
			pr_err("%s: Session out open failed for gapless\n",
				 __func__);
+13 −59
Original line number Diff line number Diff line
@@ -384,26 +384,6 @@ static int msm_pcm_playback_prepare(struct snd_pcm_substream *substream)
			prtd->audio_client = NULL;
			return -ENOMEM;
		}
	} else if (q6core_get_avs_version() == Q6_SUBSYS_AVS2_7) {
		ret = q6asm_open_write_v3(prtd->audio_client,
				FORMAT_LINEAR_PCM, bits_per_sample);
		if (ret < 0) {
			pr_err("%s: q6asm_open_write_v3 failed (%d)\n",
			__func__, ret);
			q6asm_audio_client_free(prtd->audio_client);
			prtd->audio_client = NULL;
			return -ENOMEM;
		}
	} else if (q6core_get_avs_version() == Q6_SUBSYS_AVS2_8) {
		ret = q6asm_open_write_v4(prtd->audio_client,
				FORMAT_LINEAR_PCM, bits_per_sample);
		if (ret < 0) {
			pr_err("%s: q6asm_open_write_v4 failed (%d)\n",
			__func__, ret);
			q6asm_audio_client_free(prtd->audio_client);
			prtd->audio_client = NULL;
			return -ENOMEM;
		}
	} else {
		ret = q6asm_open_write_with_retry(prtd->audio_client,
				fmt_type, bits_per_sample);
@@ -453,13 +433,6 @@ static int msm_pcm_playback_prepare(struct snd_pcm_substream *substream)
				prtd->channel_map, bits_per_sample,
				sample_word_size, ASM_LITTLE_ENDIAN,
				DEFAULT_QF);
		else {
			if (q6core_get_avs_version() == Q6_SUBSYS_AVS2_7)
				ret = q6asm_media_format_block_multi_ch_pcm_v3(
				prtd->audio_client, runtime->rate,
				runtime->channels, !prtd->set_channel_map,
				prtd->channel_map, bits_per_sample,
				sample_word_size);
		else
			ret = q6asm_media_format_block_multi_ch_pcm_v4(
				prtd->audio_client, runtime->rate,
@@ -468,7 +441,6 @@ static int msm_pcm_playback_prepare(struct snd_pcm_substream *substream)
				sample_word_size, ASM_LITTLE_ENDIAN,
				DEFAULT_QF);
	}
	}
	if (ret < 0)
		pr_info("%s: CMD Format block failed\n", __func__);

@@ -525,19 +497,10 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)
		pr_debug("%s Opening %d-ch PCM read stream, perf_mode %d\n",
				__func__, params_channels(params),
				prtd->audio_client->perf_mode);
		if (q6core_get_avs_version() == Q6_SUBSYS_AVS2_7) {
			ret = q6asm_open_read_v3(prtd->audio_client,
					FORMAT_LINEAR_PCM,
					bits_per_sample);
		} else if (q6core_get_avs_version() == Q6_SUBSYS_AVS2_8) {
			ret = q6asm_open_read_v4(prtd->audio_client,
					FORMAT_LINEAR_PCM,
					bits_per_sample, false);
		} else {

		ret = q6asm_open_read_with_retry(prtd->audio_client,
					FORMAT_LINEAR_PCM,
					bits_per_sample, false);
		}
		if (ret < 0) {
			pr_err("%s: q6asm_open_read failed\n", __func__);
			q6asm_audio_client_free(prtd->audio_client);
@@ -614,14 +577,6 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)
					sample_word_size,
					ASM_LITTLE_ENDIAN,
					DEFAULT_QF);
	else {
		if (q6core_get_avs_version() == Q6_SUBSYS_AVS2_7)
			ret = q6asm_enc_cfg_blk_pcm_format_support_v3(
						prtd->audio_client,
						prtd->samp_rate,
						prtd->channel_mode,
						bits_per_sample,
						sample_word_size);
	else
		ret = q6asm_enc_cfg_blk_pcm_format_support_v4(
					prtd->audio_client,
@@ -631,7 +586,6 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)
					sample_word_size,
					ASM_LITTLE_ENDIAN,
					DEFAULT_QF);
	}
	if (ret < 0)
		pr_debug("%s: cmd cfg pcm was block failed", __func__);