You are not logged in.

#1 2023-04-09 18:39:10

DaveBullet
Member
Registered: 2023-03-14
Posts: 9

[SOLVED] Crackle and pop commencing play

I have a Dell Optiplex 3050 micro Core i3 with built in Intel PCH/Realtek ALC3234 (I think) audio.

When playing into the 3.5mm headset/mic input jack (on the front panel) from my laptop 3.5mm audio out, I get a crackle/pop on commencing play (e.g. from Foobar) and then a thump about 3 seconds after I stop the song (or it ends).

If I restart the song or resume, within the 3 seconds of pausing / stopping - no crackle or thump. It's as if the card is deactivating.

I already have a /etc/modprobe.conf file to turn power_save and powerconfirmed power management is turned off as per the following:

[root@arch-pc-debug modprobe.d]# cat /etc/modprobe.d/snd_hda_intel.conf

options snd_hda_intel power_save=0
options snd_hda_intel power_save_controller=N

And confirmed:

[root@arch-pc-debug ~]# cat /sys/module/snd_hda_intel/parameters/power_save
0
[root@arch-pc-debug ~]# cat /sys/module/snd_hda_intel/parameters/power_save_controller
N

I have also tried creating a dsnoop alsa device and continuously recorded to it (in the hope of keeping the hardware alive incase there is some sort of turning off) but the problem remains, eg:

[root@arch-pc-debug modprobe.d]# arecord -D asnoop -f cd /dev/zero
Recording WAVE '/dev/zero' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

/etc/asound.conf

(snip - dsnoop device)

pcm.asnoop {
  type dsnoop
  ipc_key 219347
  hw_ptr_alignment "roundup"
  slave {
    pcm "hw:CARD=PCH"
    format S16_LE
    rate 44100
  }
}

I tried a plug in USB5.1 soundcard - using its audio input (line in) and there are no playback start click/pop then thump like the onboard Dell card.  So I know it's not the source (my laptop soundcard / foobar playback chain) - nor the output (whether onboard dell speaker, or my DM7).

I only get the song start click when the onboard PCH mic/line in jack is used

In summary these combinations are good:
Laptop (foobar) -> 3.5mm line out -> (optiplex attached) USB 5.1 (line in) -> Camilla-DSP -> Optiplex onboard speaker (PCH device)
Laptop (foobar) -> 3.5mm line out -> (optiplex attached) USB 5.1 (line in) -> Camilla-DSP -> (external USB attached) DM7 -> amp/speakers

This combination has the playback start crackle/pop
Laptop (foobar) -> 3.5mm line out -> (optiplex in built) PCH (headset/mix in) -> Camilla-DSP -> Optiplex onboard speaker (PCH device)

Additional dumps if useful:

[root@arch-pc-debug modprobe.d]# uname -ar
Linux arch-pc-debug 6.2.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 30 Mar 2023 14:51:14 +0000 x86_64 GNU/Linux
lspci -nn -v

(snip)

00:1f.3 Audio device [0403]: Intel Corporation 200 Series PCH HD Audio [8086:a2f0]
        Subsystem: Dell Device [1028:07a3]
        Flags: bus master, fast devsel, latency 32, IRQ 134
        Memory at f7220000 (64-bit, non-prefetchable) [size=16K]
        Memory at f7200000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [50] Power Management version 3
        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel, snd_soc_avs
dmesg | grep snd

(snip)

[ 2102.807192] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 2102.861813] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC3234: line_outs=1 (0x1b/0x0/0x0/0x0/0x0) type:line
[ 2102.861819] snd_hda_codec_realtek hdaudioC1D0:    speaker_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 2102.861822] snd_hda_codec_realtek hdaudioC1D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[ 2102.861825] snd_hda_codec_realtek hdaudioC1D0:    mono: mono_out=0x0
[ 2102.861826] snd_hda_codec_realtek hdaudioC1D0:    inputs:
[ 2102.861828] snd_hda_codec_realtek hdaudioC1D0:      Headset Mic=0x19
[ 2102.861830] snd_hda_codec_realtek hdaudioC1D0:      Headphone Mic=0x1a
[root@arch-pc-debug modprobe.d]# lsmod | sort
ac97_bus               16384  1 snd_soc_core
acpi_pad               24576  0
aesni_intel           401408  6
bpf_preload            24576  0
ccm                    20480  9
cec                    86016  2 drm_display_helper,i915
cfg80211             1277952  3 rtlwifi,mac80211,rtl8xxxu
coretemp               20480  0
crc16                  16384  1 ext4
crc32c_generic         16384  0
crc32c_intel           24576  4
crc32_pclmul           16384  0
crct10dif_pclmul       16384  1
cryptd                 32768  2 crypto_simd,ghash_clmulni_intel
crypto_simd            16384  1 aesni_intel
dcdbas                 24576  1 dell_smbios
dell_smbios            32768  1 dell_wmi
dell_wmi               32768  0
dell_wmi_descriptor    20480  2 dell_wmi,dell_smbios
dm_mod                225280  0
drm_buddy              20480  1 i915
drm_display_helper    208896  1 i915
ee1004                 20480  0
ext4                 1163264  2
fat                   102400  1 vfat
fuse                  204800  1
gf128mul               16384  1 polyval_generic
ghash_clmulni_intel    16384  0
i2c_i801               45056  0
i2c_smbus              20480  1 i2c_i801
i915                 3788800  2
intel_cstate           24576  0
intel_gtt              28672  1 i915
intel_pmc_bxt          16384  1 iTCO_wdt
intel_powerclamp       20480  0
intel_rapl_common      36864  1 intel_rapl_msr
intel_rapl_msr         20480  0
intel_tcc_cooling      16384  0
intel_uncore          258048  0
ip_tables              40960  0
irqbypass              16384  1 kvm
iTCO_vendor_support    16384  1 iTCO_wdt
iTCO_wdt               16384  0
jbd2                  217088  1 ext4
kvm                  1323008  1 kvm_intel
kvm_intel             446464  0
ledtrig_audio          16384  3 snd_ctl_led,snd_hda_codec_generic,dell_wmi
libarc4                16384  1 mac80211
libphy                192512  3 r8169,mdio_devres,realtek
loop                   40960  0
mac80211             1490944  4 rtl_usb,rtl8192cu,rtlwifi,rtl8xxxu
mac_hid                16384  0
mbcache                16384  1 ext4
mc                     81920  1 snd_usb_audio
mdio_devres            16384  1 r8169
mei                   192512  7 mei_wdt,mei_hdcp,mei_pxp,mei_me
mei_hdcp               28672  0
mei_me                 61440  3
mei_pxp                20480  0
mei_wdt                16384  0
Module                  Size  Used by
nvme                   69632  3
nvme_common            24576  1 nvme_core
nvme_core             237568  4 nvme
pcspkr                 16384  0
polyval_clmulni        16384  0
polyval_generic        16384  1 polyval_clmulni
r8169                 114688  0
rapl                   20480  0
realtek                40960  0
rfkill                 40960  4 rtlwifi,cfg80211
rtl8192c_common        81920  1 rtl8192cu
rtl8192cu             110592  0
rtl8xxxu              208896  0
rtl_usb                28672  1 rtl8192cu
rtlwifi               155648  3 rtl8192c_common,rtl_usb,rtl8192cu
sha512_ssse3           57344  0
snd                   151552  16 snd_ctl_led,snd_hda_codec_generic,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_usb_audio,snd_usbmidi_lib,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_aloop,snd_pcm,snd_rawmidi
snd_aloop              40960  0
snd_compress           32768  2 snd_soc_avs,snd_soc_core
snd_ctl_led            24576  0
snd_hda_codec         217088  6 snd_hda_codec_generic,snd_soc_avs,snd_hda_codec_hdmi,snd_soc_hda_codec,snd_hda_intel,snd_hda_codec_realtek
snd_hda_codec_generic   110592  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     94208  1
snd_hda_codec_realtek   196608  1
snd_hda_core          139264  8 snd_hda_codec_generic,snd_soc_avs,snd_hda_codec_hdmi,snd_soc_hda_codec,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek
snd_hda_ext_core       36864  2 snd_soc_avs,snd_soc_hda_codec
snd_hda_intel          65536  0
snd_hwdep              20480  2 snd_usb_audio,snd_hda_codec
snd_intel_dspcfg       36864  2 snd_soc_avs,snd_hda_intel
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
snd_pcm               200704  10 snd_soc_avs,snd_hda_codec_hdmi,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_compress,snd_soc_core,snd_aloop,snd_hda_core,snd_pcm_dmaengine
snd_pcm_dmaengine      20480  1 snd_soc_core
snd_rawmidi            53248  1 snd_usbmidi_lib
snd_seq_device         16384  1 snd_rawmidi
snd_soc_avs           217088  0
snd_soc_core          434176  2 snd_soc_avs,snd_soc_hda_codec
snd_soc_hda_codec      28672  1 snd_soc_avs
snd_timer              53248  2 snd_aloop,snd_pcm
snd_usb_audio         442368  0
snd_usbmidi_lib        53248  1 snd_usb_audio
soundcore              16384  2 snd_ctl_led,snd
sparse_keymap          16384  1 dell_wmi
ttm                   102400  1 i915
uas                    36864  0
usbhid                 81920  0
usb_storage            86016  1 uas
vfat                   24576  1
video                  73728  2 dell_wmi,i915
wmi                    45056  5 video,dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor
wmi_bmof               16384  0
x86_pkg_temp_thermal    20480  0
xhci_pci               24576  0
xhci_pci_renesas       24576  1 xhci_pci
x_tables               61440  1 ip_tables

in the following, the DM7 is an 8 channel DAC going to be used to support an active speaker crossover.  It will be fed with Camilla-DSP, sourcing from the snd_aloop device (also loaded).

The USB 5.1 sound card is purely there for test purposes (doesn't impact the problem with, or without it connected).



[root@arch-pc-debug ~]# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: DM7 [DM7], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC3234 Analog [ALC3234 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: ICUSBAUDIO7D [ICUSBAUDIO7D], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 3: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
[root@arch-pc-debug ~]# arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: PCH [HDA Intel PCH], device 0: ALC3234 Analog [ALC3234 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 2: ALC3234 Alt Analog [ALC3234 Alt Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: ICUSBAUDIO7D [ICUSBAUDIO7D], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 3: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 3: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

Last edited by DaveBullet (2023-04-13 19:48:06)

Offline

#2 2023-04-13 19:47:14

DaveBullet
Member
Registered: 2023-03-14
Posts: 9

Re: [SOLVED] Crackle and pop commencing play

Ok - dumb me.  It is my stupid Windows 10 source laptop with very aggressive power management settings.

I had just blamed my fresh Linux install and poor configuration skills.  not a problem at all big_smile

Although not sticky between reboots, and for the benefit of others, the Realtek chipset required these binary keys to be set to 4 zeroes:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}\0001\PowerSettings

ConservationIdleTime
IdlePowerState
PerformanceIdleTime

This changes power management from S3 to D0 (disable).

Now to find out how to make it sticky.

Offline

Board footer

Powered by FluxBB