You are not logged in.

#1 2014-05-20 09:16:05

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

[SOLVED] Audio playing bad except with high CPU load

I recently switched to a new motherboard: Asus Z97-Deluxe
This motherboard has a ALC1150 audio chip, which uses the snd_hda_intel driver.

CPU: Intel i5-4670K
Kernel: 3.14.4-1-ARCH #1
alsa-info: https://drive.google.com/file/d/0Bymxsc … sp=sharing

Audio is playing bad: 'radio noise', skipping, repeating. It is unusable.
Before I used pulseaudio, but to diagnose this problem I have removed it.
Now with alsa left, it plays a little bit better, but the problem is still there.

The only moment when the audio works great is when the CPU is busy, such as compiling a Linux kernel.
Sometimes moving the mouse has a positive impact too.

My gut feeling tells me the cause might be the BIOS, the driver, power management or CPU scheduler.
Since I have been searching for about a day on the Internet and trying most of the offered obvious solutions, I am now searching for active help. big_smile

Any suggestions how to approach this audio issue?

Last edited by ArthurBorsboom (2014-05-23 12:03:38)

Offline

#2 2014-05-20 11:36:01

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Audio playing bad except with high CPU load

Try different module options for snd-hda-intel, especially enable_msi.

Offline

#3 2014-05-20 13:10:47

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

Hi emeres,

I tried the following options in pairs of two (underscore and dash), but unfortunately it seems that these options don't have any influence.

options snd_hda_intel enable_msi=1
options snd-hda-intel enable_msi=1

options snd_hda_intel bdl_pos_adj=-1
options snd-hda-intel bdl_pos_adj=-1

options snd_hda_intel bdl_pos_adj=1,48
options snd-hda-intel bdl_pos_adj=1,48

options snd_hda_intel bdl_pos_adj=-1,64
options snd-hda-intel bdl_pos_adj=-1,64

options snd_hda_intel power_save=0
options snd-hda-intel power_save=0

I do get a warning in dmesg, which I can't resolve by using the above options.

hda-intel: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.

Since the options above don't seem to have *any* effect, maybe the options are not being read at all.
I am writing these options in in /etc/modprobe.d/alsa-base.conf

Is there a way to verify if these module options are actually being loaded and used?

Offline

#4 2014-05-20 13:19:34

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

The answer to my last question is:

systool -v -m snd_hda_intel

And I can confirm that the options are being loaded into the modules variables.
So, apparently the above options don't solve the problem.

Do you have other suggestions?

Offline

#5 2014-05-20 13:28:44

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Audio playing bad except with high CPU load

Underscore or hyphen usually do not matter, since they get converted anyway, but writing a hyphen is quicker and less error prone on most keyboard layouts, therefore recommended.
I was thinking about:

options snd-hda-intel enable_msi=0

Yes, it should be 0 by default, but I remember a case where it did help. Rebooting instead of simply reloading the modules might be necessary.

Edit: Sorry, I am between posts. You already posted alsa-info.

Last edited by emeres (2014-05-20 13:43:33)

Offline

#6 2014-05-20 13:39:38

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

The option "options snd-hda-intel enable_msi=0" does not seem to have any effect.
For each change in alsa-base.conf, I have rebooted the machine.
There are no other sound cards in the system.

aplay -lL

null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default:CARD=Intel
    HDA Intel, ALC1150 Analog
    Default Audio Device
sysdefault:CARD=Intel
    HDA Intel, ALC1150 Analog
    Default Audio Device
front:CARD=Intel,DEV=0
    HDA Intel, ALC1150 Analog
    Front speakers
surround40:CARD=Intel,DEV=0
    HDA Intel, ALC1150 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
    HDA Intel, ALC1150 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
    HDA Intel, ALC1150 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
    HDA Intel, ALC1150 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
    HDA Intel, ALC1150 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=Intel,DEV=0
    HDA Intel, ALC1150 Digital
    HDMI Audio Output
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC1150 Analog [ALC1150 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 3: ALC1150 Digital [ALC1150 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

lspci -nn | grep -i audio

00:1b.0 Audio device [0403]: Intel Corporation Device [8086:8ca0]

amixer

Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 60 [69%] [-20.25dB] [on]
Simple mixer control 'Headphone',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 50 [57%] [-27.75dB] [off]
  Front Right: Playback 50 [57%] [-27.75dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 255
  Mono:
  Front Left: Playback 170 [67%] [-17.00dB]
  Front Right: Playback 170 [67%] [-17.00dB]
Simple mixer control 'Front',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Front 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]
Simple mixer control 'Front Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 3 [100%] [30.00dB]
  Front Right: 3 [100%] [30.00dB]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 86 [99%] [-0.75dB] [on]
  Front Right: Playback 86 [99%] [-0.75dB] [on]
Simple mixer control 'Center',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'LFE',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Side',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [on]
  Front Right: Playback 87 [100%] [0.00dB] [on]
Simple mixer control 'Line',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]
Simple mixer control 'Line Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'IEC958 Default PCM',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Beep',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]
Simple mixer control 'Capture',0
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 63 [100%] [30.00dB] [on]
  Front Right: Capture 63 [100%] [30.00dB] [on]
Simple mixer control 'Capture',1
  Capabilities: cvolume cswitch
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 63
  Front Left: Capture 0 [0%] [-17.25dB] [off]
  Front Right: Capture 0 [0%] [-17.25dB] [off]
Simple mixer control 'Auto-Mute Mode',0
  Capabilities: enum
  Items: 'Disabled' 'Enabled'
  Item0: 'Enabled'
Simple mixer control 'Digital',0
  Capabilities: cvolume
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 120
  Front Left: Capture 60 [50%] [0.00dB]
  Front Right: Capture 60 [50%] [0.00dB]
Simple mixer control 'Input Source',0
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Line'
Simple mixer control 'Input Source',1
  Capabilities: cenum
  Items: 'Front Mic' 'Rear Mic' 'Line'
  Item0: 'Front Mic'
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]
Simple mixer control 'Rear Mic Boost',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 3
  Front Left: 0 [0%] [0.00dB]
  Front Right: 0 [0%] [0.00dB]

Offline

#7 2014-05-20 13:51:26

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Audio playing bad except with high CPU load

I assume there is no change in those anomalies if you change the mixer settings (volume, gain for inputs) during their occurrence, right? Are there any options for your sound card besides disabling it in BIOS? Do you hear increased noise when hdds are under heavy load?

Last edited by emeres (2014-05-20 13:53:27)

Offline

#8 2014-05-20 14:02:32

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

Changing the volumes / gains don't have any influence except for the volume.
There are three options in the BIOS, none of them have an effect on the audio(quality).

HD Audio controller [Enable / Disable]
Front panel type [HD / AC97]
SPDIF out type [SPDIF / HDMI]

I have a SSD in this system.
Keeping the disk busy does have a little influence, since the music stutters a little bit less.
Also when I move the mouse heavily it seem to have the same effect.
Also when I compile the Linux kernel, the music is fluent. No cracks, pops, skipping, radio noise; just good.

CPU load? Interrupts? CPU governor?

Offline

#9 2014-05-20 14:49:29

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Audio playing bad except with high CPU load

ArthurBorsboom wrote:

I have a SSD in this system.

Ah, so even less interference.

ArthurBorsboom wrote:

Keeping the disk busy does have a little influence, since the music stutters a little bit less.
Also when I move the mouse heavily it seem to have the same effect.
Also when I compile the Linux kernel, the music is fluent. No cracks, pops, skipping, radio noise; just good.

CPU load? Interrupts? CPU governor?

Well then, change them and see what happens. They should not interfere with your sound hardware however, so I hope that changing the cpu governor or maybe the scheduler is a fix, but I doubt it.
I think this is more related to the driver for your sound card. Support for ALC1150 was added some time ago, maybe it needs some patches for your specific hardware. I am unable to find anything useful about that vendor and product id combination, only this French post about the same basic model of mainboard (a Z97A), but with an ALC892.
I doubt that changing the model for the module from those available would change anything. You could try a live medium like linux mint and see if this occurs there also. If it does not, look through all the configuration and logs. And if that does not help, alsa-user mailing list is your best option.

Offline

#10 2014-05-20 18:56:27

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: [SOLVED] Audio playing bad except with high CPU load

interrupt related
http://ubuntuforums.org/showthread.php? … st12109016

Last edited by kokoko3k (2014-05-20 18:57:08)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#11 2014-05-20 21:43:51

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

@kokoko3k: the addition of the kernel parameter did not help.

GRUB_CMDLINE_LINUX_DEFAULT="processor.max_cstate=2"

@emeres: I am in the process of downloading the latest Linux Mint. I will give you feedback soon.

Offline

#12 2014-05-20 22:38:53

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

Linux Mint 16 x64 - LiveDVD has the same issue.
I used a different browser and different music player from the LiveDVD.

I guess I will aim my focus at the alsa-user mailing list as you suggested.
Thanks!

Offline

#13 2014-05-21 11:58:47

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: [SOLVED] Audio playing bad except with high CPU load

Are you sure you booted with that option active?
Please, try again and post the content of /proc/cmdline

Excuse me if i ask you that, but when the cpu is under load, it prevents the cpu to go into deeper sleep states, so forcing it to NOT go there even if the cpu is under load, makes sense.

Last edited by kokoko3k (2014-05-21 12:03:34)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#14 2014-05-21 12:35:13

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

Hi kokoko,

No problem for asking to retry. Sometimes we all stare ourselves blind at all the things we try.
Nevertheless, it didn't help. smile Here is the content of /proc/cmdline

BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=826c10be-0ecf-4963-b327-351cbbdb104b rw processor.max_cstate=2

Do you have other suggestions?

Offline

#15 2014-05-21 14:34:02

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,390

Re: [SOLVED] Audio playing bad except with high CPU load

Mmh, further readings revealed me that processor.max_cstate may be ineffective on newer intel processors, since the idle driver has been replaced by intel_idle
From what i understood, you have multiple options to try:

1- disable intel idle driver by passing: "intel_idle.max_cstate=0" to the kernel (a bit counterintuitive...)
That way, intel_idle is disabled and acpi idle driver will be used instead; that may fix your audio issue.

GRUB_CMDLINE_LINUX_DEFAULT="intel_idle.max_cstate=0"

2- disable intel idle AND force an higher c-state through the acpi idle driver:

GRUB_CMDLINE_LINUX_DEFAULT="intel_idle.max_cstate=0 processor.max_cstate=2"

3- Continue to use the intel idle driver by forcing an higher cstate

GRUB_CMDLINE_LINUX_DEFAULT="intel_idle.max_cstate=2"

Good luck smile

Last edited by kokoko3k (2014-05-21 14:34:55)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#16 2014-05-21 15:01:48

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

I tried all three options separately with a reboot each and I verified the /proc/cmdline (just to be sure). It did not had any positive effect.

In the mean time, I did find another person who has posted a similar question on the ALSA mailing list.

http://sourceforge.net/p/alsa/mailman/message/32362885/
http://sourceforge.net/p/alsa/mailman/message/32363222/ (My own post)

My guess is that this person also has the combination of the new Intel H97/Z97 chipset and the ALC1150.

Offline

#17 2014-05-21 15:41:16

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Audio playing bad except with high CPU load

Looking at patch_realtek.c reveals that ALC1150 uses the patchset for ALC882. You could try getting data/setting option directly from/to the codec using hda-verb, I doubt hdajackretask would show anything interesting. Its datasheet should be helpful with that. Sometimes "features" get in the way. The ALC1150 has several signal modifying software features (AEC, BF, NS), probably not used/available in linux though. I only skimmed through the datasheet: I would check/get some information on the features I mentioned (although there seem no further reference to them), look at the software selectable reference voltage, check product/revision id, power states and all gains.
There is an introduction to hda-verb in HDA documentation.

By the way does the same happen with the front panel jacks?

If you make any progress elsewhere, please get back to us.

Offline

#18 2014-05-21 18:12:49

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

Unfortunately I can't get the front panel jacks working, due to a missing cable.
The information hdajackretask shows, seems to be in line with the datasheet.

I think I lack to much knowledge to dive into hda-verb, so I am looking for help on the ALSA mailinglists (alsa-user and alsa-devel).
If I have any interesting information from there I will report back.

Thanks for the help.

Offline

#19 2014-05-21 18:51:42

HardcoreWR
Member
Registered: 2014-05-21
Posts: 4

Re: [SOLVED] Audio playing bad except with high CPU load

I registered today just to let you know that we're on the same boat, unfortunately.
The only difference is that my motherboard is an Asrock Z97E-ITX holding the i3 4360 .. oh and I'm running Ubuntu smile
Kernel 3.13.0-24-generic

So far I haven't had any luck either in fixing my sound problem.

Last edited by HardcoreWR (2014-05-21 19:04:55)

Offline

#20 2014-05-21 19:13:18

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

Okay, thanks for reporting this.

Within 1 day I have found 3 people reporting to have sound issues with the ALC1150 combined with the Intel H97/Z97 chipset and Linux.
Let's see what comes out of the ALSA mailing lists...

Offline

#21 2014-05-21 21:47:24

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Audio playing bad except with high CPU load

Just for the record, I suggested using hda-verb also to compare what the codec file in /proc/asound/card#/codec# holds and what codec outputs directly (and trying out find other settings I mentioned). If there were mismatches, that would semi confirm a faulty/incomplete driver/patches. I myself have an ALC892 codec and after a brief comparison they both do use the same verbs, to the extent that I checked at least, mine has a little bit more capabilities though, so I could confirm these commands.

Here some examples how to use hda-verb:

#sudo hda-verb HARDWARE_DEVICE NODE VERB PARAMETER 
# IDs according to datasheet
# Used on the first sound card, first device (hwC0D0)
# To get vendor and device id (Realteks terminology)
sudo hda-verb /dev/snd/hwC0D0 0x0 0xf00 0x0
#or
sudo hda-verb /dev/snd/hwC0D0 0x0 0xf00 VENDOR_ID
# should return in your case
0x10ec0900
# and it does according to your alsa-info codec part
# To get the revision id use
sudo hda-verb /dev/snd/hwC0D0 0x0 0xf00 REV_ID
# according to your alsa-info should output
0x100001
# and so on

Other examples for another ALC codec. But I guess this is a dead end.

Either there is an issue with the codec [driver and/or settings], the Intel chipset has some problems with that particular codec (I could not find anything else related to H97/Z97, but I did look intensively either) or this is a hardware issue, because of unfortunate pcb/components layout or for whatever reason, that hopefully can be fixed with proper software settings. I would try looking further into what kokoko3k suggested, while you wait for a response from alsa devs.

Since you cannot connect the front panel, you could use hdajackretask to remap the front jack to another one on the backside and then test it.

Either way, good luck.

Offline

#22 2014-05-22 11:09:32

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

@HardcoreWR Can you upload your alsa-info (for the devs) and share the link?

Offline

#23 2014-05-22 12:37:35

ArthurBorsboom
Member
Registered: 2014-05-20
Posts: 55

Re: [SOLVED] Audio playing bad except with high CPU load

I have found a temporary solution  for my system at a possible performance reduction.
Create the file or if exists add to the file /etc/modprobe.d/alsa-base.conf

options snd-hda-intel snoop=0

Further I am starting to work with an ALSA dev on correcting and testing the Linux driver, so this might be fixed in the future.

Does this workaround work for you guys?

Offline

#24 2014-05-22 12:46:04

HardcoreWR
Member
Registered: 2014-05-21
Posts: 4

Re: [SOLVED] Audio playing bad except with high CPU load

ArthurBorsboom wrote:

@HardcoreWR Can you upload your alsa-info (for the devs) and share the link?

http://www.alsa-project.org/db/?f=9ee0b … 9bc23062f7

ArthurBorsboom wrote:

I have found a temporary solution  for my system at a possible performance reduction.
Create the file or if exists add to the file /etc/modprobe.d/alsa-base.conf

options snd-hda-intel snoop=0

Further I am starting to work with an ALSA dev on correcting and testing the Linux driver, so this might be fixed in the future.

Does this workaround work for you guys?

I'll try this when I get home around 6 PM CEST.

Offline

#25 2014-05-22 13:02:25

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Audio playing bad except with high CPU load

@HardcoreWR and others You should try:

options snd-hda-intel vid=8086 pid=8ca0 snoop=0

Since you have two sound cards using snd-hda-intel module, it is better (and sometimes necessary) to specify the vendor and product id, so that the correct card uses the correct options. Especially in your case, where HDMI is the card with index 0, modprobe would probably try to assign snoop=0 option to it. For more information read the alsa wiki.

By the way should you want to set the ALC1150 card as default just add index=0 to options.

Offline

Board footer

Powered by FluxBB