From: Takashi Iwai Subject: Re: [PATCH 1/7] ALSA: CA0132: Add new definitions ready for DSP routines Date: Mon, 10 Dec 2012 10:18:03 +0100 Message-ID: References: <1354944963-4654-1-git-send-email-ian_minett@creativelabs.com> <1354944963-4654-2-git-send-email-ian_minett@creativelabs.com> 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 A58D1261576 for ; Mon, 10 Dec 2012 10:18:04 +0100 (CET) In-Reply-To: <1354944963-4654-2-git-send-email-ian_minett@creativelabs.com> 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: Ian Minett Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Fri, 7 Dec 2012 21:35:57 -0800, Ian Minett wrote: > > +struct ct_effect { > + char name[44]; > + hda_nid_t nid; > + int mid; /*effect module ID*/ > + int reqs[EFFECT_VALS_MAX_COUNT]; /*effect module request*/ > + int direct; /* 0:output; 1:input*/ > + int params; /* number of default non-on/off params */ > + /*effect default values, 1st is on/off. */ > + unsigned int def_vals[EFFECT_VALS_MAX_COUNT]; > +}; > + > +static struct ct_effect ca0132_effects[EFFECTS_COUNT] = { > + { "Surround", > + SURROUND, > + 0x96, > + {0, 1}, > + 0, > + 1, > + {0x3F800000, 0x3F2B851F} Please use C99 style initialization. It makes the code a bit longer but it improves the readability very much. Also, for the parameter direct, use a literal instead of 0/1. Ditto for other structs likect_tuning_ctl, ca0132_voicefx, and ct_voicefx_preset. thanks, Takashi