From: Takashi Iwai Subject: Re: [PATCH 2/8] ASoC: alc5632: Use params_width() rather than memory format Date: Fri, 10 Jan 2014 14:51:03 +0100 Message-ID: References: <1389210723-16535-1-git-send-email-broonie@kernel.org> <1389210723-16535-2-git-send-email-broonie@kernel.org> <20140109103316.GD31886@sirena.org.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 44F11260857 for ; Fri, 10 Jan 2014 14:51:04 +0100 (CET) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Leon Romanovsky Cc: "alsa-devel@alsa-project.org" , Mark Brown , Liam Girdwood , linaro-kernel@lists.linaro.org List-Id: alsa-devel@alsa-project.org At Fri, 10 Jan 2014 15:44:43 +0200, Leon Romanovsky wrote: > > On Thu, Jan 9, 2014 at 12:33 PM, Mark Brown wrote: > > On Thu, Jan 09, 2014 at 06:55:17AM +0200, Leon Romanovsky wrote: > >> On Wed, Jan 8, 2014 at 9:51 PM, Mark Brown wrote: > > > >> > + switch (params_width(params)) { > >> > + case 16: > > > >> May be the better way will be to use define here and not hard coded value? > > > > No, it really is actually a number of bits. > Thanks, I didn't know about it. > In such case it is really unimportant to introduce define here. But, it's typo-prone :) OTOH, the numbers about format bits are small, so it's usually easier to audit, and not to worry too much. But large numbers like sample rates are often mistyped, thus using defined constants may have more merits. Takashi