Re: [LAU] Bridging alsa and jack midi

From: Tito Latini <tito.01beta@email-addr-hidden>
Date: Wed Oct 01 2014 - 10:19:41 EEST

On Tue, Sep 30, 2014 at 11:42:33PM +0200, Ralf Mardorf wrote:
> On Tue, 2014-09-30 at 14:24 -0700, Len Ovens wrote:
> > Why would qjc or aj-s use something different?
>
> I don't know, but restoring doesn't work.
>
> > My first response is that this is a bug because there is enough
> > information there that each port is unique.
>
> And a bug that was more than one time reported, that's why I again asked
> for a workaround.
>
> > I think if it was me, and I was changing the description with udev, I
> > would change both of them to shorter names with no spaces like TT_0
> > and TT_1
>
> Backward compatibility, at least restoring when just the first card was
> used should work, so keeping the original name makes sense. Anyway, for
> the MIDI names the udev rule doesn't work.

I have a workaround (no tested).

'TerraTec EWX24/96' is the shortname of your soundcard and it is used
to set the rawmidi name (`snd_mpu401_uart_new' called in ice1712.c,
the source of the kernel module). So, if you change the shortname, you
also change the rawmidi name.

The info about the irq number is enough to get two different rawmidi
names. The new shortname after the follow patch is

    'TerraTec EWX24/96, irq %d'

consequently the longname becomes

    'TerraTec EWX24/96, irq %d at 0x%lx'

The new rawmidi name is

    'TerraTec EWX24/96, irq %d MIDI'

You can change the format of the string by editing the patch
(the maxsize for shortname is 31 characters). You can also edit the
basename for your card in linux/sound/pci/ice1712/ews.c:1035.

diff -ur linux~/sound/pci/ice1712/ice1712.c linux/sound/pci/ice1712/ice1712.c
--- linux~/sound/pci/ice1712/ice1712.c 2014-10-01 08:02:27.208159287 +0200
+++ linux/sound/pci/ice1712/ice1712.c 2014-10-01 08:03:49.868120111 +0200
@@ -2688,7 +2688,8 @@
                 for (c = *tbl; c->subvendor; c++) {
                         if (c->subvendor == ice->eeprom.subvendor) {
                                 ice->card_info = c;
- strcpy(card->shortname, c->name);
+ sprintf(card->shortname, "%s, irq %i", c->name,
+ ice->irq);
                                 if (c->driver) /* specific driver? */
                                         strcpy(card->driver, c->driver);
                                 if (c->chip_init) {
@@ -2786,8 +2787,7 @@
 
         snd_ice1712_set_input_clock_source(ice, 0);
 
- sprintf(card->longname, "%s at 0x%lx, irq %i",
- card->shortname, ice->port, ice->irq);
+ sprintf(card->longname, "%s at 0x%lx", card->shortname, ice->port);
 
         err = snd_card_register(card);
         if (err < 0) {
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Wed Oct 1 12:15:01 2014

This archive was generated by hypermail 2.1.8 : Wed Oct 01 2014 - 12:15:02 EEST