Re: White noise with audio over headphones

2022-06-16 Thread Alexandre Ratchov
On Thu, Jun 16, 2022 at 09:46:18AM -0500, Rob Whitlock wrote:
> On Wed, Jun 15, 2022 at 11:27 PM Alexandre Ratchov  wrote:
> 
> On Wed, Jun 15, 2022 at 02:59:40PM -0500, Rob Whitlock wrote:
> > I have a Lenovo T450 that plays audio over the speakers and headphones
> but
> > when the headphones are used there is some white noise playing all the
> time
> > as well as the audio. This white noise is not there with Windows 10 or
> > Linux. OpenBSD recognizes the audio codec as a Realtek ALC292 but Linux
> and
> > the spec sheet for my laptop say it's a Realtek ALC3232. I suspect this
> > might be causing the error but I'm not sure how to fix it. There was no
> > mention of an ALC3232 in /usr/src/sys/dev/pci/azalia_codec.c while there
> > was for ALC292.
> >
> 
> Hi,
> 
> Could you try:
> 
>   mixerctl inputs.mix2_source=dac-0:1
> 
> and check if noise level changes?
> 
> 
> That did the trick. Thanks! What made you think of this suggestion?

from mixerctl output:

outputs.hp_source=mix2
inputs.mix2_source=dac-0:1,mix  { dac-0:1 mix }
inputs.mix_source=spkr3,mic2,beep  { spkr3 mic2 beep }

The signal for "hp" (the headphones) seems to be the mix of the DAC
(what plays audio samples) and the "mix" node. The "mix" node is the
mix of spkr3, mic2, beep

My guess was that one of the sources is not properly wired or
configured and generates noise.

Removing "mix" from the headphone sources, removes the possible source
of noise (one of spkr3, mic2, and beep)



Re: White noise with audio over headphones

2022-06-16 Thread Rob Whitlock
On Wed, Jun 15, 2022 at 11:27 PM Alexandre Ratchov  wrote:

> On Wed, Jun 15, 2022 at 02:59:40PM -0500, Rob Whitlock wrote:
> > I have a Lenovo T450 that plays audio over the speakers and headphones
> but
> > when the headphones are used there is some white noise playing all the
> time
> > as well as the audio. This white noise is not there with Windows 10 or
> > Linux. OpenBSD recognizes the audio codec as a Realtek ALC292 but Linux
> and
> > the spec sheet for my laptop say it's a Realtek ALC3232. I suspect this
> > might be causing the error but I'm not sure how to fix it. There was no
> > mention of an ALC3232 in /usr/src/sys/dev/pci/azalia_codec.c while there
> > was for ALC292.
> >
>
> Hi,
>
> Could you try:
>
> mixerctl inputs.mix2_source=dac-0:1
>
> and check if noise level changes?
>

That did the trick. Thanks! What made you think of this suggestion?


Re: White noise with audio over headphones

2022-06-15 Thread Alexandre Ratchov
On Wed, Jun 15, 2022 at 02:59:40PM -0500, Rob Whitlock wrote:
> I have a Lenovo T450 that plays audio over the speakers and headphones but
> when the headphones are used there is some white noise playing all the time
> as well as the audio. This white noise is not there with Windows 10 or
> Linux. OpenBSD recognizes the audio codec as a Realtek ALC292 but Linux and
> the spec sheet for my laptop say it's a Realtek ALC3232. I suspect this
> might be causing the error but I'm not sure how to fix it. There was no
> mention of an ALC3232 in /usr/src/sys/dev/pci/azalia_codec.c while there
> was for ALC292.
> 

Hi,

Could you try:

mixerctl inputs.mix2_source=dac-0:1

and check if noise level changes?



White noise with audio over headphones

2022-06-15 Thread Rob Whitlock
I have a Lenovo T450 that plays audio over the speakers and headphones but
when the headphones are used there is some white noise playing all the time
as well as the audio. This white noise is not there with Windows 10 or
Linux. OpenBSD recognizes the audio codec as a Realtek ALC292 but Linux and
the spec sheet for my laptop say it's a Realtek ALC3232. I suspect this
might be causing the error but I'm not sure how to fix it. There was no
mention of an ALC3232 in /usr/src/sys/dev/pci/azalia_codec.c while there
was for ALC292.

I am running a snapshot that is a few days old.

Here is the output of mixerctl -av when the headphones are plugged in:

inputs.dac-0:1=126,126
inputs.dac-2:3=126,126
record.adc-2:3_mute=off  [ off on ]
record.adc-2:3=124,124
record.adc-0:1_mute=off  [ off on ]
record.adc-0:1=124,124
inputs.mix_source=spkr3,mic2,beep  { spkr3 mic2 beep }
inputs.mix_spkr3=120,120
inputs.mix_mic2=120,120
inputs.mix_beep=120,120
inputs.mix2_source=dac-0:1,mix  { dac-0:1 mix }
inputs.mix3_source=dac-2:3,mix  { dac-2:3 mix }
inputs.mix4_source=dac-0:1,dac-2:3  { dac-0:1 dac-2:3 }
inputs.mic=85,85
outputs.spkr_source=mix3  [ mix2 mix3 ]
outputs.spkr_mute=on  [ off on ]
outputs.spkr_eapd=on  [ off on ]
outputs.hp_source=mix2  [ mix2 mix3 ]
outputs.hp_mute=off  [ off on ]
outputs.hp_boost=off  [ off on ]
outputs.hp_eapd=on  [ off on ]
outputs.spkr2_source=mix2  [ mix2 mix3 ]
outputs.spkr2_mute=off  [ off on ]
outputs.spkr2_boost=off  [ off on ]
outputs.spkr2_eapd=on  [ off on ]
inputs.spkr3=85,85
inputs.mic2=85,85
outputs.mic2_dir=input-vr80  [ none input input-vr0 input-vr50 input-vr80
input-vr100 ]
record.adc-0:1_source=mic  [ spkr3 mic2 beep mix mic ]
record.adc-2:3_source=spkr3  [ spkr3 mic2 beep mix ]
outputs.hp_sense=plugged  [ unplugged plugged ]
outputs.mic2_sense=plugged  [ unplugged plugged ]
outputs.spkr_muters=hp  { hp }
outputs.master=126,126
outputs.master.mute=off  [ off on ]
outputs.master.slaves=dac-0:1,dac-2:3,spkr,hp,spkr2  { dac-0:1 dac-2:3 spkr
hp spkr2 }
record.volume=124,124
record.volume.mute=off  [ off on ]
record.volume.slaves=adc-2:3,adc-0:1  { adc-2:3 adc-0:1 mic spkr3 mic2 }
record.enable=sysctl  [ off on sysctl ]

Here is the dmesg:

OpenBSD 7.1-current (GENERIC.MP) #580: Mon Jun 13 10:13:31 MDT 2022
dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8441913344 (8050MB)
avail mem = 8168697856 (7790MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xccbfd000 (66 entries)
bios0: vendor LENOVO version "JBET73WW (1.37 )" date 08/14/2019
bios0: LENOVO 20BU000EUS
acpi0 at bios0: ACPI 5.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SLIC ASF! HPET ECDT APIC MCFG SSDT SSDT SSDT SSDT
SSDT SSDT SSDT SSDT SSDT PCCT SSDT TCPA SSDT UEFI MSDM BATB FPDT UEFI DMAR
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpihpet0 at acpi0: 14318179 Hz
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee0: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz, 2195.27 MHz, 06-3d-04
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz, 2194.93 MHz, 06-3d-04
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,TSC_ADJUST,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,RDSEED,ADX,SMAP,PT,SRBDS_CTRL,MD_CLEAR,IBRS,IBPB,STIBP,L1DF,SSBD,SENSOR,ARAT,XSAVEOPT,MELTDOWN
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-5300U CPU @ 2.30GHz, 2194.93 MHz, 06-3d-04
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,3DNOWP