#TinyALSA doesn't work in chroot
1 messages · Page 1 of 1 (latest)
That's a bit unclear. Did you play a sample with an audio in chroot? Does this same sample play in host? You should test playing a sample in chroot that also plays with an audiable output when you play it in host.
You can use strace in chroot. Run strace -ff tinycap 10 test.wav -D 1 -t 10 and see if there are opening permission errors when opening any device file in /dev.
Looks fine to me. I see no errors.
Can you run alsamixer in chroot?
Check if settings are different there? I can only think of mic being muted.
I can recommend to you a way to "inject" alsamixer to your chroot from the host. But do this in a copy of your chroot directory instead.
Make sure /dev and all stuff are unmounted first from your chroot.
Then do cp -a your-chroot-directory your-chroot-directory-copy
Then use this script to copy alsamixer and its dependencies to the copy of the chroot: https://raw.githubusercontent.com/konsolebox/scripts/master/rcopy.bash
Then do ( cd path/to/new-chroot && bash /path/to/rcopy.bash -t . $(which alsamixer) ).
Then chroot to your new chroot. Mount dev and stuff as needed.
See if alsamixer works.
It's a workaroundish method to creating a chroot. Sometimes you'll have to copy all files of a package manually. And sometimes you also have to copy a specific library manually.
No I'm only giving you ideas how you can debug it.
I never used tinyalsa myself.
It's not easy to figure out the problem if you don't have a working reference. If you don't have alsa it makes things more difficult.
Only thing left you can do is hack the source code itself.
Add some debug lines in crucial parts or maybe add a way to verify the device isn't muted.