From: Takashi Iwai Subject: Re: new driver: 30mS interval problem Date: Tue, 26 Feb 2008 14:22:13 +0100 Message-ID: References: <2563ac9e0802250646t419bdc41v3b6b10d7566fec3d@mail.gmail.com> <2563ac9e0802260456j315c0eb1i7690cf03f4ee2d7f@mail.gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 8E7781038AE for ; Tue, 26 Feb 2008 14:22:14 +0100 (CET) In-Reply-To: <2563ac9e0802260456j315c0eb1i7690cf03f4ee2d7f@mail.gmail.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: William Juul Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 26 Feb 2008 13:56:51 +0100, William Juul wrote: > > On Mon, Feb 25, 2008 at 4:43 PM, Takashi Iwai wrote: > > At Mon, 25 Feb 2008 15:46:28 +0100, > > > > William Juul wrote: > > > > > > Hello > > > > > > I am new to ALSA and trying to write a new driver for a DAC connected > > > with PCM to an AVR32 on a NGW100 reference card provided by Atmel. > > > > > > The sampling rate I am currently using is 11047and the DAC is > > > providing 4 channels of 24bit. The HW interface is using DMA to copy > > > data to RAM. > > > By studying the audio data in hexdump or in Audacity I can verify that > > > the sound looks good in intervals of about 30mS, then all channels are > > > garbled for 30mS. This pattern repeat itself throughout the audio > > > capture. > > > > > > I am not confident I have configured all ALSA parameters properly. > > > How can I go about fixing/debugging this 30mS intverval problem? > > > > Maybe the period size has to be aligned to some value? > > > > > > > > > > Below is the command I am using. > > > > > > > > > Best regards > > > William Juul > > > > > > # arecord -r 11047 -c 4 -f S24_LE -s 1 -A 100 -d 5 --buffer-size 16384 > > > -F 21333 -v > test.wav > > > > Try to change the period size as well. > > > > > > Takashi > > > I tried changing the period size in both directions but it would never > change to anything but 490. Then your driver has some constraints. Or does it use dmix? > Then I tried changing the number of channels. -c 1 gave me lots of > "overrun", but -c 2 made everything work. The WAV file would still > contain data from all 4 channels. I do not understand the correlation > between the different parameters and why it behaves like this. Thus I > do not know what to adjust to remedy this. > > The command I used to make everything work was: > arecord -r 11047 -c 2 -f S24_LE -s 100 -A 10000 -d 5 > test.wav > > It turned out that --buffer-size and -F did not actually change anything. Check with -v option what plugins are being used. Takashi