All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Alan Horstmann <gineera@aspect135.co.uk>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Midi name string in mpu401_uart not unique
Date: Fri, 31 Mar 2006 12:10:56 +0200	[thread overview]
Message-ID: <s5hu09evs9b.wl%tiwai@suse.de> (raw)
In-Reply-To: <200603311102.37785.gineera@aspect135.co.uk>

At Fri, 31 Mar 2006 11:02:37 +0100,
Alan Horstmann wrote:
> 
> [1  <text/plain; iso-8859-1 (7bit)>]
> On Thursday 30 March 2006 18:53, you wrote:
> > At Thu, 30 Mar 2006 18:45:23 +0100,
> > Alan Horstmann wrote:
> 
> > > On Thursday 30 March 2006 12:04, you wrote:
> > > >
> > > > 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...
> 
> Would it be acceptable to add card, device to ->shortname in mpu401_uart as 
> attached:
> 
> mpu401_uart.c-add-to-shortname.patch
> 
> Add card and device numbers to portnames generated from ->shortnames by 
> snd_mpu401_uart_new.
> 
> Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk>

Thanks for the patch.  But I don't want to change that part at all.
It may break other stuff what you've not tested.

Just change the ice1712 stuff, instead.


Takashi

> [2 mpu401_uart.c-add-to-shortname.patch <text/x-diff; iso-8859-1 (7bit)>]
> --- mpu401_uart-orig.c	2005-11-18 18:52:14.000000000 +0000
> +++ mpu401_uart.c	2006-03-31 10:33:33.000000000 +0100
> @@ -506,7 +506,7 @@
>  	mpu->irq = irq;
>  	mpu->irq_flags = irq_flags;
>  	if (card->shortname[0])
> -		snprintf(rmidi->name, sizeof(rmidi->name), "%s MIDI", card->shortname);
> +		snprintf(rmidi->name, sizeof(rmidi->name), "%s MIDI %d-%d", card->shortname, card->number, device);
>  	else
>  		sprintf(rmidi->name, "MPU-401 MIDI %d-%d", card->number, device);
>  	snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, &snd_mpu401_uart_output);


-------------------------------------------------------
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

  reply	other threads:[~2006-03-31 10:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-29 22:20 Midi name string in mpu401_uart not unique Alan Horstmann
2006-03-30 11:04 ` Takashi Iwai
2006-03-30 17:45   ` Alan Horstmann
2006-03-30 17:53     ` Takashi Iwai
2006-03-31 10:02       ` Alan Horstmann
2006-03-31 10:10         ` Takashi Iwai [this message]
2006-03-31 10:45           ` Alan Horstmann
2006-03-30 12:43 ` Clemens Ladisch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hu09evs9b.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=gineera@aspect135.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.