From: Takashi Iwai Subject: Re: [PATCH] Support for non-standard rates in USB audio driver Date: Mon, 28 Aug 2006 13:06:28 +0200 Message-ID: References: <20060825232959.GA4523@lukeross.name> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20060825232959.GA4523@lukeross.name> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Luke Ross Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Sat, 26 Aug 2006 00:29:59 +0100, Luke Ross wrote: > > Hi, > > There's at least one USB audio chipset out there which supports only one > non-standard rate (ID 0e6a:0310 supports 46875Hz). There's a few other > patches for this card which are unsatisfactory because they attempt to > map this rate to 44.1k leading to sound distortion. > > The patch below uses SNDRV_PCM_RATE_KNOT to properly support the > non-standard rates where they are available. The fix looks OK to me. Could you fix just the conding style and give sign-off for a proper inclusion to the upstream? In general, one-line if isn't preferred. Break a line there, e.g. if (xxx) something; Also, > +static int snd_usb_pcm_check_knot(struct snd_pcm_runtime *runtime, struct snd_usb_substream *subs) is a too long line. Please keep it in 80 columns. (Yeah I know that other codes break this rule, but a newcomer code should follow the standard, at least ;) And, a very minor issue: > @@ -2366,6 +2401,7 @@ > unsigned char *fmt, int offset) > { > int nr_rates = fmt[offset]; > + int found = 0; This initialization isn't needed. Thanks, Takashi ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642