Hi Alsa users, I have the following idea, which may be of interest for other users, too: I would like to abuse the 'normal' unbalanced stereo input of my on-board sound as a balanced mono input. I have a measurement microphone with an integrated amplifier and a balanced mono output which should be connected to consumer sound devices with an `ordinary' unbalanced input (I have added a very short explanation on the term `balanced' to the post scriptum). My equipment: * Ubuntu 14.04.3 with latest updates, including Kernel 3.19 and ALSA 1.0.25. * HD-Audio-based Realtek AL1150 codec on an Asrock X99 Extreme4 mainboard - with unbalanced stereo input, of course. * Earthworks M30BX microphone with a balanced mono output (an XLR plug). * A DMX out cable (XLR to 3.5mm stereo) connects the mic correctly to the line input of the sound card: Ground to ground, balanced non-inverting to unbalanced left, balanced inverting to unbalanced right. When recording something with Audacity, there is heavy noise, probably due to Asrock's low cost integration of the Realtek chip, but I get the expected inverse signals on the left and the right channel: If I merge the two channels to mono, there is silence except for the noise. But if I invert one of the channels and merge them to mono then, the noise is gone, and I have a perfect signal. That's exactly what I'm looking for! Now, long story short: What I need your guys' help with is the configuration of an Alsa PCM device which does that job automatically in real time: (1) Grab a stereo signal from the line input. (2) Invert either the left OR the right channel (i.e. multiply its signal's amplitude by minus 1). (3) Merge the channels to mono. I have read quite a few hours about ~/.asoundrc and /etc/asound.conf in the last days and, among other interesting things, found this: http://alsa.opensrc.org/Asoundrc#Downmix_stereo_to_mono But that suggestion does not seem work as expected - if I use that configuration, the left channel is doubled, and the right channel is dropped when recording (or the other way, doesn't matter). If it worked, the channels would be merged, resulting in silence, as one of them should be inverted before merging. I have found no way to invert a signal during Alsa's processing, except for this patch for some Realtek codecs which seem to have an inverted input out of the box, which is changed somehow by Alsa: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=6e72aa5f511daa2ffbd333ea99635c551b86013b There seems to be a way to toggle the inversion - might that be a way? It would be just great if somebody knew a way to achieve what I described in so many words - and thank you for reading all of them. Kind regards from the black forest, Gunnar Arndt PS. `Balanced' or `differential' means that there are three wires where an unbalanced connection has only two: ground, non-inverting (`hot') and inverting (`cold'). Hot carries the same signal as in an unbalanced connection, cold its invert. The receiver of such a signal (the sound card, in our case) evaluates the difference of hot and cold to reconstruct the original signal without noise that was added to both lines during transmission. Ethernet and PCIe work this way, as well as all professional audio equipment. ------------------------------------------------------------------------------ _______________________________________________ Alsa-user mailing list Alsa-user@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-user