mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
Merge "asoc: update open read call based on ASM version"
This commit is contained in:
commit
e3003bb845
1 changed files with 13 additions and 15 deletions
|
|
@ -1511,6 +1511,7 @@ static int msm_compr_configure_dsp_for_capture(struct snd_compr_stream *cstream)
|
|||
struct audio_client *ac = prtd->audio_client;
|
||||
uint32_t stream_index;
|
||||
uint32_t enc_cfg_id = ENC_CFG_ID_NONE;
|
||||
bool compress_ts = false;
|
||||
|
||||
switch (prtd->codec_param.codec.format) {
|
||||
case SNDRV_PCM_FORMAT_S24_LE:
|
||||
|
|
@ -1560,22 +1561,19 @@ static int msm_compr_configure_dsp_for_capture(struct snd_compr_stream *cstream)
|
|||
return ret;
|
||||
}
|
||||
} else {
|
||||
if (prtd->codec_param.codec.flags & COMPRESSED_TIMESTAMP_FLAG) {
|
||||
if (prtd->codec_param.codec.flags & COMPRESSED_TIMESTAMP_FLAG)
|
||||
compress_ts = true;
|
||||
|
||||
if (q6core_get_avcs_api_version_per_service(
|
||||
APRV2_IDS_SERVICE_ID_ADSP_ASM_V) >=
|
||||
ADSP_ASM_API_VERSION_V2)
|
||||
ret = q6asm_open_read_v5(prtd->audio_client,
|
||||
prtd->codec, bits_per_sample,
|
||||
compress_ts, enc_cfg_id);
|
||||
else
|
||||
ret = q6asm_open_read_v4(prtd->audio_client,
|
||||
prtd->codec,
|
||||
bits_per_sample, true, enc_cfg_id);
|
||||
} else {
|
||||
if (q6core_get_avcs_api_version_per_service(
|
||||
APRV2_IDS_SERVICE_ID_ADSP_ASM_V) >=
|
||||
ADSP_ASM_API_VERSION_V2)
|
||||
ret = q6asm_open_read_v5(prtd->audio_client,
|
||||
prtd->codec, bits_per_sample,
|
||||
false, enc_cfg_id);
|
||||
else
|
||||
ret = q6asm_open_read_v4(prtd->audio_client,
|
||||
prtd->codec, bits_per_sample,
|
||||
false, enc_cfg_id);
|
||||
}
|
||||
prtd->codec, bits_per_sample,
|
||||
compress_ts, enc_cfg_id);
|
||||
if (ret < 0) {
|
||||
pr_err("%s: q6asm_open_read failed:%d\n",
|
||||
__func__, ret);
|
||||
|
|
|
|||
Loading…
Reference in a new issue