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 » Mon Oct 21, 2019 3:54 pm

MrEen wrote:
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.
Here's the URL from the second window: https://termbin.com/uiiy

Btw, when i ran the command aplay -l, it showed me ALC 887-VD. Does that matters?

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

Re: Realtek soundcard - Bad quality/possible driver issue

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

Duck Freeman wrote:
Mon Oct 21, 2019 3:54 pm

Here's the URL from the second window: https://termbin.com/uiiy

Btw, when i ran the command aplay -l, it showed me ALC 887-VD. Does that matters?
It'll be a while before I can absorb the info from that. I'll let you know if I find something that I think will help.

the -VD does NOT matter, but thanks for mentioning it.

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

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Mon Oct 21, 2019 4:58 pm

Some things I've spotted:

Code: Select all

Source Output #19
	Driver: protocol-native.c
	Owner Module: 13
	Client: 336
	Source: 3
	Sample Specification: u8 1ch 8000Hz
	Channel Map: mono
	Format: pcm, format.sample_format = "\"u8\""  format.rate = "8000"  format.channels = "1"  format.channel_map = "\"mono\""
	Corked: no
	Mute: no
	Volume: mono: 65536 / 100% / 0.00 dB
	        balance 0.00
	Buffer Latency: 0 usec
	Source Latency: 22 usec
	Resample method: speex-float-1
	Properties:
		media.name = "ALSA Capture"
		application.name = "ALSA plug-in [aplay]"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "32"
		application.process.id = "18701"
		application.process.user = "duck_freeman"
		application.process.host = "DuckFreeman-PC"
		application.process.binary = "aplay"
		application.language = "hu_HU.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "ef635a010d284bc38d762d2b9f0e65ac"
		application.process.session_id = "c2"
		module-stream-restore.id = "source-output-by-application-name:ALSA plug-in [aplay]"
I still need to research this one, as the script is new to me, but that 8000Hz may be the source of your trouble.

Next:

Code: Select all

Node 0x18 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Center Playback Switch", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="LFE Playback Switch", index=0, device=0
    ControlAmp: chs=2, dir=Out, idx=0, ofs=0
  Control: name="Rear Mic Boost Volume", index=0, device=0
    ControlAmp: chs=3, dir=In, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals:  [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x00 0x00]
  Pincap 0x00003736: IN OUT Detect Trigger
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x01a19040: [Jack] Mic at Ext Rear
    Conn = 1/8, Color = Pink
    DefAssociation = 0x4, Sequence = 0x0
  Pin-ctls: 0x21: IN VREF_50
  Unsolicited: tag=03, enabled=1
  Power states:  D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 5
     0x0c* 0x0d 0x0e 0x0f 0x26
It seems odd, but may be okay, that your Rear Mic port is also the switching port for Center and LFE playback.

Next:

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] [on]
  Front Right: Playback 0 [0%] [-34.50dB] [on]
Volume is at 0%. I'm guessing if you increase it, you might hear your voice, but will also have the other "noises" louder as well.
Next is the Camera Mic. I was really hoping to see this on, which might have been the cause for your troubles, but it's showing Off:

Code: Select all

Simple mixer control 'Mic',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 15
  Mono: Capture 3 [20%] [17.00dB] [off]
I was also hoping Loopback Mixing was enabled, but it's not.

Give me some time, hopefully still tonight (it's 5PM here) to digest this some more. I'm trying to decide what to try next.

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

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Mon Oct 21, 2019 8:42 pm

That first output I mentioned is still a mystery to me, but I had another thought based on the things I saw.

In alsamixer use the q and c buttons on the Rear Mic (be aware there is also Rear Mic Boost) so the numbers at the bottom are 100<>0. Next go to the Center and LFE columns and drop them to 0 with the down arrow, and press m to mute them as well. Now press F4 and use the q and c button to get the Capture column (not Capture 1) to also show 100<>0.

Now run both tests we've tried recently: arecord -d 20 test-mic.wav followed by aplay test-mic.wav, then arecord -f dat -r 48000 -D hw:0,0 -d 5 test.wav followed by aplay test.wav

Either of those sounding decent?

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

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Mon Oct 21, 2019 9:26 pm

After trying that, I have something new worth attempting.

In the terminal enter xed admin:///etc/modprobe.d/alsa-base.conf and when the file opens, scroll to the bottom and add this new line:

Code: Select all

options snd-hda-intel position_fix=3
Then save and close the file, ignore the warnings from the terminal, then run sudo alsa force-reload and test the mic any way you like.

I got that idea from this bug report (caution, it's HUUUGE) with the same issue, though different chipset.

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 » Tue Oct 22, 2019 4:33 pm

MrEen wrote:
Mon Oct 21, 2019 9:26 pm
After trying that, I have something new worth attempting.

In the terminal enter xed admin:///etc/modprobe.d/alsa-base.conf and when the file opens, scroll to the bottom and add this new line:

Code: Select all

options snd-hda-intel position_fix=3
Then save and close the file, ignore the warnings from the terminal, then run sudo alsa force-reload and test the mic any way you like.

I got that idea from this bug report (caution, it's HUUUGE) with the same issue, though different chipset.
The quality got worse than ever before.

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

Re: Realtek soundcard - Bad quality/possible driver issue

Post by MrEen » Tue Oct 22, 2019 8:28 pm

Damn. I was slightly hopeful that might help. Obviously if haven't already go back and remove the line.

I'm low on ideas right now. I would suggest you trying playing with the settings in the app(s) and if you get it sounding good, try running sudo alsactl store. Then if it goes bad again, run sudo alsactl restore to see if puts it back to good sounding.

Post Reply

Return to “Hardware Support”