|
@@ -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,
|