Re: [PATCH] Support for non-standard rates in USB audio driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux