[alsa-devel] [ISSUE] crackles and clicks
Hello,
I tried my DAC (Tenor TE8802 chipset) in USB on Archlinux (LTS 3.10.26). I can hear regularly crackles ans clicks.
I've tried all available USB ports, other kernels (3.12.6, 3.12.7), other distro (ubuntu), without luck...
The DAC is Teac UD-H01.
here is lsusb verbose : http://ix.io/9Q4
Feel free to ask for more precisions, I'll give you all you need.
I thank you very much.
Eric
At Mon, 13 Jan 2014 09:34:04 +0100, Eric F wrote:
Hello,
I tried my DAC (Tenor TE8802 chipset) in USB on Archlinux (LTS 3.10.26). I can hear regularly crackles ans clicks.
I've tried all available USB ports, other kernels (3.12.6, 3.12.7), other distro (ubuntu), without luck...
The DAC is Teac UD-H01.
here is lsusb verbose : http://ix.io/9Q4
Feel free to ask for more precisions, I'll give you all you need.
Which program / sound backend did you test? Do the crackles happen with the plain "aplay -Dplughw foo.wav", too?
Takashi
At Mon, 13 Jan 2014 09:34:04 +0100, Eric F wrote:
Hello,
I tried my DAC (Tenor TE8802 chipset) in USB on Archlinux (LTS 3.10.26). I can hear regularly crackles ans clicks.
I've tried all available USB ports, other kernels (3.12.6, 3.12.7), other distro (ubuntu), without luck...
The DAC is Teac UD-H01.
here is lsusb verbose : http://ix.io/9Q4
Feel free to ask for more precisions, I'll give you all you need.
Which program / sound backend did you test? Do the crackles happen with the plain "aplay -Dplughw foo.wav", too?
Takashi
If this can help in the investigation of your problem, I can experience crackles and clicks during pcm playback on my small hpmini notebook. I have kinda nailed down the source of the crackles and clicks.
It turns out that when my Wifi card is on but not connected, I have the crackles and clicks. If I connect to a Wifi network or close the Wifi, the crackles and clicks go away. I have not had the time check the Wifi driver code yet but my explanation of the behavior is that in that specific state, some wifi IRQ handler is taking too much time and stop my sound device irqs to be timely serviced.
My advice, is try to unload as much as possible kernel driver modules that may interfere with your audio playback and see if your crackles and clicks go away. For reference, here is my HW, in case you have the same Wifi Adapter....
00:1b.0 Audio device [0403]: Intel Corporation NM10/ICH7 Family High Definition Audio Controller [8086:27d8] (rev 02) Subsystem: Hewlett-Packard Company Device [103c:1584] Flags: bus master, fast devsel, latency 0, IRQ 45 Memory at 96200000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+ Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00 Capabilities: [100] Virtual Channel Capabilities: [130] Root Complex Link Kernel driver in use: snd_hda_intel Kernel modules: snd_hda_intel
01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8188CE 802.11b/g/n WiFi Adapter [10ec:8176] (rev 01) Subsystem: Hewlett-Packard Company Device [103c:1629] Flags: bus master, fast devsel, latency 0, IRQ 16 I/O ports at 3000 [size=256] Memory at 95000000 (64-bit, non-prefetchable) [size=16K] Capabilities: [40] Power Management version 3 Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+ Capabilities: [70] Express Endpoint, MSI 00 Capabilities: [100] Advanced Error Reporting Capabilities: [140] Virtual Channel Capabilities: [160] Device Serial Number 01-91-81-fe-ff-4c-e0-00 Kernel driver in use: rtl8192ce Kernel modules: rtl8192ce
________________________________ CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
On Mon, Jan 13, 2014 at 04:32:30PM +0000, LANGLOIS Olivier PIS -EXT wrote:
At Mon, 13 Jan 2014 09:34:04 +0100, Eric F wrote:
Hello,
I tried my DAC (Tenor TE8802 chipset) in USB on Archlinux (LTS 3.10.26). I can hear regularly crackles ans clicks.
I've tried all available USB ports, other kernels (3.12.6, 3.12.7), other distro (ubuntu), without luck...
The DAC is Teac UD-H01.
here is lsusb verbose : http://ix.io/9Q4
Feel free to ask for more precisions, I'll give you all you need.
Which program / sound backend did you test? Do the crackles happen with the plain "aplay -Dplughw foo.wav", too?
Takashi
If this can help in the investigation of your problem, I can experience crackles and clicks during pcm playback on my small hpmini notebook. I have kinda nailed down the source of the crackles and clicks.
It turns out that when my Wifi card is on but not connected, I have the crackles and clicks. If I connect to a Wifi network or close the Wifi, the crackles and clicks go away. I have not had the time check the Wifi driver code yet but my explanation of the behavior is that in that specific state, some wifi IRQ handler is taking too much time and stop my sound device irqs to be timely serviced.
My advice, is try to unload as much as possible kernel driver modules that may interfere with your audio playback and see if your crackles and clicks go away. For reference, here is my HW, in case you have the same Wifi Adapter....
I'm not sure whether you're on the right track here.
Which program are you using for this? How are the buffer sizes configured? Are you seeing XRUNs?
And are you sure the audio distortion doesn't relate to bad USB power? Please check with a different PC as well, and for tests, put a powered(!) USB hub inbetween your PC and the DAC.
Daniel
Hi Daniel,
-----Original Message----- From: Daniel Mack [mailto:daniel@zonque.org] Sent: Tuesday, January 14, 2014 9:42 AM
If this can help in the investigation of your problem, I can experience
crackles and clicks during pcm playback on my small hpmini notebook. I have kinda nailed down the source of the crackles and clicks.
It turns out that when my Wifi card is on but not connected, I have the
crackles and clicks. If I connect to a Wifi network or close the Wifi, the crackles and clicks go away. I have not had the time check the Wifi driver code yet but my explanation of the behavior is that in that specific state, some wifi IRQ handler is taking too much time and stop my sound device irqs to be timely serviced.
My advice, is try to unload as much as possible kernel driver modules that
may interfere with your audio playback and see if your crackles and clicks go away. For reference, here is my HW, in case you have the same Wifi Adapter....
I'm not sure whether you're on the right track here.
Which program are you using for this? How are the buffer sizes configured? Are you seeing XRUNs?
And are you sure the audio distortion doesn't relate to bad USB power? Please check with a different PC as well, and for tests, put a powered(!) USB hub inbetween your PC and the DAC.
Daniel
I experience the audible clicks with VLC but I have reproduced it with aplay as well. The clicks that I hear corresponds to underruns. For the records, this is not happening with a USB device. I have a Intel HDA sound card. I did chime in the discussion to point out that the problem could come from something else than ALSA or the sound card driver. Here is the output of my aplay session. This makes me doubt my hypothesis. I'll check the cpu usage while the Wifi is on but not connected or see if running aplay in real-time prio makes things any better.
Note that the underrun duration printed in the output sound fishy...
underrun!!! (at least 1856093977.967 ms long)
lano1106@hpmini ~/Music $ aplay -v -c1 sine.wav Playing WAVE 'sine.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Plug PCM: Rate conversion PCM (48000, sformat=S32_LE) Converter: linear-interpolation Protocol version: 10002 Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 44100 exact rate : 44100 (44100/1) msbits : 16 buffer_size : 15052 period_size : 940 period_time : 21333 tstamp_mode : NONE period_step : 1 avail_min : 940 period_event : 0 start_threshold : 15052 stop_threshold : 15052 silence_threshold: 0 silence_size : 0 boundary : 986447872 Slave: Soft volume PCM Control: PCM Playback Volume min_dB: -51 max_dB: 0 resolution: 256 Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S32_LE subformat : STD channels : 2 rate : 48000 exact rate : 48000 (48000/1) msbits : 32 buffer_size : 16384 period_size : 1024 period_time : 21333 tstamp_mode : NONE period_step : 1 avail_min : 1024 period_event : 0 start_threshold : 16384 stop_threshold : 16384 silence_threshold: 0 silence_size : 0 boundary : 1073741824 Slave: Direct Stream Mixing PCM Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S32_LE subformat : STD channels : 2 rate : 48000 exact rate : 48000 (48000/1) msbits : 32 buffer_size : 16384 period_size : 1024 period_time : 21333 tstamp_mode : NONE period_step : 1 avail_min : 1024 period_event : 0 start_threshold : 16384 stop_threshold : 16384 silence_threshold: 0 silence_size : 0 boundary : 1073741824 Hardware PCM card 0 'HDA Intel' device 0 subdevice 0 Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S32_LE subformat : STD channels : 2 rate : 48000 exact rate : 48000 (48000/1) msbits : 32 buffer_size : 16384 period_size : 1024 period_time : 21333 tstamp_mode : ENABLE period_step : 1 avail_min : 1024 period_event : 0 start_threshold : 1 stop_threshold : 1073741824 silence_threshold: 0 silence_size : 1073741824 boundary : 1073741824 appl_ptr : 0 hw_ptr : 40810501 underrun!!! (at least 1856093977.967 ms long)
________________________________ CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
On 01/14/2014 04:59 PM, LANGLOIS Olivier PIS -EXT wrote:
I experience the audible clicks with VLC but I have reproduced it with aplay as well. The clicks that I hear corresponds to underruns. For the records, this is not happening with a USB device. I have a Intel HDA sound card.
Ok, sorry. I missed that detail.
I did chime in the discussion to point out that the problem could come from something else than ALSA or the sound card driver. Here is the output of my aplay session. This makes me doubt my hypothesis. I'll check the cpu usage while the Wifi is on but not connected or see if running aplay in real-time prio makes things any better.
I see, and I'd say that's a sign that the wifi driver is holding off the system way too long somewhere, rather than a problem with the sound driver.
Could you repost your findings from the earlier mail and send them to Larry.Finger@lwfinger.net and linux-wireless@vger.kernel.org? The wireless people might have an idea what's going on.
Daniel
Hi, I have redone the small aplay experiment but this time by using the master git version which gives some more info about my underruns.
I have also modded it so it prints now with:
@@ -1507,9 +1507,10 @@ static void xrun(void) clock_gettime(CLOCK_MONOTONIC, &now); snd_pcm_status_get_trigger_htstamp(status, &tstamp); timermsub(&now, &tstamp, &diff); - fprintf(stderr, _("%s!!! (at least %.3f ms long)\n"), + fprintf(stderr, _("%s!!! (at least %.3f ms long) now %ld.%09ld\n"), stream == SND_PCM_STREAM_PLAYBACK ? _("underrun") : _("overrun"), - diff.tv_sec * 1000 + diff.tv_nsec / 1000000.0); + diff.tv_sec * 1000 + diff.tv_nsec / 1000000.0, + now.tv_sec, now.tv_nsec); #else fprintf(stderr, "%s !!!\n", _("underrun")); #endif
./aplay -v ~/Music/sine.wav
on kernel v3.12.7 with
Codec: IDT 92HD81B1X5 Address: 0 AFG Function Id: 0x1 (unsol 1) Vendor Id: 0x111d7605 Subsystem Id: 0x103c1585 Revision Id: 0x100402
which gives
underrun!!! (at least 1248687948.256 ms long) now 27046.672739254 Status: state : XRUN trigger_time: 1390347762.628483000 tstamp : 1390347766.184350000 delay : -635 avail : 15687 avail_max : 15675 underrun!!! (at least 1248690502.759 ms long) now 27052.789215213 Status: state : XRUN trigger_time: 1390347766.190456000 tstamp : 1390347772.300830000 delay : -1333 avail : 16385 avail_max : 16373
is there someone that could give me some investigation advices on this one? Would enabling xrun_debug be helpful?
thank you,
I experience the audible clicks with VLC but I have reproduced it with aplay as well. The clicks that I hear corresponds to underruns. For the records, this is not happening with a USB device. I have a Intel HDA sound card. I did chime in the discussion to point out that the problem could come from something else than ALSA or the sound card driver. Here is the output of my aplay session. This makes me doubt my hypothesis. I'll check the cpu usage while the Wifi is on but not connected or see if running aplay in real-time prio makes things any better.
Note that the underrun duration printed in the output sound fishy...
underrun!!! (at least 1856093977.967 ms long)
lano1106@hpmini ~/Music $ aplay -v -c1 sine.wav Playing WAVE 'sine.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Plug PCM: Rate conversion PCM (48000, sformat=S32_LE) Converter: linear-interpolation Protocol version: 10002 Its setup is: stream : PLAYBACK access : RW_INTERLEAVED format : S16_LE subformat : STD channels : 2 rate : 44100 exact rate : 44100 (44100/1) msbits : 16 buffer_size : 15052 period_size : 940 period_time : 21333 tstamp_mode : NONE period_step : 1 avail_min : 940 period_event : 0 start_threshold : 15052 stop_threshold : 15052 silence_threshold: 0 silence_size : 0 boundary : 986447872 Slave: Soft volume PCM Control: PCM Playback Volume min_dB: -51 max_dB: 0 resolution: 256 Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S32_LE subformat : STD channels : 2 rate : 48000 exact rate : 48000 (48000/1) msbits : 32 buffer_size : 16384 period_size : 1024 period_time : 21333 tstamp_mode : NONE period_step : 1 avail_min : 1024 period_event : 0 start_threshold : 16384 stop_threshold : 16384 silence_threshold: 0 silence_size : 0 boundary : 1073741824 Slave: Direct Stream Mixing PCM Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S32_LE subformat : STD channels : 2 rate : 48000 exact rate : 48000 (48000/1) msbits : 32 buffer_size : 16384 period_size : 1024 period_time : 21333 tstamp_mode : NONE period_step : 1 avail_min : 1024 period_event : 0 start_threshold : 16384 stop_threshold : 16384 silence_threshold: 0 silence_size : 0 boundary : 1073741824 Hardware PCM card 0 'HDA Intel' device 0 subdevice 0 Its setup is: stream : PLAYBACK access : MMAP_INTERLEAVED format : S32_LE subformat : STD channels : 2 rate : 48000 exact rate : 48000 (48000/1) msbits : 32 buffer_size : 16384 period_size : 1024 period_time : 21333 tstamp_mode : ENABLE period_step : 1 avail_min : 1024 period_event : 0 start_threshold : 1 stop_threshold : 1073741824 silence_threshold: 0 silence_size : 1073741824 boundary : 1073741824 appl_ptr : 0 hw_ptr : 40810501 underrun!!! (at least 1856093977.967 ms long)
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium. _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
________________________________ CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
participants (4)
-
Daniel Mack
-
Eric F
-
LANGLOIS Olivier PIS -EXT
-
Takashi Iwai