Some Issues, with Multiple Input Ports, on One PulseAudio Sound Device

My situation is such that my Linux computers have elaborate Graphical User Interfaces, as well as the Pulse Audio Server, for use in multimedia. Yet, to adapt them to my own needs, I have done some customizing of the Audio Server, specifically, giving it a ‘Loop-Back’ module, so that when I play music from my FM Receiver, to the Line Input jack of the PC in question, that music is ‘looped back’, to my speaker amp, for my enjoyment. Such configuration changes can have consequences on how to perform other multimedia tasks, such as Screen Recording, which, on the computer named ‘Phosphene’, requires that I plug a microphone into the Front Mic Jack because that Tower-PC has no internal Web-Cam or Mic.

Ever since I made the ‘loopback’ configuration change, I never retested the ability to plug in a Mic into the front jack, until only a few days ago. But when I finally did, it was with the initial purpose of testing whether certain Screen-Recording software works, which is different software from the software I’d normally use, which was not designed primarily for use with Linux, but the ability of which to connect to my sound inputs is as good, as that of the Web-browser (Chrome) that the extension runs within.

I got a rude surprise when running this test, in that plugging in an input, to the Front Mic Jack, borked my sound, at least until I restarted Pulse Audio. But beyond that, I learned that my sound issue was not due to this browser extension, but rather due to the way I had configured Pulse Audio, as well as perhaps, due to hardware limitations of the ‘Creative Sound Blaster X-Fi Xtreme’ sound card. I.e., Even if I did nothing to relaunch this extension I was first testing, but only plugged in a mike to the Front Mic Jack, during a clean Pulse Audio Server session, the malfunction came back.

So, what was the nature of this malfunction?

According to Pulse Audio, a computer could have one or more Sound Devices, which corresponds to the number of Analog-to-Digital Converters it has, in the case of capture devices, but each of those could have more than one Port, which would be the specific analog input, that is feeding the Sound Device in question. And, Pulse Audio supports the H/W feature of modern sound cards, to detect whether a plug has in fact been inserted into each jack, thus making the Port available. By default, what Pulse Audio would do is simple: Switch the input of the Sound Device, to the newly-plugged analog input. But, it doesn’t work.

When I plugged my external mike into the Front Jack for any reason, while the Line Input in the back of the computer was also active, which it is by default, just so that I could turn on my FM Receiver and hear music,

  • I got no sound input from the Front Mic, even though the GUI shows that the input has been switched,
  • Switching the input manually produced no difference in behaviour,
  • The loopback module will go into a corrupted state, in which it will loop back sound from the Line Input, but with a 10-30 second time delay. I was hearing music, long after I had turned my FM Receiver off…

I took numerous, lengthy steps to find out why this was happening, but my conclusion was, that the actual hardware is unable to activate the Front Mic Jack, as long as the (rear) Line Input is plugged in simultaneously. And this cannot be corrected from the software side, with my present H/W. And so, what I needed to do was, to develop a workflow that would ease switching from ‘Music Enjoyment Mode’, to ‘Screen Recording Mode’, and back again, in the fastest time possible, and without requiring excessive restarts…

In other words, even if I was setting up a Screen-Recording to be created using the native application I’d normally use, because either solution is at the application level, I’d need to follow the same steps to make them work.

Continue reading Some Issues, with Multiple Input Ports, on One PulseAudio Sound Device

“Help! No Volume Mute under Plasma 5!”

One of the subjects I blog about, is a computer I named ‘Plato’, which is running Debian / Stretch (Debian 9), and the desktop manager of which is Plasma 5, which is the successor to KDE 4.x .

One of the features which KDE 4 definitely had, was an icon in the notification-tray, from which we could control our volume levels easily, as well as to mute the sound temporarily, eventually to be unmuted again, at which point the earlier, unmuted settings should be remembered. At first glance it would seem that Plasma 5 has done away with this capability. Trying to solve this can cause people to spend hours searching the Internet, changing their Plasma 5 preferences, and maybe even forgetting their Plasma 5 preferences, because they disabled all their System Sounds from there.

Recently, I was on a fact-finding mission about this, and am willing to share my solutions.

Under Plasma 5, we really only need to have 2 packages installed, in order to control our volume-levels, etc., assuming that we have gotten our hardware recognized first. Those packages would be:

  1. ‘plasma-pa’
  2. ‘pavucontrol’

The first of these packages integrates with Plasma, and is also responsible for the icon in the notification tray. The second package gives us more control, over our sound-levels specifically, since Plasma 5 uses the Pulse Audio sound-server by default.

If we can see the icon in the notification tray, then a detail which we may overlook after we left-click on that icon, is a tiny little loudspeaker-symbol, on the left end of one of the volume sliders:

screenshot_20180423_150952_c

Left-clicking on this little symbol will cause the volume-bar to the right of it to become slightly pale, which will mean, that the device in question has been muted. I’m saying that ‘we’ could overlook that we even have this feature, because earlier, ‘I’ did not know that I have this feature.

But, this is only what the ‘plasma-pa’ package can show us. The ‘pavucontrol’ package gives us the ability to fine-tune our sound-levels as shown below:

screenshot_20180423_151117

Now, there’s an aspect to how this setup now works, which is slightly more complicated than how KDE 4 used to handle it. The Pulse Audio server attempts to adjust playback as well as recording levels, on a per-application basis. Thus, the view above is almost empty, because there were no applications playing back any sounds, at the moment I recorded this screen-shot.

A frustrating fact which can exist with this, is that some applications will only play a sound for 2 seconds, during which an additional volume-bar appears in the GUI, and after which that volume-bar disappears again, even if we did not have enough time to adjust one volume level. This happens to result from the design-decision, that volume-control should exist at the per-application level. Hence, even if we use media-control keys on our keyboard, those keys will only affect the one main application which happens to be playing, at any given moment. They won’t affect System Sounds.

But this description might sound like I have to say, ‘There is no problem,’ when in fact, under Debian / Stretch, There Is a problem. That problem, as I see it, lies in the fact that by default, the one volume-bar which the GUI has shown above, for all System Sounds, may not even work.

(Updated 04/26/2018 … )

Continue reading “Help! No Volume Mute under Plasma 5!”

Update to ‘gstreamer’

Under Debian / Jessie, the standard back-end to the PulseAudio daemon is ‘gstreamer’. This is a set of programs that perform potentially complex sound-processing under Linux, yet have no real GUI as it stands.

In the past week or so, there was an update to this software-subsystem.

I have not rebooted any of my computers since then, nor have I done a simpler user-session-restart. Therefore, I do not yet know whether this update has broken PulseAudio, nor whether it has improved the performance of the audio-daemon, that is standard for KDE, and that definitely has a GUI.

When I find this out, I will comment on it again.

Dirk