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

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

Merge "msm: featurize support for 32channels from QDSP6"

parents 257f0361 9f295c71
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -386,9 +386,10 @@ static int msm_pcm_playback_prepare(struct snd_pcm_substream *substream)
			return -ENOMEM;
		}
	} else {
		if (q6core_get_avcs_api_version_per_service(
		if ((q6core_get_avcs_api_version_per_service(
				APRV2_IDS_SERVICE_ID_ADSP_ASM_V) >=
				ADSP_ASM_API_VERSION_V2)
				ADSP_ASM_API_VERSION_V2) &&
					q6core_use_Q6_32ch_support())
			ret = q6asm_open_write_v5(prtd->audio_client,
				fmt_type, bits_per_sample);
		else
@@ -434,9 +435,10 @@ static int msm_pcm_playback_prepare(struct snd_pcm_substream *substream)
			prtd->channel_map, bits_per_sample);
	} else {

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

			ret = q6asm_media_format_block_multi_ch_pcm_v5(
				prtd->audio_client, runtime->rate,
@@ -510,9 +512,10 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)
				__func__, params_channels(params),
				prtd->audio_client->perf_mode);

		if (q6core_get_avcs_api_version_per_service(
		if ((q6core_get_avcs_api_version_per_service(
				APRV2_IDS_SERVICE_ID_ADSP_ASM_V) >=
				ADSP_ASM_API_VERSION_V2)
				ADSP_ASM_API_VERSION_V2) &&
					q6core_use_Q6_32ch_support())
			ret = q6asm_open_read_v5(prtd->audio_client,
				FORMAT_LINEAR_PCM,
				bits_per_sample, false, ENC_CFG_ID_NONE);
@@ -587,9 +590,10 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)
			__func__, prtd->samp_rate, prtd->channel_mode,
			bits_per_sample, sample_word_size);

	if (q6core_get_avcs_api_version_per_service(
	if ((q6core_get_avcs_api_version_per_service(
			APRV2_IDS_SERVICE_ID_ADSP_ASM_V) >=
			ADSP_ASM_API_VERSION_V2)
			ADSP_ASM_API_VERSION_V2) &&
			q6core_use_Q6_32ch_support())
		ret = q6asm_enc_cfg_blk_pcm_format_support_v5(
						prtd->audio_client,
						prtd->samp_rate,
+1 −0
Original line number Diff line number Diff line
@@ -36,3 +36,4 @@ CONFIG_SND_SOC_MSM_STUB=m
CONFIG_MSM_AVTIMER=m
CONFIG_SND_SOC_MSM_HDMI_CODEC_RX=m
CONFIG_SND_SOC_EP92=m
CONFIG_USE_Q6_32CH_SUPPORT=m
+1 −0
Original line number Diff line number Diff line
@@ -48,3 +48,4 @@
#define CONFIG_MSM_AVTIMER 1
#define CONFIG_SND_SOC_MSM_HDMI_CODEC_RX 1
#define CONFIG_SND_SOC_EP92 1
#define CONFIG_USE_Q6_32CH_SUPPORT 1
+3 −2
Original line number Diff line number Diff line
@@ -2903,9 +2903,10 @@ int adm_open(int port_id, int path, int rate, int channel_mode, int topology,
		}


		if (q6core_get_avcs_api_version_per_service(
		if ((q6core_get_avcs_api_version_per_service(
				APRV2_IDS_SERVICE_ID_ADSP_ADM_V) >=
					ADSP_ADM_API_VERSION_V3) {
					ADSP_ADM_API_VERSION_V3) &&
					q6core_use_Q6_32ch_support()) {
			memset(&open_v8, 0, sizeof(open_v8));
			memset(&ep1_payload, 0, sizeof(ep1_payload));
			memset(&ep2_payload, 0, sizeof(ep2_payload));
+13 −0
Original line number Diff line number Diff line
@@ -207,4 +207,17 @@ int32_t core_get_license_status(uint32_t module_id);

int32_t q6core_load_unload_topo_modules(uint32_t topology_id,
			bool preload_type);

#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__ */