From: Bent Bisballe Nyeng <deva@aasimon.org>
To: alsa-devel@alsa-project.org
Subject: Intel HD: ALC662 noise-bug on FitPC2i
Date: Wed, 12 Dec 2012 08:26:08 +0100 [thread overview]
Message-ID: <50C83190.7050001@aasimon.org> (raw)
In-Reply-To: <1355321775-2042-1-git-send-email-mengdong.lin@intel.com>
[-- Attachment #1: Type: text/plain, Size: 8847 bytes --]
Hi list
I have tried to access the bugtracker at
https://bugtrack.alsa-project.org/alsa-bug for a while without luck, so
now I will try to post the bug here...
Problem:
When recording, audible clicking sounds are present in the resulting
audio data.
Analysis:
When recording at 48kHz 1024 samples per channel are returned by the
snd_pcm_readi function.
I made a test app that wrote zeros into the first 20 samples of each
recorded buffer in order to 'mark' the beggining of each buffer in the
output file and it appears that the clicking noise come from buffer
corruption at position 1024-160 samples (160 samples from the end of
the buffer).
The corruption are composed of approximately 10 samples, and the
nature of the corrupted values are such that they could come from an
earlier buffer (the corrupted data resemble wav forms).
Sometimes only a single sample seem to be corrupted (see
wavform3.png), but sometimes several (see wavform1.png and
wavform2.png).
Usually the number of corrupted samples are the same for both channels.
A sample recording produced by the command:
arecord -c 2 -t raw -f S16_LE -r 48000 --disable-resample -d 10
alc662-noise-bug.raw
The resulting file can be fetched at
http://www.aasimon.org/public/alc662-noise-bug.raw (too big to send by
email)
Hardware:
Fit-PC2i (Atom Z530).
Intel HD driver with ALC662 codec.
Kernel (uname -a):
Linux InterCom 3.2.1-gentoo-r2-fitpc2i #1 SMP Tue Dec 11 09:10:23 i686
Intel(R) Atom(TM) CPU Z530 @ 1.60GHz GenuineIntel GNU/Linux
Alsa-lib and utils used were v.1.0.24, but tests with kernel-3.5.7 and
alsa-lib/utils-1.0.25 has also been performed with similiar results.
Kernel compiled with asound debug (from .config):
CONFIG_SND_DEBUG=y
CONFIG_SND_DEBUG_VERBOSE=y
CONFIG_SND_PCM_XRUN_DEBUG=y
Log output with "echo 127 > /proc/asound/card0/pcm0c/xrun_debug":
Command run:
(arecord -c 2 -t raw -r 48000 -d 0.1 out.raw &) ; sleep 0.015; killall
arecord
Dec 10 15:58:46 InterCom kernel: [ 1733.745094] hda-intel:
azx_pcm_prepare: bufsize=0x10000, format=0x21
Dec 10 15:58:46 InterCom kernel: [ 1733.745109] hda_codec_setup_stream:
NID=0x8, stream=0x2, channel=0, format=0x21
Dec 10 15:58:46 InterCom kernel: [ 1733.749510] hwptr_update:
pcmC0D0c:0: pos=209/1024/8192, hwptr=209/0/209/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749553] hwptr_update:
pcmC0D0c:0: pos=212/1024/8192, hwptr=3/209/212/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749609] hwptr_update:
pcmC0D0c:0: pos=214/1024/8192, hwptr=2/212/214/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749645] hwptr_update:
pcmC0D0c:0: pos=216/1024/8192, hwptr=2/214/216/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749664] hwptr_update:
pcmC0D0c:0: pos=217/1024/8192, hwptr=1/216/217/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749694] hwptr_update:
pcmC0D0c:0: pos=219/1024/8192, hwptr=2/217/219/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749719] hwptr_update:
pcmC0D0c:0: pos=220/1024/8192, hwptr=1/219/220/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749738] hwptr_update:
pcmC0D0c:0: pos=221/1024/8192, hwptr=1/220/221/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749767] hwptr_update:
pcmC0D0c:0: pos=222/1024/8192, hwptr=1/221/222/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749793] hwptr_update:
pcmC0D0c:0: pos=223/1024/8192, hwptr=1/222/223/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749813] hwptr_update:
pcmC0D0c:0: pos=224/1024/8192, hwptr=1/223/224/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749841] hwptr_update:
pcmC0D0c:0: pos=226/1024/8192, hwptr=2/224/226/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749867] hwptr_update:
pcmC0D0c:0: pos=227/1024/8192, hwptr=1/226/227/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749887] hwptr_update:
pcmC0D0c:0: pos=228/1024/8192, hwptr=1/227/228/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749914] hwptr_update:
pcmC0D0c:0: pos=229/1024/8192, hwptr=1/228/229/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749940] hwptr_update:
pcmC0D0c:0: pos=230/1024/8192, hwptr=1/229/230/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749961] hwptr_update:
pcmC0D0c:0: pos=231/1024/8192, hwptr=1/230/231/0
Dec 10 15:58:46 InterCom kernel: [ 1733.749989] hwptr_update:
pcmC0D0c:0: pos=233/1024/8192, hwptr=2/231/233/0
Dec 10 15:58:46 InterCom kernel: [ 1733.752935] hwptr_update:
pcmC0D0c:0: pos=374/1024/8192, hwptr=141/233/374/0
Dec 10 15:58:46 InterCom kernel: [ 1733.752964] hwptr_update:
pcmC0D0c:0: pos=376/1024/8192, hwptr=2/374/376/0
Dec 10 15:58:46 InterCom kernel: [ 1733.753002] hwptr_update:
pcmC0D0c:0: pos=377/1024/8192, hwptr=1/376/377/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754067] hwptr_update:
pcmC0D0c:0: pos=428/1024/8192, hwptr=51/377/428/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754092] hwptr_update:
pcmC0D0c:0: pos=430/1024/8192, hwptr=2/428/430/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754129] hwptr_update:
pcmC0D0c:0: pos=431/1024/8192, hwptr=1/430/431/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754156] hwptr_update:
pcmC0D0c:0: pos=433/1024/8192, hwptr=2/431/433/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754175] hwptr_update:
pcmC0D0c:0: pos=434/1024/8192, hwptr=1/433/434/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754204] hwptr_update:
pcmC0D0c:0: pos=435/1024/8192, hwptr=1/434/435/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754230] hwptr_update:
pcmC0D0c:0: pos=436/1024/8192, hwptr=1/435/436/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754250] hwptr_update:
pcmC0D0c:0: pos=437/1024/8192, hwptr=1/436/437/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754278] hwptr_update:
pcmC0D0c:0: pos=439/1024/8192, hwptr=2/437/439/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754304] hwptr_update:
pcmC0D0c:0: pos=440/1024/8192, hwptr=1/439/440/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754324] hwptr_update:
pcmC0D0c:0: pos=441/1024/8192, hwptr=1/440/441/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754351] hwptr_update:
pcmC0D0c:0: pos=442/1024/8192, hwptr=1/441/442/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754377] hwptr_update:
pcmC0D0c:0: pos=443/1024/8192, hwptr=1/442/443/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754398] hwptr_update:
pcmC0D0c:0: pos=444/1024/8192, hwptr=1/443/444/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754425] hwptr_update:
pcmC0D0c:0: pos=446/1024/8192, hwptr=2/444/446/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754450] hwptr_update:
pcmC0D0c:0: pos=447/1024/8192, hwptr=1/446/447/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754472] hwptr_update:
pcmC0D0c:0: pos=448/1024/8192, hwptr=1/447/448/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754501] hwptr_update:
pcmC0D0c:0: pos=449/1024/8192, hwptr=1/448/449/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754525] hwptr_update:
pcmC0D0c:0: pos=450/1024/8192, hwptr=1/449/450/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754545] hwptr_update:
pcmC0D0c:0: pos=451/1024/8192, hwptr=1/450/451/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754575] hwptr_update:
pcmC0D0c:0: pos=453/1024/8192, hwptr=2/451/453/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754599] hwptr_update:
pcmC0D0c:0: pos=454/1024/8192, hwptr=1/453/454/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754618] hwptr_update:
pcmC0D0c:0: pos=455/1024/8192, hwptr=1/454/455/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754647] hwptr_update:
pcmC0D0c:0: pos=456/1024/8192, hwptr=1/455/456/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754673] hwptr_update:
pcmC0D0c:0: pos=458/1024/8192, hwptr=2/456/458/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754691] hwptr_update:
pcmC0D0c:0: pos=458/1024/8192, hwptr=0/458/458/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754718] hwptr_update:
pcmC0D0c:0: pos=460/1024/8192, hwptr=2/458/460/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754744] hwptr_update:
pcmC0D0c:0: pos=461/1024/8192, hwptr=1/460/461/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754764] hwptr_update:
pcmC0D0c:0: pos=462/1024/8192, hwptr=1/461/462/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754791] hwptr_update:
pcmC0D0c:0: pos=463/1024/8192, hwptr=1/462/463/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754817] hwptr_update:
pcmC0D0c:0: pos=464/1024/8192, hwptr=1/463/464/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754837] hwptr_update:
pcmC0D0c:0: pos=465/1024/8192, hwptr=1/464/465/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754865] hwptr_update:
pcmC0D0c:0: pos=467/1024/8192, hwptr=2/465/467/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754889] hwptr_update:
pcmC0D0c:0: pos=468/1024/8192, hwptr=1/467/468/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754910] hwptr_update:
pcmC0D0c:0: pos=469/1024/8192, hwptr=1/468/469/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754940] hwptr_update:
pcmC0D0c:0: pos=470/1024/8192, hwptr=1/469/470/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754964] hwptr_update:
pcmC0D0c:0: pos=472/1024/8192, hwptr=2/470/472/0
Dec 10 15:58:46 InterCom kernel: [ 1733.754983] hwptr_update:
pcmC0D0c:0: pos=472/1024/8192, hwptr=0/472/472/0
Dec 10 15:58:46 InterCom kernel: [ 1733.761111]
hda_codec_cleanup_stream: NID=0x8
Thank you in advance.
Kind regards
Bent Bisballe Nyeng
[-- Attachment #2: wavform1.png --]
[-- Type: image/png, Size: 9552 bytes --]
[-- Attachment #3: wavform2.png --]
[-- Type: image/png, Size: 9463 bytes --]
[-- Attachment #4: wavform3.png --]
[-- Type: image/png, Size: 8973 bytes --]
[-- Attachment #5: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2012-12-12 7:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 14:16 [PATCH v2 1/1] ALSA: hda - use usleep_range in link reset and change timeout check mengdong.lin
2012-12-12 7:26 ` Bent Bisballe Nyeng [this message]
2012-12-12 13:05 ` Intel HD: ALC662 noise-bug on FitPC2i Clemens Ladisch
2012-12-12 13:14 ` Bent Bisballe Nyeng
2012-12-12 14:25 ` Takashi Iwai
2012-12-12 14:45 ` Bent Bisballe Nyeng
2012-12-12 14:51 ` Takashi Iwai
2012-12-12 18:30 ` Bent Bisballe Nyeng
2012-12-12 19:11 ` Takashi Iwai
2012-12-13 7:58 ` Bent Bisballe Nyeng
2012-12-13 8:08 ` Takashi Iwai
2012-12-13 9:32 ` [PATCH v2 1/1] ALSA: hda - use usleep_range in link reset and change timeout check Lin, Mengdong
2012-12-13 9:38 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50C83190.7050001@aasimon.org \
--to=deva@aasimon.org \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.