From: Takashi Iwai Subject: Re: Noisy USB audio stream using MPlayer Date: Tue, 23 Jun 2009 12:07:07 +0200 Message-ID: References: <786354.70664.qm@web62506.mail.re1.yahoo.com> <892610.27572.qm@web62507.mail.re1.yahoo.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 038E62463F for ; Tue, 23 Jun 2009 12:07:08 +0200 (CEST) In-Reply-To: <892610.27572.qm@web62507.mail.re1.yahoo.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Eran Ben-Avi Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 23 Jun 2009 03:03:43 -0700 (PDT), Eran Ben-Avi wrote: > = > = > = > = > = > = > ----- Original Message ---- > > From: Takashi Iwai > > To: Eran Ben-Avi > > 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 a= ny = > > similar issue in previous mailing lists, any help will be appreciated. > > > When playing an audio stream using MPlayer Ver1.0rc2-4.1.2=A0(tried d= ifferent = > > sample rates=A044K, 48K and different files WAV , MP3)=A0using my Creat= ive SB0271 = > > USB device on ARM based system(Marvell Kirkwood SoC) and kernel 2.6.22.= 18, I = > > hear an=A0interfering constant noise additionally to the original audio= stream. > > > At the beginning I heard this noise also when I used aplay(for WAV) b= ut 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=A0 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 runni= ng the mplayer: > = > [AO_ALSA] alsa-lib: pcm_direct.c:874:(snd_pcm_direct_initialize_slave) sl= ave plugin does not support mmap interleaved or mmap > =A0noninterleaved access > [AO_ALSA] alsa-lib: pcm_dmix.c:876:(snd_pcm_dmix_open) unable to initiali= ze slave > [AO_ALSA] Playback open error: Invalid argument > Opening /dev/dvb/adapter0/audio0 > DVB AUDIO DEVICE: No such file or directory > = > seems like=A0ALSA-LIB=A0doesn'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