Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PulseAudio modules not working on Orange Pi Lite2 #7

Closed
gavv opened this issue Mar 28, 2019 · 3 comments
Closed

PulseAudio modules not working on Orange Pi Lite2 #7

gavv opened this issue Mar 28, 2019 · 3 comments
Assignees

Comments

@gavv
Copy link
Member

gavv commented Mar 28, 2019

roc-recv works, but module-roc-sink-input constantly interrupts playback:

I: [alsa-sink-USB Audio] roc_pipeline: receiver: creating session
D: [alsa-sink-USB Audio] roc_packet: delayed reader: initializing: delay=8820
D: [alsa-sink-USB Audio] roc_fec: of decoder: initializing Reed-Solomon decoder
D: [alsa-sink-USB Audio] roc_audio: watchdog: initializing: max_blank_duration=88200 max_drops_duration=88200 drop_detection_window=13230
D: [alsa-sink-USB Audio] roc_audio: resampler: initializing: window_interp=128 window_size=32 frame_size=640 channels_num=2
D: [alsa-sink-USB Audio] roc_audio: resampler reader: initializing window
D: [alsa-sink-USB Audio] roc_audio: latency monitor: initializing: target_latency=8820 in_rate=44100 out_rate=44100
D: [alsa-sink-USB Audio] roc_packet: router: detected new stream: source=2072940300 flags=0x8u
D: [alsa-sink-USB Audio] roc_packet: router: detected new stream: source=1451934384 flags=0x10u
D: [alsa-sink-USB Audio] roc_packet: delayed reader: initial queue: delay=8820 queue=79104 packets=256
D: [alsa-sink-USB Audio] roc_packet: delayed reader: trimmed queue: delay=8820 queue=8961 packets=29
D: [alsa-sink-USB Audio] roc_fec: fec reader: repair queue: dropped=21
D: [alsa-sink-USB Audio] roc_audio: depacketizer: got first packet: zero_samples=0
D: [alsa-sink-USB Audio] roc_fec: fec reader: repair queue: dropped=21
D: [alsa-sink-USB Audio] roc_audio: depacketizer: ts=1976227423 loss_ratio=0.00000
D: [alsa-sink-USB Audio] roc_fec: fec reader: repair queue: dropped=21
D: [alsa-sink-USB Audio] roc_fec: fec reader: repair queue: dropped=21
D: [alsa-sink-USB Audio] roc_fec: fec reader: repair queue: dropped=21
D: [alsa-sink-USB Audio] roc_fec: fec reader: repair queue: dropped=15
D: [alsa-sink-USB Audio] roc_fec: fec reader: got first packet in a block, start decoding: n_packets_before=12 blk_sn=3948
D: [alsa-sink-USB Audio] roc_audio: latency monitor: latency=1546 target=8820 fe=1.00000 trim_fe=1.00000 adj_fe=1.00000
D: [alsa-sink-USB Audio] roc_fec: of decoder: repaired 0/28/30 ..XXXXXXXXXXXXXXXXXX xxxxxxxxxx
D: [alsa-sink-USB Audio] roc_audio: watchdog: status: ............ibbbbbbb
D: [alsa-sink-USB Audio] roc_audio: depacketizer: dropping late packet: ts=1976244063 pkt_ts=1976237609
D: [alsa-sink-USB Audio] roc_audio: depacketizer: dropping late packet: ts=1976244063 pkt_ts=1976237918
D: [alsa-sink-USB Audio] roc_audio: depacketizer: dropping late packet: ts=1976244063 pkt_ts=1976238227
D: [alsa-sink-USB Audio] roc_audio: depacketizer: dropping late packet: ts=1976244063 pkt_ts=1976238536
D: [alsa-sink-USB Audio] roc_fec: of decoder: repaired 0/24/30 ......XXXXXXXXXXXXXX xxxxxxxxxx
D: [alsa-sink-USB Audio] roc_audio: depacketizer: fetched=0 dropped=4
D: [alsa-sink-USB Audio] roc_audio: watchdog: status: bbbbbbbbbbbbbBbbbbbb
D: [alsa-sink-USB Audio] roc_audio: latency monitor: latency out of bounds: latency=-12611 min=-8820
I: [alsa-sink-USB Audio] roc_pipeline: receiver: removing session

This box is aarch64 (have not tested it before) and uses pulseaudio 8.0 (also have not tested it before).

@gavv gavv self-assigned this Mar 28, 2019
@gavv
Copy link
Member Author

gavv commented Mar 29, 2019

It seems the problem is that PulseAudio buffer size is larger then the Roc target latency. Playback goes almost normally if I set 2sec latency in Roc. Not sure why PulseAudio chose such a high latency though, needs some more investigation. Also there are some tiny but regular glitches even with 2sec latency.

@gavv
Copy link
Member Author

gavv commented Mar 31, 2019

Related: #6, #17, #18, #16.

@gavv
Copy link
Member Author

gavv commented Mar 31, 2019

It's now possible to configure module-roc-sink-input to use higher network latency. This fixes the playback.

However the real problem was that module-roc-sink-input didn't request PulseAudio the minimum desired latency so the sink was using the default which is about 2 seconds.

It's now also possible to configure module-roc-sink-input to request lower playback latency. This is enabled by default now and fixes the playback as well.

@gavv gavv closed this as completed Mar 31, 2019
@gavv gavv reopened this Mar 31, 2019
@gavv gavv closed this as completed Mar 31, 2019
@gavv gavv transferred this issue from roc-streaming/roc-toolkit Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant