I am trying to troubleshoot a sound issue with my softphone, Twinkle, and I hitting a wall, I have got to as far as my small amount of knowledge will take me.
Issue
Audio in twinkle does not work most of the time, sometimes it will work, maybe 1 in every 50 times I try.
Sometimes when I select the device in Twinkle I get the following error:
"Cannot open ALSA driver for PCM playback: Device or resource busy"
I did some searching and found the below, but none of them solved my issue.
https://bbs.archlinux.org/viewtopic.php?id=116042
https://www.mail-archive.com/[email protected]/msg1783689.html
https://github.com/LubosD/twinkle/issues/172
System Summary
> uname -r
5.15.1-051501-generic
> lsb_release
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish
> dpkg -s twinkle | grep 'Version:'
Version: 1:1.10.2+dfsg-1
I have a Razer blacksharkv2, with the sound card, at first I thought it was that, but audio works every where else on my system. I do have openrazer and polychromatic installed, but that doesn't do much because my headset is not supported. I did install the kernel module razer-accessory, (it is not persisting on boot though), but that didn't do much.
What I have tried
First, I checked if the application was just muted, I found out how to work alsamixer and made sure it was not muted.
I checked dmseg to see if it was being detected:
[ 4482.877247] usb 3-1: USB disconnect, device number 14
[ 4486.940376] usb 3-1: new full-speed USB device number 15 using xhci_hcd
[ 4487.307943] usb 3-1: New USB device found, idVendor=1532, idProduct=0529, bcdDevice= 0.0e
[ 4487.307952] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4487.307955] usb 3-1: Product: Razer USB Sound Card
[ 4487.307958] usb 3-1: Manufacturer: Razer
[ 4487.307960] usb 3-1: SerialNumber: 00000000
[ 4487.506402] input: Razer Razer USB Sound Card Consumer Control as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.3/0003:1532:0529.000B/input/input49
[ 4487.568703] input: Razer Razer USB Sound Card as /devices/pci0000:00/0000:00:14.0/usb3/3-1/3-1:1.3/0003:1532:0529.000B/input/input50
[ 4487.569338] hid-generic 0003:1532:0529.000B: input,hiddev0,hidraw1: USB HID v1.11 Device [Razer Razer USB Sound Card] on usb-0000:00:14.0-1/input3
I also read and followed this, I followed what was in the Arch forum post above (taken from this link), adding config to the ~/.asoundrc file, but no luck. One thing mentioned in the this link is reading the status and usage of devices in /proc, I am not sure how I would do this, but I could test a call while running a script and see what devices are being used, if anyone has any insight on that, that would be helpful.
I was also reading through this and there is a section in there that states:
Still no sound with your favourite application
Make sure that it is not a problem with the way the sound application you are using is configured.
Try dd if=/dev/urandom bs=8000 count=1 | aplay -D DEVNAME
But I don't know how to address the device:
dd if=/dev/urandom bs=8000 count=1 | aplay -D usbstream:CARD=Card
1+0 records in
1+0 records out
8000 bytes (8.0 kB, 7.8 KiB) copied, 0.000106499 s, 75.1 MB/s
ALSA lib pcm_usb_stream.c:508:(_snd_pcm_usb_stream_open) Unknown field hint
aplay: main:852: audio open error: Invalid argument
dd if=/dev/urandom bs=8000 count=1 | aplay -D Razer USB Sound Card
1+0 records in
1+0 records out
8000 bytes (8.0 kB, 7.8 KiB) copied, 0.000222269 s, 36.0 MB/s
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM Razer
aplay: main:852: audio open error: No such file or directory
I also read through these to see if there was anything extra I could learn:
https://tldp.org/HOWTO/Sound-HOWTO/index.html
https://tldp.org/HOWTO/Sound-HOWTO/x320.html#AEN415
I also tried installing another SIP client to try and test with but I have had issues installing or configuring some of them, but I will keep trying and see if one of them works, meaning it is probably an issue with Twinkle.
If anyone has any insight into this problem, then please let me know, even just some pointers as to where to look/what to read is helpful. If I can fix this then I hope I can help someone else with the same issue.