From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: trident (Hoontech 4d Wave NX) dropouts with small buffersize. Date: Mon, 11 Oct 2004 17:27:32 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <20041005201351.GA25577@gmx.de> <20041008071505.GA3394@gmx.de> <20041009184135.GA1612@gmx.de> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Mon_Oct_11_17:27:32_2004-1" Return-path: In-Reply-To: <20041009184135.GA1612@gmx.de> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Oliver Freyd Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Mon_Oct_11_17:27:32_2004-1 Content-Type: text/plain; charset=US-ASCII At Sat, 9 Oct 2004 20:41:35 +0200, Oliver Freyd wrote: > > On Fri, Oct 08, 2004 at 06:39:50PM +0200, Takashi Iwai wrote: > > > Hmm, how about the bigger period & buffer sizes? Try both periods=2 > > and other cases. > > > > The trident driver handles differently when period_size = > > buffer_size/2. If period_size != buffer_size/2, it allocates an extra > > voice for the interrupt source. So, if the bug occurs only with > > periods = 2, it narrows the buggy part. > > > Hello, > > I've tried that, I think your idea is right. > The bug occurs when period_size = buffer_size/2 , also for bigger periods > like 2048 or 4096. Then you can hear that some buffers are repeated, > the soundcard plays them again. If you decrease period_size (even only by 1) > it works nicely. If you increase, you get buffer underruns (aplay detects > them). > > So it seems you have an idea of where the bug could be :-) > > If you tell me what else I could do to narrow down the problem, > I'm happy to help you! Ok, to be sure, please try the attached patch. This will make the driver ignoring the check of 2 periods and always allocatint an extra voice. Takashi --Multipart_Mon_Oct_11_17:27:32_2004-1 Content-Type: text/plain; charset=US-ASCII Index: alsa-kernel/pci/trident/trident_main.c =================================================================== RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/trident/trident_main.c,v retrieving revision 1.59 diff -u -r1.59 trident_main.c --- alsa-kernel/pci/trident/trident_main.c 30 Jul 2004 12:44:59 -0000 1.59 +++ alsa-kernel/pci/trident/trident_main.c 11 Oct 2004 15:24:30 -0000 @@ -814,7 +814,7 @@ /* voice management */ - if (params_buffer_size(hw_params) / 2 != params_period_size(hw_params)) { + if (1 /*params_buffer_size(hw_params) / 2 != params_period_size(hw_params)*/) { if (evoice == NULL) { evoice = snd_trident_alloc_voice(trident, SNDRV_TRIDENT_VOICE_TYPE_PCM, 0, 0); if (evoice == NULL) --Multipart_Mon_Oct_11_17:27:32_2004-1-- ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl