ALSA Support
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.7k
- Forks
- 662
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 2
Description
I'd like to debug an application under rr which uses an ALSA backend. It seems that many of the system calls related to audio (ioctls prefixed with SNDRV_...) are not yet supported.
I tried to add the calls used by my application, following the procedure of adding them to record_syscall.cc and the related parameter types to kernel_abi.h, but I assume that I did something wrong, because rr hangs when I try to initialize an audio device in the application. The callstack during the hang after atttaching gdb:
__libc_open64 at open64.c:47
rr::ScopedFd::ScopedFd at ScopedFd.h:24
rr::should_copy_mmap_region at util.cc:703
rr::TraceWriter::write_mapped_region at TraceStream.cc:1023
rr::process_mmap at record_syscall.cc:6085
rr::rec_process_syscall_arch<rr::X64Arch> at record_syscall.cc:6695
rr::rec_process_syscall_internal at record_syscall.cc:7206
rr::RecordSession::syscall_state_changed at RecordSession.cc:1315
rr::RecordSession::record_step at RecordSession.c:2695
rr::record at RecordCommand.cc:711
rr::RecordComand::run at RecordCommand.cc:874
main at main.cc:278
It doesn't seem to be immediately related to the code I changed, but I'll admit I have very little knowledge of most of this stuff- I'm mostly an application developer.
Is ALSA support planned? What would need to be done?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the ALSA-related syscall handling in record_syscall.cc and the parameter types in kernel_abi.h, then compare the application’s SNDRV_... ioctls with the existing syscall definitions. Reproduce the initialization hang under rr and use the reported callstack to trace the interaction with process_mmap and mapped-region recording. Done means the ALSA application can initialize and run under rr without hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100