Summary: | >=media-sound/audacity-2.4.2-r1: Recording device list duplicates items from card 0 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sophie Hamilton <gentoo-bugs> |
Component: | Current packages | Assignee: | Professional Audio Applications Maintainers <proaudio> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | fordfrog, jstein, richard |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Output of /usr/sbin/alsa-info.sh (as root)
Screenshot of Audacity's recording devices list with PCH as card 0 Screenshot of Audacity's recording devices list with Loopback as card 0 |
Description
Sophie Hamilton
2016-08-27 00:01:43 UTC
Created attachment 444214 [details]
Screenshot of Audacity's recording devices list with PCH as card 0
Created attachment 444216 [details]
Screenshot of Audacity's recording devices list with Loopback as card 0
Oh, I forgot to mention - note too that in the 'fixed' screenshot with Loopback as card 0, the "Front Mic", "Rear Mic" and "Line" inputs don't show up even when they should on the ALC1150 devices, so it's easy to see that card 0's inputs are just being copied. I've been attempting to debug this and find out exactly where things are going wrong. Unfortunately, I've hit the limit of my knowledge. I've managed to find out that when Audacity initialises its Device Manager (DeviceManager.cpp), it uses an interesting method of finding the sources for input devices - it temporarily opens a stream to each device, and then queries PortMixer (part of PortAudio AFAIK, though for some reason it uses included source code from Audacity's tarball) by calling Px_OpenMixer on the stream and using the resulting Px object. It seems that this is where the problem is occurring. On ALSA (OpenMixer_Linux_ALSA(), lib-src/portmixer/src/px_linux_alsa.c), the Px object is initialised and PaAlsa_GetStreamInputCard is called in order to get the card number from the previously-opened stream. However, this appears to always be returning 0 (at least, it is on my system), which of course means that the sources Audacity eventually gets are from the mixers on card 0. I believe that the streams themselves are constructed properly - they certainly seem to have the right parameters in the source code, but I've not yet broken out the debugger so I can break and check the various /proc files to make sure that the right devices are being opened. That's something I'll try next time I get some time to work on this, though for now I'm shattered. I hope this helps a bit in trying to find the issue. Unfortunately I don't know PortAudio's internals well enough to really go deeper then PaAlsa_GetStreamInputCard, but if anybody needs me to give any more data or to patch some code, please let me know. (To be clear, when I say that PaAlsa_GetStreamInputCard is always "returning 0", I mean that it's always setting the 'card' variable to 0.) I just tested media-sound/audacity-2.1.3 (marked unstable at the moment), and this bug appears to still be present. I haven't been able to look into this bug any further since the last time I updated; I apologise! (In reply to Sophie Hamilton from comment #6) > I just tested media-sound/audacity-2.1.3 (marked unstable at the moment), > and this bug appears to still be present. > > I haven't been able to look into this bug any further since the last time I > updated; I apologise! Can you please report it to upstream then? Thanks please test it with 2.4.2-r1 and report back no reports, so closing. Sorry, I intended to reply when I had installed it but I haven't had the time to update yet. I'll update when I can and get back to you. Sorry for the delay. I've finally been able to test this. Unfortunately, =media-sound/audacity-2.4.2-r1 still exhibits the issue as documented. (I'm also experiencing a weird bug where the X mouse cursor and the where Audacity thinks the mouse cursor is do not agree and are offset from each other, which is partly why this bug took so long to reopen, but that's a story for another bug - possibly #736192, but I don't know.) I'm sorry to have to reopen this, especially after such a long time, and I'm especially sorry because I never reported this upstream as suggested; IIRC I was having trouble finding where I needed to do so, and I'm sorry I never said this. I can see now from https://wiki.audacityteam.org/wiki/Reporting_Bugs that the forum is the place to report bugs so I'll try giving that a go if it's still desired. Once again, I'm so sorry. Sophie, thank you for the update :-) please paste the link to your upstream ticket here. |