From: Takashi Iwai Subject: Re: Envy24control -DMX6fire specifics Date: Wed, 07 Dec 2005 12:55:33 +0100 Message-ID: References: <200512051152.03090.gineera@aspect135.co.uk> <200512071208.14218.gineera@aspect135.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <200512071208.14218.gineera@aspect135.co.uk> 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: Alan Horstmann Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Wed, 7 Dec 2005 12:08:14 +0000, Alan Horstmann wrote: > > On Monday 05 December 2005 21:06, you wrote: > > > > Also, envy24control contains a lot of > > > 'if(card_eeprom.subvendor=ICE1712_SUBDEVICE_DMX6FIRE)'. Originally I > > > replaced these with a boolean (card_is_dmx6fire) variable for ease of > > > reading but reverted for this patch. It is a matter of alsa style and > > > preference. Should I prepare a patch to do this or leave the explicit > > > eeprom test? > > > > I don't care much, but checking eeprom at each place looks ideend > > ugly. > > > > I prepared this patch for my use anyway, so with one hack I can pretend my > card is not dmx6fire, for development, so offer it here. > > Summary: Tidy up DMX6fire eeprom checks > > Multiple instances of DMX6FIRE eeprom checks in envy24control replaced with a > variable. > > Signed-off-by: Alan Horstmann It looks fine but small glitches: > > + } else if (card_is_dmx6fire) { > + if (stream == 11) sprintf(str, "CD In L"); > + if (stream == 12) sprintf(str, "CD In R"); > + if (stream == 13) sprintf(str, "Line In L"); > + if (stream == 14) sprintf(str, "Line In R"); > + if (stream == 15) sprintf(str, "Phono/Mic L"); > + if (stream == 16) sprintf(str, "Phono/Mic R"); > + if (stream == 19) sprintf(str, "Digital In L"); > + if (stream == 20) sprintf(str, "Digital In R"); switch() would be better here. > @@ -1473,7 +1467,7 @@ > gtk_container_set_border_width(GTK_CONTAINER(vbox), 6); > > /* Add friendly labels for DMX 6Fires */ > - if((card_eeprom.subvendor == ICE1712_SUBDEVICE_DMX6FIRE) && (i < 6)){ > + if((card_is_dmx6fire) && (i < 6)){ No unneeded parentheses please. 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