From: Takashi Iwai Subject: Re: [PATCH] Support for muting channels DAC with CA0106 - SB0570 Date: Tue, 24 Jul 2007 12:12:44 +0200 Message-ID: References: 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 mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 4AEC9244A0 for ; Tue, 24 Jul 2007 12:12:45 +0200 (CEST) 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: Trent Piepho Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Mon, 23 Jul 2007 16:43:14 -0700 (PDT), Trent Piepho wrote: > > On Mon, 23 Jul 2007, Takashi Iwai wrote: > > At Sat, 21 Jul 2007 17:10:08 -0700 (PDT), > > Thanks, the patch looks almost fine, but please fix the following > > minor issues: > > > > - Try to avoid a magic number, e.g. >> 9. > > Ok, I added a bunch of the fields from the WM8768 datasheet that could be > useful. Thanks, that's _much_ better. > > - put callback should return 0 for non-changed value, a positive > > (usually 1) when the value is changed, and a negative error code for > > errors. > > It will now return 0 if the value wasn't changed and also not do the > unnecessary spi write. > > > - Try to keep lines within 80 chars (to follow the standard coding > > style). I know that other codes there are not, but don't care now. > > We'll fix them later, too. > > Also done. The loops that add the controls have long lines that didn't > wrap well. So I made a second patch that converts the loop I added plus > the two existing loops into a macro, which IMHO looks a lot nicer and > reduces code duplication. Yes. I fixed the macro to wrap with do {} while (0), and use temporary variables to be more safe. Both patches are applied now to ALSA HG tree. Takashi