Skip to contentSkip to conversation

: emu10k1 always has random clicks in wavetable MIDI synth playback but never in PCM playback

ALSA - driver 0000862 [email protected] 1 participant 1 message Aug 8, 2005

lore
Share & tools
lore
#0 lore raw

A NOTE has been added to this issue.
======================================================================
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=862>
======================================================================
Reported By: Will
Assigned To:
======================================================================

Project:                    ALSA - driver
Issue ID:                   862
Category:                   PCI - emu10k1
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     acknowledged
Distribution:               
Kernel Version:             2.6.10
======================================================================
Date Submitted:             01-30-2005 15:24 CET
Last Modified:              08-08-2005 15:20 CEST

======================================================================
Summary: emu10k1 always has random clicks in wavetable MIDI
synth playback but never in PCM playback
Description:
An Audigy 2 LS 5.1 PCI soundcard with emu10k1 chipset (the PCI id is 1102:0004 (rev 04)) always has random clicks in wavetable MIDI synth playback but never in PCM playback using any version of alsa-driver. I think this clicking is probably an emu10k1 driver bug.

It makes no difference which driver or kernel is used; the problem exists with alsa-driver-CVS, alsa-driver-1.0.8, and all previous versions since before alsa-driver-0.9.7 and with all mainline kernel versions of Linux 2.4.x and Linux 2.6.x including 2.6.10.

It makes no difference which kernel is used (2.4.x or 2.6.x). I recently started using CONFIG_ACPI_* with CONFIG_PCI_[GO]BIOS in 2.6.10 but it makes no difference. I use the default PCI latencies.

It makes no difference whether or not the emu10k1 IRQ is shared and the clicking is exactly the same regardless of which other device shares the IRQ, e.g. "IRQ 17: 78129 IO-APIC-level libata, EMU10K1" or "IRQ 16: 9554 IO-APIC-level eth0, EMU10K1".

From: Lee Revell <rlrevell AT ...>
Subject: Re: [Alsa-devel] [PATCH] emu10k1 multichannel support
Date: Sat, 29 Jan 2005 16:28:47 -0500
To: William <walsac3 AT ...>
Message-Id: <[email protected]>
Content-Type: text/plain

(sorry for the late reply)

Quoted 2 lines · William

I'll mention the following in case you might be interested to look at

it.

Quoted 1 line

An issue that's been around since the very beginning of the emu10k1

driver

Quoted 5 lines

is that playing a MIDI file on the wavetable often produces a rapid but irregular sequence of very noticeable clicks at a rate of 2 or 3 per second continuing for up to about 10 seconds. The clicking starts happening once every minute or so but without any clear pattern - it doesn't seem to be depend much on the contents of the

MIDI

Quoted 5 lines

files.

Interestingly I never hear any clicks when using the PCM and a soft synth like fluidsynth or timidity as an alternative method of MIDI playback, which is why I think it might be a bug (haven't

checked

Quoted 2 lines

whether something similar has already been logged on the bugtracker). I had a brief look into it, but didn't find anything conclusive in the

code.

Quoted 1 line

One possibly interesting feature was I notice that I could trigger lots

of

Quoted 1 line

clicks if I tried doing real-time variable attenuation of already

playing

Quoted 1 line

notes via update_voice(vp, SNDRV_EMUX_UPDATE_VOLUME) in

emu10k1_callback.c

I would actually be interested in looking at this. I have noticed some areas in the code where things are commented out for odd reasons. Specifically the samples cache is not cleared like it is for PCM voices. If you have time please file an ALSA bug report (you can just copy and paste this message).

Quoted 1 line

By the way, do you know the original purpose of

snd_emu10k1_sum_vol_attn()

Quoted 3 lines

in emu10k1/io.c which has just been removed in alsa-driver-1.0.8? The cumulative volume conversion algorithm in that function seems like it would probably have been based on the original emu10k1

chipset

Quoted 11 lines

documentation provided by Creative during its open-source era. It seems like a useful function to keep around for future extensions of the emu10k1 driver. Maybe it should be re-instated.

Quoted 1 line

From the 1.0.8 announcement:

- Summary: ALSA PCI drivers: misc cleanups
The patch below does the following cleanups under sound/pci/ :
- remove the following unused global functions:
- emu10k1/io.c: snd_emu10k1_sum_vol_attn

Yes, I asked Takashi about this and he said it just does some simple calculation. Check the alsa-devel archive. But, maybe there's something to it. It could be related to your clicking problem.

I have heard something similar when using PCM at really low latencies.

Lee

======================================================================

----------------------------------------------------------------------
Will - 04-14-05 15:20
----------------------------------------------------------------------
No, no change!

----------------------------------------------------------------------
agoode - 08-08-05 15:20
----------------------------------------------------------------------
I have this problem with a current Fedora Core 4 kernel on x86-64 (version 2.6.12-1.1398_FC4). It seems to be something with loading of the soundfont. asfxload or sfxload always appears to succeed, but it silently corrupts random samples. The particular samples corrupted are often the same ones from load to load, but not always. Different sequential runs of asfxload may corrupt different samples.

Corrupted samples may lead to clicks that you are hearing, or it may be a completely different problem.

It appears that asfxload is working correctly, though I am still trying to verify it. It looks like it is basically doing a simple ioctl, and things are getting messed up in the kernel.

Hardware: 05:02.0 Multimedia audio controller: Creative Labs SB Audigy (rev 04)
Class 0401: 1102:0004

I will attach an strace of asfxload. It appears some ioctl calls are failing? (Not sure if this is normal behavior.)

Issue History
Date Modified Username Field Change
======================================================================

01-30-05 15:24 Will           New Issue                                    
01-30-05 15:24 Will           Kernel Version            => 2.6.10          
04-13-05 22:01 jdthood        Note Added: 0004480                          
04-13-05 22:26 rlrevell       Note Added: 0004484                          
04-14-05 15:20 Will           Note Added: 0004493                          
04-14-05 22:01 jdthood        Status                   new => acknowledged 
08-08-05 15:11 agoode         Issue Monitored: agoode                      
08-08-05 15:20 agoode         Note Added: 0005709                          

======================================================================

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf