At Tue, 23 Jun 2009 03:03:43 -0700 (PDT), Eran Ben-Avi wrote:
----- Original Message ----
From: Takashi Iwai tiwai@suse.de To: Eran Ben-Avi eranpublic@yahoo.com Cc: alsa-devel@alsa-project.org Sent: Monday, June 22, 2009 7:41:19 PM Subject: Re: [alsa-devel] Noisy USB audio stream using MPlayer
At Mon, 22 Jun 2009 01:17:25 -0700 (PDT), Eran Ben-Avi wrote:
Hi,
I encountered some issue with my USB audio device and couldn't find any
similar issue in previous mailing lists, any help will be appreciated.
When playing an audio stream using MPlayer Ver1.0rc2-4.1.2 (tried different
sample rates 44K, 48K and different files WAV , MP3) using my Creative SB0271 USB device on ARM based system(Marvell Kirkwood SoC) and kernel 2.6.22.18, I hear an interfering constant noise additionally to the original audio stream.
At the beginning I heard this noise also when I used aplay(for WAV) but after
I reinstalled the ALSA-LIB and ALSA-UTILS(version 1.0.14rc4), the aplay suddenly started to work smooth.
I tested different USB audio device(AKM) but got same noisy results. Another piece of information I can provide is that increasing the CPU
utilization eliminates the noise completely - maybe a timing issue ???
Could it be the cache coherency? The usb-audio driver uses vmalloc'ed buffers as intermediate buffers, and they can be exposed to user-space via mmap.
Does the problem disappears when you disable mmap support by commenting out SNDRV_PCM_INFO_MMAP* in snd_usb_hardware info field?
When I disabled the mmap support I got the following messages while running the mplayer:
[AO_ALSA] alsa-lib: pcm_direct.c:874:(snd_pcm_direct_initialize_slave) slave plugin does not support mmap interleaved or mmap noninterleaved access [AO_ALSA] alsa-lib: pcm_dmix.c:876:(snd_pcm_dmix_open) unable to initialize slave [AO_ALSA] Playback open error: Invalid argument Opening /dev/dvb/adapter0/audio0 DVB AUDIO DEVICE: No such file or directory
seems like ALSA-LIB doesn't really like it.
Because dmix requires the mmap explicitly by its nature.
Pass mplayer an appropriate option to use directly "hw" PCM device. (plughw might work with alsa-lib 1.0.20, too)
Takashi