mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
Merge "asoc: Add LLNP mode support"
This commit is contained in:
commit
efb79a9556
4 changed files with 16 additions and 2 deletions
7
asoc/msm-pcm-q6-v2.c
Executable file → Normal file
7
asoc/msm-pcm-q6-v2.c
Executable file → Normal file
|
|
@ -751,9 +751,11 @@ static int msm_pcm_capture_prepare(struct snd_pcm_substream *substream)
|
|||
else if (params_format(params) == SNDRV_PCM_FORMAT_S32_LE)
|
||||
bits_per_sample = 32;
|
||||
|
||||
/* ULL mode is not supported in capture path */
|
||||
/* ULL mode is not supported in capture path so using LLNP insted of ULL */
|
||||
if (pdata->perf_mode == LEGACY_PCM_MODE)
|
||||
prtd->audio_client->perf_mode = LEGACY_PCM_MODE;
|
||||
else if (pdata->perf_mode == ULTRA_LOW_LATENCY_PCM_MODE)
|
||||
prtd->audio_client->perf_mode = LOW_LATENCY_PCM_NOPROC_MODE;
|
||||
else
|
||||
prtd->audio_client->perf_mode = LOW_LATENCY_PCM_MODE;
|
||||
|
||||
|
|
@ -3774,6 +3776,9 @@ static int msm_pcm_probe(struct platform_device *pdev)
|
|||
else if (!strcmp(latency_level, "ull-pp"))
|
||||
pdata->perf_mode =
|
||||
ULL_POST_PROCESSING_PCM_MODE;
|
||||
else if (!strcmp(latency_level, "llnp"))
|
||||
pdata->perf_mode =
|
||||
LOW_LATENCY_PCM_NOPROC_MODE;
|
||||
}
|
||||
} else {
|
||||
pdata->perf_mode = LEGACY_PCM_MODE;
|
||||
|
|
|
|||
|
|
@ -7582,6 +7582,7 @@ static struct snd_soc_dai_link msm_common_dai_links[] = {
|
|||
.async_ops = ASYNC_DPCM_SND_SOC_PREPARE,
|
||||
#endif /* CONFIG_AUDIO_QGKI */
|
||||
.dpcm_playback = 1,
|
||||
.dpcm_capture = 1,
|
||||
.trigger = {SND_SOC_DPCM_TRIGGER_POST,
|
||||
SND_SOC_DPCM_TRIGGER_POST},
|
||||
.ignore_suspend = 1,
|
||||
|
|
|
|||
7
dsp/q6asm.c
Executable file → Normal file
7
dsp/q6asm.c
Executable file → Normal file
|
|
@ -3367,7 +3367,12 @@ static int __q6asm_open_read(struct audio_client *ac,
|
|||
if (ac->perf_mode == LOW_LATENCY_PCM_MODE) {
|
||||
open.mode_flags |= ASM_LOW_LATENCY_TX_STREAM_SESSION <<
|
||||
ASM_SHIFT_STREAM_PERF_MODE_FLAG_IN_OPEN_READ;
|
||||
} else {
|
||||
}
|
||||
else if (ac->perf_mode == LOW_LATENCY_PCM_NOPROC_MODE) {
|
||||
open.mode_flags |= ASM_LOW_LATENCY_NPROC_TX_STREAM_SESSION <<
|
||||
ASM_SHIFT_STREAM_PERF_MODE_FLAG_IN_OPEN_READ;
|
||||
}
|
||||
else {
|
||||
open.mode_flags |= ASM_LEGACY_STREAM_SESSION <<
|
||||
ASM_SHIFT_STREAM_PERF_MODE_FLAG_IN_OPEN_READ;
|
||||
}
|
||||
|
|
|
|||
3
include/dsp/apr_audio-v2.h
Executable file → Normal file
3
include/dsp/apr_audio-v2.h
Executable file → Normal file
|
|
@ -8281,6 +8281,9 @@ struct asm_stream_cmd_open_shared_io {
|
|||
/* Bit value for Low Latency Tx stream subfield */
|
||||
#define ASM_LOW_LATENCY_TX_STREAM_SESSION 1
|
||||
|
||||
/* Bit value for Low Latency No Post Processing Tx stream subfield */
|
||||
#define ASM_LOW_LATENCY_NPROC_TX_STREAM_SESSION 3
|
||||
|
||||
/* Bit shift for the stream_perf_mode subfield. */
|
||||
#define ASM_SHIFT_STREAM_PERF_MODE_FLAG_IN_OPEN_READ 29
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue