From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Timofei V. Bondarenko" Subject: Re: [PATCH] cmipci at 96kHz Date: Wed, 31 Oct 2007 19:44:27 +0300 Message-ID: <4728B0EB.5010901@ipi.ac.ru> References: <4725F492.9020304@ipi.ac.ru> <1193733852.1219.1218549445@webmail.messagingengine.com> <47273E3A.8030205@ipi.ac.ru> <4728AC74.4040404@ipi.ac.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from ipi.ac.ru (blackpeer.ipi.ac.ru [83.149.227.82]) by alsa0.perex.cz (Postfix) with ESMTP id 065252441B for ; Wed, 31 Oct 2007 17:44:27 +0100 (CET) In-Reply-To: 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: Takashi Iwai Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org Takashi Iwai wrote: > At Wed, 31 Oct 2007 19:25:24 +0300, > Timofei V. Bondarenko wrote: >> Takashi Iwai wrote: >>> At Tue, 30 Oct 2007 17:22:50 +0300, >>> Timofei V. Bondarenko wrote: >>>> Clemens Ladisch wrote: >>>>> Timofei V. Bondarenko wrote: >>>>>> This patch adds support for 88.2k, 96k, and 128k samplerates >>>>>> on cmi8738-55 chip. >>>>>> Analog playback works fine on all channels. >>>>>> Analog capture works well too, though the extra samples seems >>>>>> interpolated by hardware. >>>>>> spdif playback and capture works fine. >>>>>> + freq_ext = CM_CH0_SRATE_88K | CM_CH0_SRATE_96K; >>>>> I'd guess there should be a new symbol CM_CH0_SRATE_128K. >>>> Ok. One more one-time-use symbol. >>>> >>>>>> + case 88200: >>>>>> + freq = 44100; >>>>>> + case 96000: >>>>>> + freq = 48000; >>>>>> + case 128000: >>>>>> + freq = 32000; /* not matter, >>>>> Wouldn't it be simpler to divide freq by two in all three cases? >>>> Not so easy, 128/2 = 64 - is an invalid rate, >>>> snd_cmipci_rate_freq() will complain. >>>> On another hand an invalid 64k/2=32k (valid) - this make snd_BUG() in >>>> snd_cmipci_rate_freq() useless. >>>> >>>> If the '68 chip also don't care about CM_REG_FUNCTRL1:ASFC/DSFC then >>>> freq can be set to 0 for all doubled frequencies. >>> The changes in your patch look good to me, but I'd like to ask you to >>> fix the coding style. (At least, we should follow the standard coding >>> style for new codes.) >>> >>> Run checkpatch.pl script included in linux-kernel/scripts directory, >>> and you'll see what I meant :) >>> >> Nice tool. I should be using it before. >> >> Regards, >> Tim. > > Thanks, now applied to HG tree (with small fixes, > "if ((err = ...) < 0)" style isn't preferred any more). > Thanks, Timofei.