Realtek soundcard - Bad quality/possible driver issue

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Duck Freeman
Level 1
Level 1
Posts: 21
Joined: Wed Oct 16, 2019 3:43 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by Duck Freeman » Fri Oct 18, 2019 5:33 pm

MrEen wrote:
Fri Oct 18, 2019 5:04 pm
See if this cleans it up any. If not, undo it afterwards:
If you're experiencing glitches, skips, pops or crackling in your audio playback, it's quite possibly caused by the timer-based scheduling pulseaudio now uses. Disable timer-based scheduling this way:
Users of 18.3 and earlier versions of Mint type this in the terminal: gksudo xed /etc/pulse/default.pa
Users of 19 and later versions of Mint type this in the terminal: xed admin:///etc/pulse/default.pa
Find the line that says load-module module-udev-detect and change it to load-module module-udev-detect tsched=0
Save the file, then run pulseaudio -k in the terminal and test your sound
It seems my problem got solved. No strange, extra noises heard while i speak. I found the automatic voice gain option, turned it off and it solved the when i talk volume get lowered problem, my mic is loud and clear, and the audio quality has gotten better too (even tho it was not a problem.)

I only got two questions left:

I: how to make the fix permament / how to always do pulseaudio -k, so i don't have to manually type every time
II: What was the main cause of the problem? (So i can understand the system better)

Also, many many thanks for helping me, if this actually fixed my problem (as it seems.)

User avatar
MrEen
Level 15
Level 15
Posts: 5904
Joined: Mon Jun 12, 2017 8:39 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Fri Oct 18, 2019 6:02 pm

I can't say for sure, but it sounds like Gain was not necessary for that mic, and caused your issue with it being set. Where did you turn it off? In alsamixer? If we need to set something to do that on each boot, we can once I know how you accomplished it this time.

I'm hoping you won't need to be running pulseaudio -k often, if ever again. And I can't think of any shortcuts/automation available as the system wouldn't know when it needs to be run.

Duck Freeman
Level 1
Level 1
Posts: 21
Joined: Wed Oct 16, 2019 3:43 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by Duck Freeman » Fri Oct 18, 2019 6:12 pm

MrEen wrote:
Fri Oct 18, 2019 6:02 pm
I can't say for sure, but it sounds like Gain was not necessary for that mic, and caused your issue with it being set. Where did you turn it off? In alsamixer? If we need to set something to do that on each boot, we can once I know how you accomplished it this time.
I have absolute no idea to be honest :D I only changed the mic volume in alsamixer, and messed with the default options in the applications. (for example: echo cancellation in discord )

Tho all settings are set in windows. (Driver's options --> echo cancellation, reduction, n stuff)

I really hope that the problem got permanently fixed :)

User avatar
MrEen
Level 15
Level 15
Posts: 5904
Joined: Mon Jun 12, 2017 8:39 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Fri Oct 18, 2019 6:16 pm

Duck Freeman wrote:
Fri Oct 18, 2019 6:12 pm
I really hope that the problem got permanently fixed :)
I'm hoping the same.

If not, we can look at things like the output of amixer to see what options there are and what they're set to.

Duck Freeman
Level 1
Level 1
Posts: 21
Joined: Wed Oct 16, 2019 3:43 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by Duck Freeman » Sat Oct 19, 2019 6:41 am

MrEen wrote:
Fri Oct 18, 2019 6:16 pm
Duck Freeman wrote:
Fri Oct 18, 2019 6:12 pm
I really hope that the problem got permanently fixed :)
I'm hoping the same.

If not, we can look at things like the output of amixer to see what options there are and what they're set to.
I tested my audio this day too, now the strange noises are back :/ pulseaudio -k didn't work this time.

Output of amixer:https://pastebin.com/X0m1Mxv5

User avatar
MrEen
Level 15
Level 15
Posts: 5904
Joined: Mon Jun 12, 2017 8:39 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Sat Oct 19, 2019 11:28 am

Duck Freeman wrote:
Sat Oct 19, 2019 6:41 am
MrEen wrote:
Fri Oct 18, 2019 6:16 pm
Duck Freeman wrote:
Fri Oct 18, 2019 6:12 pm
I really hope that the problem got permanently fixed :)
I'm hoping the same.

If not, we can look at things like the output of amixer to see what options there are and what they're set to.
I tested my audio this day too, now the strange noises are back :/ pulseaudio -k didn't work this time.

Output of amixer:https://pastebin.com/X0m1Mxv5
Is this sound you're listening to, or sound from your microphone? The amixer output shows your Rear Mic is muted:

Code: Select all

  Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Run alsamixer in the terminal. Use the arrow keys to select columns, the m key to unmute (muted columns show MM at the bottom) and the up/down arrows to raise/lower volume levels.

This is really starting to sound like the apps you're using are automatically adjusting your settings. Here's something to try after making the changes in alsamixer. In the terminal run arecord -d 20 test-mic.wav and start speaking into the mic. After the 20 seconds is up, run aplay test-mic.wav. Do you hear your recorded voice clearly? If so, it's definitely your apps causing your issues.

Also, did you try deleting the files in ~/.config/pulse before running pulseaudio -k? That may have helped. And you'd probably need to restart the apps again after that.

I'll wait for you reply before suggesting a new idea involving .asoundrc.

Duck Freeman
Level 1
Level 1
Posts: 21
Joined: Wed Oct 16, 2019 3:43 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by Duck Freeman » Sat Oct 19, 2019 2:25 pm

MrEen wrote:
Sat Oct 19, 2019 11:28 am
Duck Freeman wrote:
Sat Oct 19, 2019 6:41 am
MrEen wrote:
Fri Oct 18, 2019 6:16 pm


I'm hoping the same.

If not, we can look at things like the output of amixer to see what options there are and what they're set to.
I tested my audio this day too, now the strange noises are back :/ pulseaudio -k didn't work this time.

Output of amixer:https://pastebin.com/X0m1Mxv5
Is this sound you're listening to, or sound from your microphone? The amixer output shows your Rear Mic is muted:

Code: Select all

  Simple mixer control 'Rear Mic',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 0 [0%] [-34.50dB] [off]
  Front Right: Playback 0 [0%] [-34.50dB] [off]
Run alsamixer in the terminal. Use the arrow keys to select columns, the m key to unmute (muted columns show MM at the bottom) and the up/down arrows to raise/lower volume levels.

This is really starting to sound like the apps you're using are automatically adjusting your settings. Here's something to try after making the changes in alsamixer. In the terminal run arecord -d 20 test-mic.wav and start speaking into the mic. After the 20 seconds is up, run aplay test-mic.wav. Do you hear your recorded voice clearly? If so, it's definitely your apps causing your issues.

Also, did you try deleting the files in ~/.config/pulse before running pulseaudio -k? That may have helped. And you'd probably need to restart the apps again after that.

I'll wait for you reply before suggesting a new idea involving .asoundrc.
Still bad mic quality :/ (i have unmuted every channel, and disabled auto-mute mode, deleted every file from /.config/pulse, even pulseaudio -k didn't help.)

User avatar
MrEen
Level 15
Level 15
Posts: 5904
Joined: Mon Jun 12, 2017 8:39 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Sat Oct 19, 2019 2:39 pm

I have another idea. Sometimes the mic is mono, but is trying to input in stereo causing issues similar to this. In alsamixer use the z button to lower one side of the stereo channel of the mic to 0. For example, if at the bottom of the column it shows 100<>100, lowering it will make it look like 0<>100, then test the mic. You may need to reversse the side. Use the q key to raise the low side, then the c key to lower the right channel to 0 so it looks like 100<>0. Test again. You can use the e key to raise the right side if that didn't help.

This can also be done in pavucontrol by lower the left or right channels on the Input Devices tab. If you don't see the 2 channels, click on the lock icon to expose them.

Duck Freeman
Level 1
Level 1
Posts: 21
Joined: Wed Oct 16, 2019 3:43 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by Duck Freeman » Sun Oct 20, 2019 9:33 am

MrEen wrote:
Sat Oct 19, 2019 2:39 pm
I have another idea. Sometimes the mic is mono, but is trying to input in stereo causing issues similar to this. In alsamixer use the z button to lower one side of the stereo channel of the mic to 0. For example, if at the bottom of the column it shows 100<>100, lowering it will make it look like 0<>100, then test the mic. You may need to reversse the side. Use the q key to raise the low side, then the c key to lower the right channel to 0 so it looks like 100<>0. Test again. You can use the e key to raise the right side if that didn't help.

This can also be done in pavucontrol by lower the left or right channels on the Input Devices tab. If you don't see the 2 channels, click on the lock icon to expose them.
Today i tested my audio visa-versa, and the audio is still horrible. Tho i noticed that when i do pulseadio -k, the default settings are 5-100. Also, if i do 100-100, i can't hear my voice at all, but only the some strange noises.

User avatar
MrEen
Level 15
Level 15
Posts: 5904
Joined: Mon Jun 12, 2017 8:39 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Sun Oct 20, 2019 12:24 pm

Let's get a look at pacmd list-cards so I can see what options are available for each sound card.

Duck Freeman
Level 1
Level 1
Posts: 21
Joined: Wed Oct 16, 2019 3:43 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by Duck Freeman » Sun Oct 20, 2019 1:20 pm

MrEen wrote:
Sun Oct 20, 2019 12:24 pm
Let's get a look at pacmd list-cards so I can see what options are available for each sound card.
Here is the output: https://pastebin.com/nQMFmtLJ

User avatar
MrEen
Level 15
Level 15
Posts: 5904
Joined: Mon Jun 12, 2017 8:39 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Sun Oct 20, 2019 1:48 pm

The output looks good. I was hoping to see something that I never see, namely Analog Mono Input.

From looking around some, it appears it's usually the left channel that carries the sound. So make the settings = 100<>0 in alsamixer, or on the Input Devices tab of pavucontrol lower the right channel all the way.

Then test the mic using this method only: In the terminal run arecord -d 20 test-mic.wav and start speaking into the mic. After the 20 seconds is up, run aplay test-mic.wav

You could also Look in TS3's settings to see if the input can be set as Mono after running the above test.

Duck Freeman
Level 1
Level 1
Posts: 21
Joined: Wed Oct 16, 2019 3:43 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by Duck Freeman » Sun Oct 20, 2019 1:55 pm

MrEen wrote:
Sun Oct 20, 2019 1:48 pm
The output looks good. I was hoping to see something that I never see, namely Analog Mono Input.

From looking around some, it appears it's usually the left channel that carries the sound. So make the settings = 100<>0 in alsamixer, or on the Input Devices tab of pavucontrol lower the right channel all the way.

Then test the mic using this method only: In the terminal run arecord -d 20 test-mic.wav and start speaking into the mic. After the 20 seconds is up, run aplay test-mic.wav

You could also Look in TS3's settings to see if the input can be set as Mono after running the above test.
Still really bad audio, also no such options in any progs. i use :/

User avatar
MrEen
Level 15
Level 15
Posts: 5904
Joined: Mon Jun 12, 2017 8:39 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Sun Oct 20, 2019 1:57 pm

Just to be sure it's not a port issue, have you tried plugging the mic into the front of the computer?

Hopefully the Input Devices tab will automatically change from Hátsó mikrofon to Első mikrofon

Duck Freeman
Level 1
Level 1
Posts: 21
Joined: Wed Oct 16, 2019 3:43 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by Duck Freeman » Sun Oct 20, 2019 1:59 pm

MrEen wrote:
Sun Oct 20, 2019 1:57 pm
Just to be sure it's not a port issue, have you tried plugging the mic into the front of the computer?

Hopefully the Input Devices tab will automatically change from Hátsó mikrofon to Első mikrofon
I'm sure it's not a port issue as the audio quality is good when i'm booted from windows (and i use the same programs, like ts3..)

Shall i still try plugging it to the front port?


(on windows, i have the realtek driver installed, which also allows me to enable some functions like echo reduction, configuring my microphone...)

User avatar
MrEen
Level 15
Level 15
Posts: 5904
Joined: Mon Jun 12, 2017 8:39 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Sun Oct 20, 2019 2:01 pm

Yes please. There may be something messed up in the configuration for the port. I believe it's worth testing.

Duck Freeman
Level 1
Level 1
Posts: 21
Joined: Wed Oct 16, 2019 3:43 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by Duck Freeman » Sun Oct 20, 2019 2:27 pm

MrEen wrote:
Sun Oct 20, 2019 2:01 pm
Yes please. There may be something messed up in the configuration for the port. I believe it's worth testing.
after plugging it in on the front panel, there were absolute no audio, not even my voice with weird noises, just the noises. ( while if i plug it in on the rear panel, at least i can hear my own voice with a lot of strange noises.)

User avatar
MrEen
Level 15
Level 15
Posts: 5904
Joined: Mon Jun 12, 2017 8:39 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Mon Oct 21, 2019 7:20 am

I'm guessing you needed to adjust things in alsamixer/pavucontrol to get it the same. But I was hoping it might "just work" which it hasn't.

Maybe the sample rate is causing the issue. Try this:
arecord -f dat -r 48000 -D hw:0,0 -d 5 test.wav

Then aplay test.wav. Does that sound good?

Duck Freeman
Level 1
Level 1
Posts: 21
Joined: Wed Oct 16, 2019 3:43 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by Duck Freeman » Mon Oct 21, 2019 9:47 am

MrEen wrote:
Mon Oct 21, 2019 7:20 am
I'm guessing you needed to adjust things in alsamixer/pavucontrol to get it the same. But I was hoping it might "just work" which it hasn't.

Maybe the sample rate is causing the issue. Try this:
arecord -f dat -r 48000 -D hw:0,0 -d 5 test.wav

Then aplay test.wav. Does that sound good?
Still a lot of extra, weird noises but i think it improved a little bit? Just a tiny little bit.

(Are you really sure it's not about linux mint not having that realtek driver tho?)

User avatar
MrEen
Level 15
Level 15
Posts: 5904
Joined: Mon Jun 12, 2017 8:39 pm

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Mon Oct 21, 2019 3:43 pm

Duck Freeman wrote:
Mon Oct 21, 2019 9:47 am
(Are you really sure it's not about linux mint not having that realtek driver tho?)
Absolutely. The Realtek drivers are part of ALSA (inside the module snd-hda-intel) which has been part of the kernel since 2003. There is some co-operation from Realtek on this front on the kernel development team. i.e. There are people with @realtek e-mail addresses that work on the kernel.

You're using Realtek ALC 887, which you should see if you enter aplay -l in the terminal. Here's a list of "fixups" for that, and other similar codecs:

Code: Select all

ALC88x/898/1150/1220
====================
abit-aw9d
    Pin fixups for Abit AW9D-MAX
lenovo-y530
    Pin fixups for Lenovo Y530
acer-aspire-7736
    Fixup for Acer Aspire 7736
asus-w90v
    Pin fixup for ASUS W90V
cd
    Enable audio CD pin NID 0x1c
no-front-hp
    Disable front HP pin NID 0x1b
vaio-tt
    Pin fixup for VAIO TT
eee1601
    COEF setups for ASUS Eee 1601
alc882-eapd
    Change EAPD COEF mode on ALC882
alc883-eapd
    Change EAPD COEF mode on ALC883
gpio1
    Enable GPIO1
gpio2
    Enable GPIO2
gpio3
    Enable GPIO3
alc889-coef
    Setup ALC889 COEF
asus-w2jc
    Fixups for ASUS W2JC
acer-aspire-4930g
    Acer Aspire 4930G/5930G/6530G/6930G/7730G
acer-aspire-8930g
    Acer Aspire 8330G/6935G
acer-aspire
    Acer Aspire others
macpro-gpio
    GPIO setup for Mac Pro
dac-route
    Workaround for DAC routing on Acer Aspire
mbp-vref
    Vref setup for Macbook Pro
imac91-vref
    Vref setup for iMac 9,1
mba11-vref
    Vref setup for MacBook Air 1,1
mba21-vref
    Vref setup for MacBook Air 2,1
mp11-vref
    Vref setup for Mac Pro 1,1
mp41-vref
    Vref setup for Mac Pro 4,1
inv-dmic
    Inverted internal mic workaround
no-primary-hp
    VAIO Z/VGC-LN51JGB workaround (for fixed speaker DAC)
asus-bass
    Bass speaker setup for ASUS ET2700
dual-codecs
    ALC1220 dual codecs for Gaming mobos
clevo-p950
    Fixups for Clevo P950
I've looked through that list but didn't see anything I though might help you.
Duck Freeman wrote:
Mon Oct 21, 2019 9:47 am
Still a lot of extra, weird noises but i think it improved a little bit? Just a tiny little bit.
Well, maybe we're on the right track.

Here's something new I'd like you to try. Open 2 terminal windows. In the first, run this command again: arecord -d 20 test-mic.wav

While talking into the mic, run this in the second terminal window:

Code: Select all

curl https://gitlab.freedesktop.org/pulseaudio/pulseaudio/raw/master/src/utils/pa-info?inline=false | bash | nc termbin.com 9999
Then paste the termbin.com URL you'll see in the second window.

That'll give us quite a bit of info, and hopefully some of it may prove useful.

Post Reply

Return to “Hardware Support”