From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Tue, 03 Jul 2007 11:21:25 +0100 (BST) Received: from cantor2.suse.de ([195.135.220.15]:58040 "EHLO mx2.suse.de") by ftp.linux-mips.org with ESMTP id S20021809AbXGCKVX (ORCPT ); Tue, 3 Jul 2007 11:21:23 +0100 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 832F8217E6; Tue, 3 Jul 2007 12:20:09 +0200 (CEST) Date: Tue, 03 Jul 2007 12:20:05 +0200 Message-ID: From: Takashi Iwai To: TJ Cc: "Linux MIPS List" , ALSA Dev List Subject: Re: [alsa-devel] [RFC] SGI O2 MACE audio ALSA module In-Reply-To: <6849c8890707020427q47704326od05ebb8241c3cf@mail.gmail.com> References: <6849c8890707020427q47704326od05ebb8241c3cf@mail.gmail.com> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta27) (fiddleheads) (+CVS-20060704) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 15598 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: tiwai@suse.de Precedence: bulk X-list: linux-mips At Mon, 2 Jul 2007 12:27:58 +0100, TJ wrote: > > Hi, > > It's been a while since I last posted something. Here is the latest > version of my code. It is somewhat of a mess at the moment, but I plan > to tidy it all up when it works better, any // comments are not > permanent features. I have been using trial and error to find why it > play too fast. > > I am glad to say that it does play sound correctly, bar one little > issue that has me stuck at the moment, it plays too fast (for any > sample frequency). Also how fast appears to depend on the player > (tried aplay and ogg123). > > I have cc the ALSA dev too in the hope that between the two lists > someone may spot something. Please can anyone who replies cc me. > > The patch was built against (applies to) linux-2.6.19.7 from > linux-mips.org. It'll probably work on other versions. The patch includes old typdefed structs which were already removed from the upstream, such as, snd_card_t. Please replace them appropriately. You can find the replacement in include/sound/typedefs.h (in the old kernel tree). Similarly, I'd recommend to avoid typedefs in your own code, too. People don't like it :) Other things I noticed through a quick glance: - Follow the standard coding style, e.g. 80 chars in a line, don't put if-block in a single line, etc. - Avoid non-ASCII letters, especially outside the comments - You don't need *_irqsave() in get/put callbacks of the control API. It's always schedulable, so, spin_lock_irq() suffices. - ad1843_lock could be better implemented with mutex if you have long delays inside the spinlock (except for the calls from irq handler) - please remove uneeded debug printks. If they are useful, keep it in another macro form. Could you fix these and repost? thanks, Takashi