Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Problem: Latency reduction when using audio/video player as input
#11
Hi,

My setup is Raspberry Pi 4 + official touchscreen + Native Instruments Komplete Audio 6 Mk2 on USB3 (https://www.native-instruments.com/en/pr...e-audio-6/).

Here is the verbose log of MPD :


Code:
Jan 15 18:46 : state_file: Saving state file /var/lib/mpd/state
Jan 15 18:46 : state_file: Loading state file /var/lib/mpd/state
Jan 15 18:46 : client: [0] opened from 127.0.0.1:60188
Jan 15 18:46 : client: [0] process command "status"
Jan 15 18:46 : client: [0] command returned 0
Jan 15 18:46 : client: [0] process command "currentsong"
Jan 15 18:46 : client: [0] command returned 0
Jan 15 18:46 : client: [0] process command "lsinfo "alsa://plug:spdifinput""
Jan 15 18:46 : alsa: buffer: size=768..768 time=16000..16000
Jan 15 18:46 : alsa: period: size=384..384 time=8000..8000
Jan 15 18:46 : alsa: buffer_size=768 period_size=384
Jan 15 18:46 : client: [0] command returned 3
Jan 15 18:46 : client: [0] process command "close"
Jan 15 18:46 : client: [0] command returned 4
Jan 15 18:46 : client: [0] closed
Jan 15 18:46 : client: [1] opened from 127.0.0.1:60190
Jan 15 18:46 : client: [1] process command "status"
Jan 15 18:46 : client: [1] command returned 0
Jan 15 18:46 : client: [1] process command "idle"
Jan 15 18:46 : client: [1] command returned 1
Jan 15 18:46 : client: [2] opened from 127.0.0.1:60194
Jan 15 18:46 : client: [2] process command "playlistinfo"
Jan 15 18:46 : client: [2] command returned 0
Jan 15 18:46 : client: [2] process command "close"
Jan 15 18:46 : client: [2] command returned 4
Jan 15 18:46 : client: [2] closed
Jan 15 18:46 : client: [3] opened from 127.0.0.1:60196
Jan 15 18:46 : client: [3] process command "playlistinfo"
Jan 15 18:46 : client: [3] command returned 0
Jan 15 18:46 : client: [3] process command "close"
Jan 15 18:46 : client: [3] command returned 4
Jan 15 18:46 : client: [3] closed
Jan 15 18:47 : client: [4] opened from 127.0.0.1:60198
Jan 15 18:47 : client: [4] process command list
Jan 15 18:47 : client: process command "clear"
Jan 15 18:47 : client: command returned 0
Jan 15 18:47 : client: process command "load "SPDIF Input""
Jan 15 18:47 : client: command returned 0
Jan 15 18:47 : client: process command "play"
Jan 15 18:47 : playlist: play 0:"alsa://plug:spdifinput"
Jan 15 18:47 : client: command returned 0
Jan 15 18:47 : client: [4] process command list returned 0
Jan 15 18:47 : alsa: buffer: size=768..768 time=16000..16000
Jan 15 18:47 : alsa: period: size=384..384 time=8000..8000
Jan 15 18:47 : alsa: buffer_size=768 period_size=384
Jan 15 18:47 : decoder_thread: probing plugin pcm
Jan 15 18:47 : decoder: audio_format=48000:16:2, seekable=false
Jan 15 18:47 : client: [1] process command "status"
Jan 15 18:47 : alsa_output: opened _audioout type=COPY
Jan 15 18:47 : alsa_output: buffer: size=12..43690 time=250..910209
Jan 15 18:47 : alsa_output: period: size=6..21845 time=125..455105
Jan 15 18:47 : alsa_output: default period_time = buffer_time/4 = 500000/4 = 125000
Jan 15 18:47 : alsa_output: format=S16_LE (Signed 16 bit Little Endian)
Jan 15 18:47 : alsa_output: buffer_size=24000 period_size=6000
Jan 15 18:47 : output: opened "ALSA Default" (alsa) audio_format=48000:16:2
Jan 15 18:47 : client: [1] command returned 0
Jan 15 18:47 : client: [1] process command "currentsong"
Jan 15 18:47 : client: [1] command returned 0
Jan 15 18:47 : client: [4] process command "close"
Jan 15 18:47 : client: [4] command returned 4
Jan 15 18:47 : client: [4] closed
Jan 15 18:47 : client: [1] process command "lsinfo "alsa://plug:spdifinput""
Jan 15 18:47 : alsa: buffer: size=768..768 time=16000..16000
Jan 15 18:47 : alsa: period: size=384..384 time=8000..8000
Jan 15 18:47 : alsa: buffer_size=768 period_size=384
Jan 15 18:47 : client: [1] command returned 3
Jan 15 18:47 : client: [1] process command "close"
Jan 15 18:47 : client: [1] command returned 4
Jan 15 18:47 : client: [1] closed
Jan 15 18:47 : client: [5] opened from 127.0.0.1:60200
Jan 15 18:47 : client: [5] process command "status"
Jan 15 18:47 : client: [5] command returned 0
Jan 15 18:47 : client: [5] process command "idle"
Jan 15 18:47 : client: [5] command returned 1
Jan 15 18:47 : client: [6] opened from 127.0.0.1:60202
Jan 15 18:47 : client: [6] process command "playlistinfo"
Jan 15 18:47 : client: [6] command returned 0
Jan 15 18:47 : client: [6] process command "close"
Jan 15 18:47 : client: [6] command returned 4
Jan 15 18:47 : client: [6] closed
Jan 15 18:48 : client: [7] opened from 127.0.0.1:60204
Jan 15 18:48 : client: [7] process command "pause"
Jan 15 18:48 : client: [7] command returned 0
Jan 15 18:48 : client: [7] process command "close"
Jan 15 18:48 : client: [7] command returned 4
Jan 15 18:48 : client: [7] closed
Jan 15 18:48 : client: [5] process command "status"
Jan 15 18:48 : client: [5] command returned 0
Jan 15 18:48 : client: [5] process command "currentsong"
Jan 15 18:48 : client: [5] command returned 0
Jan 15 18:48 : output: closed "ALSA Default" (alsa)
Jan 15 18:48 : client: [5] process command "lsinfo "alsa://plug:spdifinput""
Jan 15 18:48 : alsa: buffer: size=768..768 time=16000..16000
Jan 15 18:48 : alsa: period: size=384..384 time=8000..8000
Jan 15 18:48 : alsa: buffer_size=768 period_size=384
Jan 15 18:48 : client: [5] command returned 3
Jan 15 18:48 : client: [5] process command "close"
Jan 15 18:48 : client: [5] command returned 4
Jan 15 18:48 : client: [5] closed
Jan 15 18:48 : client: [8] opened from 127.0.0.1:60206
Jan 15 18:48 : client: [8] process command "status"
Jan 15 18:48 : client: [8] command returned 0
Jan 15 18:48 : client: [8] process command "idle"
Jan 15 18:48 : client: [8] command returned 1
Jan 15 18:48 : client: [9] opened from 127.0.0.1:60208
Jan 15 18:48 : client: [9] process command "playlistinfo"
Jan 15 18:48 : client: [9] command returned 0
Jan 15 18:48 : client: [9] process command "close"
Jan 15 18:48 : client: [9] command returned 4
Jan 15 18:48 : client: [9] closed

I am surprised to see alsa output in 16 bits, whereas the input given by the interface is 32 bits.

Here is the result of cat /proc/asound/MK2/stream0
Code:
Native Instruments Komplete Audio 6 MK2 at usb-0000:01:00.0-1.2, high speed : USB Audio

Playback:
 Status: Stop
 Interface 1
   Altset 1
   Format: S32_LE
   Channels: 6
   Endpoint: 0x06 (6 OUT) (ASYNC)
   Rates: 44100, 48000, 88200, 96000, 176400, 192000
   Data packet interval: 125 us
   Bits: 24
   Channel map: FL FR FC LFE RL RR
   Sync Endpoint: 0x86 (6 IN)
   Sync EP Interface: 1
   Sync EP Altset: 1
   Implicit Feedback Mode: No

Capture:
 Status: Stop
 Interface 2
   Altset 1
   Format: S32_LE
   Channels: 6
   Endpoint: 0x87 (7 IN) (ASYNC)
   Rates: 44100, 48000, 88200, 96000, 176400, 192000
   Data packet interval: 125 us
   Bits: 24
   Channel map: FL FR FC LFE RL RR
Reply


Messages In This Thread
RE: Latency reduction when using audio/video player as input - by jiemdev - 01-15-2023, 05:57 PM

Forum Jump: