Bug 105083 - Audio recording (from microphone) with hissing sound under ALi M5455 driver
Summary: Audio recording (from microphone) with hissing sound under ALi M5455 driver
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Sound (show other bugs)
Version: Beta 1
Hardware: x86-64 SUSE Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Takashi Iwai
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-16 23:51 UTC by Dirk Kaar
Modified: 2007-02-26 13:55 UTC (History)
0 users

See Also:
Found By: Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
/proc/asound/card0/codec97#0/ac97#0-0 (665 bytes, text/plain)
2005-08-19 21:53 UTC, Dirk Kaar
Details
/proc/asound/card0/codec97#0/ac97#0-0+regs (768 bytes, text/plain)
2005-08-19 21:54 UTC, Dirk Kaar
Details
alsactl -f somefile store (7.89 KB, text/plain)
2005-08-19 21:54 UTC, Dirk Kaar
Details
lspci (388 bytes, text/plain)
2005-08-19 21:56 UTC, Dirk Kaar
Details
Sample recording illustrating the problem (562.54 KB, audio/x-wav)
2005-08-23 12:04 UTC, Dirk Kaar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Kaar 2005-08-16 23:51:20 UTC
Mainboard: ASRock Combo-Z with Athlon 64 CPU 
 
In both 32bit and 64bit installations of SUSE Linux 9.3 an 10.0 beta, any 
recording from the microphone is distorted by hissing noises (at least 
using KRecord). 
I have verified that on the same hardware running MS Windows XP with the 
sound drivers supplied by ASRock, the recording quality is excellent. 
 
lspci reports: 
 
0000:00:04.0 Multimedia audio controller: ALi Corporation M5455 PCI AC-Link 
Controller Audio Device (rev 20) 
        Subsystem: ASRock Incorporation: Unknown device 0850 
        Flags: bus master, medium devsel, latency 32, IRQ 201 
        I/O ports at e800 [size=256] 
        Memory at febff000 (32-bit, non-prefetchable) [size=4K] 
        Capabilities: <available only to root>
Comment 1 Olaf Kirch 2005-08-17 08:39:54 UTC
Takashi, Jaroslav, here's one for you guys. 
Comment 2 Takashi Iwai 2005-08-18 09:59:38 UTC
Try to record with arecord:

 - arecord -fdat foo.wav
 - arecord -fcd foo.wav
 - arecord -Dhw:0 -fcd foo.wav

and check whether the same symptom occurs.
Comment 3 Dirk Kaar 2005-08-18 20:48:10 UTC
(In reply to comment #2) 
>  - arecord -fdat foo.wav 
High-pitched background noise. 
>  - arecord -fcd foo.wav 
Same as above. 
>  - arecord -Dhw:0 -fcd foo.wav 
Same noise, and: 
test> arecord -Dhw:0 -fcd foo.wav 
Recording WAVE 'foo.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo 
Warning: rate is not accurate (requested = 44100Hz, got = 48000Hz) 
         please, try the plug plugin (-Dplug:hw:0) 
 
With -Dplug:hw:0, also the same high-frequency noise. 
 
With arecord, the noise is still quite present and annoying, but less so than 
in krecord or linphone, where the noise's volume follows that of the audio 
input. 
 
Comment 4 Takashi Iwai 2005-08-19 18:30:18 UTC
OK, then it's either a mixer setting or a driver problem.

Which driver is used?
If it's using ac97 codec, please attach /proc/asound/card0/codec97#0/* files.
Also, run "alsactl -f somefile store" and attach that file.
Comment 5 Dirk Kaar 2005-08-19 21:51:07 UTC
(In reply to comment #4) 
> If it's using ac97 codec, please attach /proc/asound/card0/codec97#0/* 
files. 
ACK 
> Also, run "alsactl -f somefile store" and attach that file. 
ACK 
 
I am also attaching the output of lspci as run by root. 
 
 
Comment 6 Dirk Kaar 2005-08-19 21:53:18 UTC
Created attachment 46733 [details]
/proc/asound/card0/codec97#0/ac97#0-0
Comment 7 Dirk Kaar 2005-08-19 21:54:04 UTC
Created attachment 46734 [details]
/proc/asound/card0/codec97#0/ac97#0-0+regs
Comment 8 Dirk Kaar 2005-08-19 21:54:57 UTC
Created attachment 46736 [details]
alsactl -f somefile store
Comment 9 Dirk Kaar 2005-08-19 21:56:36 UTC
Created attachment 46738 [details]
lspci
Comment 10 Takashi Iwai 2005-08-22 10:41:16 UTC
The capture level seems to high.  Can you lower it?

Anyway, try "arecord -fdat -Dhw:0 foo.wav", too.
Comment 11 Dirk Kaar 2005-08-23 12:02:47 UTC
I have lowered the capture level in KMix, but I tried this before to no avail. 
I am attaching a sample recording done with the arecord command line you 
suggested. The input source is microphone. During the first second, there is 
relative silence in the room (PCs running...). Then, I just shortly blow into 
the microphone. What's interesting is that the high pitched sound stays on 
after the noise. This happens at any recording level, when there is silence, 
the volume of the noise is low, once any significant sound input occurs, the 
noise becomes overwhelmingly loud. VOIP telephony is absolutely impossible 
with that, by the way, the frequency range of the codecs and the POTS gateway 
let only the noise through, but none of the actual audio. 
Comment 12 Dirk Kaar 2005-08-23 12:04:28 UTC
Created attachment 47187 [details]
Sample recording illustrating the problem
Comment 13 Takashi Iwai 2005-08-25 19:24:59 UTC
Can you try ali5455 module instead of ALSA driver?
Run as root: "rcalsasound unload"
then run "modprobe ali5455".

For simply playback and record via OSS, you can use "play" and "rec" included in
sox package.
Comment 14 Dirk Kaar 2005-08-26 18:10:18 UTC
OK, after using nmixer to adjust the recording source and level - I don't know
how to set the automatic gain control, though - I get the perfect crystal clear
recording I'd expect from the OSS driver.
So can you pull the info from the OSS sources to fix the ALSA driver?
Comment 15 Dirk Kaar 2005-11-07 12:39:45 UTC
I have never managed to report this to the ALSA bug reporting system, but I've
now found a workaround in SUSE 10.0:
The mixer tool sets the recording input mark (a red dot) to both the microphone level and the catch-all capture level controls. This appears to cause an internal feed-back loop responsible for the noise I reported.
Disabling the recording input for the microphone, or setting it to the otherwise unused line-in level control, resolves the problem! The recording gain apparently is independant of the microphone level, too. All that affects recording performance is the capture level setting.

Some applications have built-in code that selects the microphone for recording, for instance linphone does this. The work-around there is to change
the recording source to line-in in the linphone settings.

Overall, it should be explored wether ALSA should be patched to disable the recording-source selection for anything else but "capture" on this driver.
Comment 16 Takashi Iwai 2007-02-26 13:55:11 UTC
The recording bug of ali5455 has been fixed in the recent versions.