From: Takashi Iwai Subject: Re: Midi name string in mpu401_uart not unique Date: Thu, 30 Mar 2006 19:53:07 +0200 Message-ID: References: <200603292313.21160.gineera@aspect135.co.uk> <200603301845.23074.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: <200603301845.23074.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 Thu, 30 Mar 2006 18:45:23 +0100, Alan Horstmann wrote: > > On Thursday 30 March 2006 12:04, you wrote: > > At Wed, 29 Mar 2006 23:20:54 +0100, > > > > Alan Horstmann wrote: > > > I have patched one solution, adding a parameter to mpu401_uart_new. Then > > > ice1712 (in my case) generates this string either explicitly from > > > snd_ice1712_card_info or from model string, adding card & device numbers. > > > Diff is attached. > > > > > > What do you think? There must be other ways to achieve this also. This > > > diff is just a starting point; I've included the 'NULL' parameter just > > > in au88x0 as it is my other card. > > > > Instead of adding a new argument to snd_mpu401_uart_new, the caller > > can overwrite the string after creating the instace. > > > > snd_mpu401_uart_new(card, device, type, ..., &rmidi); > > snprintf(rmidi->name, sizeof(rmidi->name), > > "MIDI Name As I Like %d", card->number); > > > > Then the change would be less intrusive. > > > > Or am I missing something else? > > Sounds a lot simpler -just involving the driver only; I will try this later. > In the mpu-names.diff midi names were added to snd_ice1712_card_info to be > used in the name string. Is that still a reasonable thing to do, or is there > a better place, given that the different sub-vendors might have different > requirements? That addition looks OK to me. What I don't want is to change the existing API if there is a simple solution. > Bearing in mind Clemens' comments, is there any value in improving the name > given by mpu401_uart_new when using ->shortname, as in the diff, by adding > card and device numbers? Maybe the order of "CARD DEVICE" like "DMX6fire WaveTable" is better? Just a matter of taste, though... Takashi ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642