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

Commit 9fb7c8c4 authored by Dieter Luecking's avatar Dieter Luecking
Browse files

dsp: Revert featurization of 32 channel support in DSP



Remove the dependency on dedicated config flag for the
use of new API versions in ASM and ADM open commands.
Dependency is now on ADSP service version only.

Change-Id: I2e7bcec675bafb9ad9e2a10df4ccc1e52bb72c92
Signed-off-by: default avatarDieter Luecking <dieterl@codeaurora.org>
parent 0983e240
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -390,8 +390,7 @@ static int msm_pcm_playback_prepare(struct snd_pcm_substream *substream)
	} else {
		if ((q6core_get_avcs_api_version_per_service(
				APRV2_IDS_SERVICE_ID_ADSP_ASM_V) >=
				ADSP_ASM_API_VERSION_V2) &&
					q6core_use_Q6_32ch_support())
				ADSP_ASM_API_VERSION_V2))
			ret = q6asm_open_write_v5(prtd->audio_client,
				fmt_type, bits_per_sample);
		else
@@ -439,8 +438,7 @@ static int msm_pcm_playback_prepare(struct snd_pcm_substream *substream)

		if ((q6core_get_avcs_api_version_per_service(
				APRV2_IDS_SERVICE_ID_ADSP_ASM_V) >=
				ADSP_ASM_API_VERSION_V2) &&
					q6core_use_Q6_32ch_support()) {
				ADSP_ASM_API_VERSION_V2)) {

			ret = q6asm_media_format_block_multi_ch_pcm_v5(
				prtd->audio_client, runtime->rate,
@@ -523,8 +521,7 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)

		if ((q6core_get_avcs_api_version_per_service(
				APRV2_IDS_SERVICE_ID_ADSP_ASM_V) >=
				ADSP_ASM_API_VERSION_V2) &&
					q6core_use_Q6_32ch_support())
				ADSP_ASM_API_VERSION_V2))
			ret = q6asm_open_read_v5(prtd->audio_client,
				FORMAT_LINEAR_PCM,
				bits_per_sample, false, ENC_CFG_ID_NONE);
@@ -601,8 +598,7 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)

	if ((q6core_get_avcs_api_version_per_service(
			APRV2_IDS_SERVICE_ID_ADSP_ASM_V) >=
			ADSP_ASM_API_VERSION_V2) &&
			q6core_use_Q6_32ch_support())
			ADSP_ASM_API_VERSION_V2))
		ret = q6asm_enc_cfg_blk_pcm_format_support_v5(
						prtd->audio_client,
						prtd->samp_rate,
+1 −2
Original line number Diff line number Diff line
@@ -3062,8 +3062,7 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology,

		if ((q6core_get_avcs_api_version_per_service(
				APRV2_IDS_SERVICE_ID_ADSP_ADM_V) >=
					ADSP_ADM_API_VERSION_V3) &&
					q6core_use_Q6_32ch_support()) {
					ADSP_ADM_API_VERSION_V3)) {
			memset(&open_v8, 0, sizeof(open_v8));
			memset(&ep1_payload, 0, sizeof(ep1_payload));
			memset(&ep2_payload, 0, sizeof(ep2_payload));
+1 −13
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 */

#ifndef __Q6CORE_H__
@@ -306,16 +306,4 @@ int q6core_destroy_lpass_npa_client(uint32_t client_handle);
int q6core_request_island_transition(uint32_t client_handle,
				     uint32_t island_allow_mode);

#if IS_ENABLED(CONFIG_USE_Q6_32CH_SUPPORT)
static inline bool q6core_use_Q6_32ch_support(void)
{
	return true;
}
#else
static inline bool q6core_use_Q6_32ch_support(void)
{
	return false;
}
#endif

#endif /* __Q6CORE_H__ */