From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Midi name string in mpu401_uart not unique Date: Thu, 30 Mar 2006 13:04:59 +0200 Message-ID: References: <200603292313.21160.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: <200603292313.21160.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, 29 Mar 2006 23:20:54 +0100, Alan Horstmann wrote: > > For a card with ->shortname, snd_mpu401_uart_new creates the same string for > all ports on all cards of same type. Muse, eg, is unable to distinguish > them, and cannot use the second port. As a result, I thought wavetable midi > on DMX6fire was broken, but some patching solved this. :-) > > That set me thinking that really the card driver should be able to pass this > string to mpu401_uart_new to describe the ports actual use. It also seems to > me that however created the string should be unique, and also that the early > characters are the most useful in a sequencer window; I don't need the > manufacturer at all -just the model will do. > > 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. > > With these changes Muse shows 'MIDI-Front DMX6fire 0-0' and 'Wavetable > DMX6fire 0-1' which (of course) suits me just fine! Wavetable daughter card > now runs great! 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? 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