From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [es18xx.c PATCH] #1/4 for Zoom Video - resolve common vs chipset specific mixer controls Date: Mon, 02 Jan 2006 15:22:54 +0100 Message-ID: References: <43B00FF2.6030007@justmyself.net> <1135613234.8293.38.camel@mindpipe> <43B02A0E.20401@justmyself.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <43B02A0E.20401@justmyself.net> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Mark Salazar Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Mon, 26 Dec 2005 12:36:14 -0500, Mark Salazar wrote: > > +/* > + * These chipset specific mixer controls are initialized in > + * snd_es18xx_mixer. Those controls which are not UNSET are then > + * instantiated. > + */ > +static char UNSETbuf = '\0'; > +#define UNSET ((char *)&UNSETbuf) > +static enum optionalControlsIndex {reg1cBit4, reg3cMono, reg6d, reg6f}; > +static struct snd_kcontrol_new snd_es18xx_optional_controls[] = { > +ES18XX_SINGLE(UNSET, 0, 0x1c, 4, 1, 1), > +ES18XX_SINGLE(UNSET, 0, 0x3c, 0, 7, 0), > +ES18XX_DOUBLE(UNSET, 0, 0x6d, 0x6d, 4, 0, 15, 0), > +ES18XX_DOUBLE(UNSET, 0, 0x6f, 0x6f, 4, 0, 15, 0) > +}; > +static char* captureSwitchName = "Capture Switch"; > +static char* speakerPlayName = "PC Speaker Playback Volume"; > +static char* monoPlayName = "Mono Playback Volume"; > +static char* monoRecName = "Mono Capture Volume"; This doesn't work for the multiple cards because you overwrite the static array. Better to create once kcontrol instaces via snd_ctl_new1(), then copy the name on each instance according to the model. Other chnages look fine to me. thanks, Takashi ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click