Запуск теста задержки ALSA на Android

Я пытаюсь измерить задержку ALSA на Android с помощью их приложения для измерения микропроцессоров latency.c (микробенчмарка задержки ALSA). Однако приложению задержки всегда не удается открыть любое аудиоустройство на устройстве (как по умолчанию, так и другие параметры).

Выход на время ожидания:

latency -P "hw:0,0" -C "hw:0,0" -r 44100 -m 128 -M 128 -p -s 1       <
WARNING: linker: ./latency: unused DT entry: type 0x1d arg 0x505
WARNING: linker: ./latency: unused DT entry: type 0x6ffffffe arg 0xd3c
WARNING: linker: ./latency: unused DT entry: type 0x6fffffff arg 0x1
Scheduler set to Round Robin with priority 99...
Playback device is hw:0,0
Capture device is hw:0,0
Parameters are 44100Hz, S16_LE, 2 channels, non-blocking mode
Poll mode: yes
Loop limit is 44100 frames, minimum latency = 128, maximum latency = 128
Playback open error: Invalid argument

Я пробовал это на множестве других аудиоустройств, таких как hw:0,27, основываясь на числах, которые я получил от ./aplay -L

latency -P "hw:0,27" -C "hw:0,0" -r 44100 -m 128 -M 128 -p -s 1       <
WARNING: linker: ./latency: unused DT entry: type 0x1d arg 0x505
WARNING: linker: ./latency: unused DT entry: type 0x6ffffffe arg 0xd3c
WARNING: linker: ./latency: unused DT entry: type 0x6fffffff arg 0x1
Scheduler set to Round Robin with priority 99...
Playback device is hw:0,27
Capture device is hw:0,0
Parameters are 44100Hz, S16_LE, 2 channels, non-blocking mode
Poll mode: yes
Loop limit is 44100 frames, minimum latency = 128, maximum latency = 128
Record open error: Invalid argument

Как мне заставить это приложение работать на устройстве и предоставить мне значение задержки? Я знаю, что звук работает на этом устройстве, так как я могу использовать встроенный аудиоплеер для воспроизведения файлов.wav. Кажется, он не работает с моей скомпилированной версией aplay (выдает ту же ошибку открытия воспроизведения).

С другой стороны, как правильно определить, какое аудиоустройство соответствует гарнитуре и / или динамику / микрофону? В настоящее время я пытаюсь найти их методом проб и ошибок.

Некоторые подробности о платформе:

Unlocked Motorola Moto G LTE (codename peregrine)
OS: Cyanogenmod 12.1 with root privileges (based on Android 5.1 Lollipop)
Kernel: Linux localhost 3.4.42-g832c593 #1 SMP PREEMPT armv7l GNU/Linux
ALSA-lib & ALSA-utils: 1.1.0

РЕДАКТИРОВАТЬ

Выход из $ arecord -l

card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 0: MultiMedia1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 1: MultiMedia2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 2: CS-Voice (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 3: VoIP (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 5: SLIMBUS_0 Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 6: INT_FM Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 8: AFE-PROXY TX msm-stub-tx-8 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 10: AUXPCM Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 11: SLIMBUS_1 Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 12: SLIMBUS_3 Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 13: SLIMBUS_4 Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 14: Voice2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 15: MultiMedia5 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 16: MultiMedia9 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 17: VoLTE (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 18: QCHAT (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 19: Listen Audio Service (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 20: COMPR8 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 22: (Internal BT-SCO Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 24: (Internal FM Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 26: (AFE Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 28: (AUX PCM Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 29: (AUX PCM Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 30: (Voice Uplink Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 31: (Voice Downlink Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 35: (Slimbus Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 37: (Slimbus1 Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 39: (Slimbus3 Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 41: (Slimbus4 Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 42: (Slimbus5 Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Выход из $aplay -l

WARNING: linker: ./aplay: unused DT entry: type 0x6ffffffe arg 0x1d20
WARNING: linker: ./aplay: unused DT entry: type 0x6fffffff arg 0x1
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 0: MultiMedia1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 1: MultiMedia2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 2: CS-Voice (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 3: VoIP (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 4: LPA (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 5: SLIMBUS_0 Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 6: INT_FM Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 7: AFE-PROXY RX msm-stub-rx-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 9: (COMPR) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 10: AUXPCM Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 11: SLIMBUS_1 Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 12: SLIMBUS_3 Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 13: SLIMBUS_4 Hostless (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 14: Voice2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 15: MultiMedia5 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 16: MultiMedia9 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 17: VoLTE (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 18: QCHAT (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 20: COMPR8 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 21: (Internal BT-SCO Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 23: (Internal FM Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 25: (AFE Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 27: HDMI_RX_HOSTLESS (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 28: (AUX PCM Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 29: (AUX PCM Capture) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 32: (Voice Farend Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 33: (Voice2 Farend Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 34: (Slimbus Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 36: (Slimbus1 Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 38: (Slimbus3 Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: msm8226tapan930 [msm8226-tapan9302-snd-card], device 40: (Slimbus4 Playback) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

0 ответов

Другие вопросы по тегам