In an earlier post I wrote about the fun I had while automatically switching between the built-in mic and the headset mic once the headset is plugged into the jack and thought it could not get worse. I should be proven wrong.

Lately, I got a Dell Precision M2800 with an i7-4810MQ CPU, 16 GB of RAM and a 256 GB SSD, Full HD display, WiFi and a 1GB Ethernet port for free because the original owner could not get it to work reliably under Windows 10 (I don’t remember the details). I said, this does not hurt me, because I want to operate it under Linux anyway and can give it a try. Since my wife needed a new computer, that gift just came at the right time. Everything seemed to work reliably with an openSUSE Leap 15.3 distro installed. LibreOffice, KMail, KDE-Connect and Firefox: all just works. Not knowing, that the details would pop up later.

My wife sings in a few choirs and music projects and due to the Covid 19 pandemic the groups switched to a sort of online recording. The singers receive the music track and then each of them records his or her track and sends it back in for “post production”. Audacity is the tool of choice and my wife gets along using it, except when something does not work as expected. Then I get that usual family administrator call and am supposed to fix things.

First problem: Lag between music track and voice recording

Audacity allows to playback tracks while recording a new track, a technique called overdubbing. The old laptop had an analog mic input and there was no noticeable lag between the playback and recorded track. With the new laptop she uses a microphone that has a USB interface. Somewhere down the chain, this setup produces a lag of more than 100ms which does not sound well if you play it back after the recording since music and voice are off by this time.

A bit of searching unveiled, that Audacity has a setting to compensate that latency. It was easy to measure using Audacity’s features and the result was great.

Second problem: Weird error messages, recording does not work

Once that was working, a few days later, she complained about weird error messages showing up. They were in the context of the lag compensation and I did not understand why they appeared at first. Anyway, recording was not possible anymore and of course, her project deadline was approaching. A lot of reading articles on the web and trying various things turned out, that an Audacity setting was changed by here causing the problem. Once resolved, I thought it becomes quiet now. I should again be proven wrong.

Third problem: Headphones don’t work reliably

Next she complained, that her headphones do not work reliably. The headphones are using a standard 3.5″ analog jack to be connected to the audio parts. Nothing special and fancy. The notebook’s loudspeakers are working fine but when you plug in the headphones: silence, nada, nothing. First I thought it is an electrical problem with the phones, but my set wasn’t working either. Well, I understand that this is not ideal for her recording sessions if she can’t listen to the music track while singing. But it used to work before. I checked out so many things without success while trying to understand what other people did who observed the same or similar problems. In the end, I came across an article on the web that mentioned specific settings for the Intel HDA chip and Dell laptops. So I added that and now things seem to be working with more reliability. Once confident, I used the YaST sound settings dialog to set the option.

Fourth problem: Noise after a while only in the headphones

During my tests to solve the aforementioned problem with the headphones, I noticed a weird white noise sound when output stops. Not immediately, but after a few seconds. Once playback starts again, the noise disappears again. The noise was also only audible in the headphones, not the speakers. Strange. A bit of research on the web pointed in the direction of a power-save feature of the audio hardware. Turning that temporarily off solved the problem. Now I just needed to add that to the settings to gain persistence after the next reboot. Again, I used the YaST sound settings dialog since the laptop also has an HDMI audio device (which we don’t use here). After adding the setting, the system complained that it does not find any sound hardware. What? Reboot. No sound. What went wrong here? Analyzing /var/log/messages and dmesg output I found that the power-save setting was not accepted by the snd_hda_intel driver. Following is the output of dmesg of two of my trials with different settings:

[ 56.728606] snd_hda_intel: ',0' invalid for parameter 'power_save'
[ 214.393062] snd_hda_intel: '0,0' invalid for parameter 'power_save'

So I removed it from the settings in /etc/modprobe.d/50-sound.conf manually as YaST did not allow me to do so. After that, I could reload the driver and sound was working again, but the noise was also back.

A bit of trial and error showed, that some options for the driver are per card and allow to provide a comma separated list of values (one for each card) but that the power-save option does not support that and the driver refuses to load upon an invalid setting. It only takes a single parameter. So using YaST in this case simply does not work and screws up things (see above). The current content of /etc/modprobe.d/50-sound.conf now looks like this:

options snd-hda-intel model=laptop,dell-headset-multi power_save=0
options snd slots=snd-hda-intel,snd-hda-intel
# u1Nb.pLnMBxWaUwD:8 Series/C220 Series Chipset High Definition Audio Controller
alias snd-card-0 snd-hda-intel
# 3hqH.XQtT9wKmGS0:Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
alias snd-card-1 snd-hda-intel

Still unresolved

A problem that I may not be able to solve with the notebook and software is the monitoring of the singers voice. My wife says, that if she can hear herself next to the music in the headphones while recording would be ideal. Audacity supports such a feature but with the latency of over 100ms this is not usable. I guess, I have to get some external mixer equipment to solve this problem. We’ll see.

More (Linux) audio fun