All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use rawmidi device name for sequencer client name
@ 2002-11-12 15:06 Clemens Ladisch
  0 siblings, 0 replies; 6+ messages in thread
From: Clemens Ladisch @ 2002-11-12 15:06 UTC (permalink / raw)
  To: alsa-devel


Index: alsa-kernel/core/seq/seq_midi.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_midi.c,v
retrieving revision 1.9
diff -u -r1.9 seq_midi.c
--- alsa-kernel/core/seq/seq_midi.c	6 Aug 2002 07:28:26 -0000	1.9
+++ alsa-kernel/core/seq/seq_midi.c	12 Nov 2002 14:59:46 -0000
@@ -328,7 +328,7 @@
 		memset(&inf,0,sizeof(snd_seq_client_info_t));
 		inf.client = client->seq_client;
 		inf.type = KERNEL_CLIENT;
-		sprintf(inf.name, "External MIDI %i", card->number);
+		strncpy(inf.name, info.name, sizeof(inf.name) - 1);
 		snd_seq_kernel_client_ctl(client->seq_client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &inf);
 	}




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Use rawmidi device name for sequencer client name
@ 2002-11-28 12:38 Clemens Ladisch
  2002-11-28 14:16 ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Clemens Ladisch @ 2002-11-28 12:38 UTC (permalink / raw)
  To: alsa-devel


The snd_seq_midisynth_register_port() function already knows the name of
the rawmidi device, so there is no reason to invent another name for the
sequencer client.


Index: alsa-kernel/core/seq/seq_midi.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_midi.c,v
retrieving revision 1.9
diff -u -r1.9 seq_midi.c
--- alsa-kernel/core/seq/seq_midi.c	6 Aug 2002 07:28:26 -0000	1.9
+++ alsa-kernel/core/seq/seq_midi.c	12 Nov 2002 14:59:46 -0000
@@ -328,7 +328,7 @@
 		memset(&inf,0,sizeof(snd_seq_client_info_t));
 		inf.client = client->seq_client;
 		inf.type = KERNEL_CLIENT;
-		sprintf(inf.name, "External MIDI %i", card->number);
+		strncpy(inf.name, info.name, sizeof(inf.name) - 1);
 		snd_seq_kernel_client_ctl(client->seq_client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &inf);
 	}




-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Use rawmidi device name for sequencer client name
  2002-11-28 12:38 [PATCH] Use rawmidi device name for sequencer client name Clemens Ladisch
@ 2002-11-28 14:16 ` Takashi Iwai
  2002-11-28 16:00   ` Clemens Ladisch
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2002-11-28 14:16 UTC (permalink / raw)
  To: alsa-devel

At Thu, 28 Nov 2002 13:38:01 +0100 (MET),
Clemens Ladisch wrote:
> 
> 
> The snd_seq_midisynth_register_port() function already knows the name of
> the rawmidi device, so there is no reason to invent another name for the
> sequencer client.

the reason was that many rawmidi devices give the same name even if
there are many.  for example, mpu401 sets only "MPU-401 (UART)" as its
name.
although the card can be distinguished by the client number, it would
be better to be able to know only from its name string.

but it's true that this isn't the case for USB midi...


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Use rawmidi device name for sequencer client name
  2002-11-28 14:16 ` Takashi Iwai
@ 2002-11-28 16:00   ` Clemens Ladisch
  2002-11-28 16:23     ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Clemens Ladisch @ 2002-11-28 16:00 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:
> Clemens Ladisch wrote:
> > The snd_seq_midisynth_register_port() function already knows the name of
> > the rawmidi device, so there is no reason to invent another name for the
> > sequencer client.
>
> the reason was that many rawmidi devices give the same name even if
> there are many.  for example, mpu401 sets only "MPU-401 (UART)" as its
> name.
> although the card can be distinguished by the client number, it would
> be better to be able to know only from its name string.

The maybe we could add the card number or id to the string.
"MPU-401 (card42)" would be better than "External MIDI 42-0".


Regards,
Clemens



-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Use rawmidi device name for sequencer client name
  2002-11-28 16:00   ` Clemens Ladisch
@ 2002-11-28 16:23     ` Takashi Iwai
  2002-11-28 17:12       ` Clemens Ladisch
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2002-11-28 16:23 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel

At Thu, 28 Nov 2002 17:00:35 +0100 (MET),
Clemens Ladisch wrote:
> 
> Takashi Iwai wrote:
> > Clemens Ladisch wrote:
> > > The snd_seq_midisynth_register_port() function already knows the name of
> > > the rawmidi device, so there is no reason to invent another name for the
> > > sequencer client.
> >
> > the reason was that many rawmidi devices give the same name even if
> > there are many.  for example, mpu401 sets only "MPU-401 (UART)" as its
> > name.
> > although the card can be distinguished by the client number, it would
> > be better to be able to know only from its name string.
> 
> The maybe we could add the card number or id to the string.
> "MPU-401 (card42)" would be better than "External MIDI 42-0".

ok, now, the question is whether this "(cardx)" is included in each
rawmidi name or put in seq_midi.c.
if we use the rawmidi name with the card id, each rawmidi creator
should be responsible.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Use rawmidi device name for sequencer client name
  2002-11-28 16:23     ` Takashi Iwai
@ 2002-11-28 17:12       ` Clemens Ladisch
  0 siblings, 0 replies; 6+ messages in thread
From: Clemens Ladisch @ 2002-11-28 17:12 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:
> Clemens Ladisch wrote:
> > The maybe we could add the card number or id to the string.
> > "MPU-401 (card42)" would be better than "External MIDI 42-0".
>
> ok, now, the question is whether this "(cardx)" is included in each
> rawmidi name or put in seq_midi.c.
> if we use the rawmidi name with the card id, each rawmidi creator
> should be responsible.

You already mentioned that the rawmidi name for USB devices is more unique
(although it's easy to plug in several identical devices), so I think it
should be handled by the rawmidi driver.

And having different names for rawmidi and sequencer would be
inconsistent.


Regards,
Clemens



-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2002-11-28 17:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-28 12:38 [PATCH] Use rawmidi device name for sequencer client name Clemens Ladisch
2002-11-28 14:16 ` Takashi Iwai
2002-11-28 16:00   ` Clemens Ladisch
2002-11-28 16:23     ` Takashi Iwai
2002-11-28 17:12       ` Clemens Ladisch
  -- strict thread matches above, loose matches on Subject: below --
2002-11-12 15:06 Clemens Ladisch

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.