From: Takashi Iwai Subject: Re: [PATCH 10/16] ALSA: VIA HDA: Add support for VT1705 Date: Mon, 21 Mar 2011 13:07:55 +0100 Message-ID: References: <4D86FF0A.4090107@viatech.com.cn> 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 0396E1037F8 for ; Mon, 21 Mar 2011 13:07:58 +0100 (CET) In-Reply-To: <4D86FF0A.4090107@viatech.com.cn> 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: Lydia Wang Cc: alsa-devel@alsa-project.org, HaraldWelte@viatech.com List-Id: alsa-devel@alsa-project.org At Mon, 21 Mar 2011 15:32:26 +0800, Lydia Wang wrote: > > +/* add playback controls from the parsed DAC table */ > +static int vt1705_auto_create_multi_out_ctls(struct via_spec *spec, > + const struct auto_pin_cfg *cfg) > +{ > + char name[32]; > + static const char * const chname[3] = { "Front", "Surround", "C/LFE" }; > + hda_nid_t nid_vols[] = {0x10, 0x11, 0x25}; > + hda_nid_t nid_mutes[] = {0x1C, 0x18, 0x27}; So... this function is identical with others except for the NID array contents and the max number of channels (up to 6). Can we merge them with some additional parameters instead of adding yet-another-new one? thanks, Takashi