All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Horstmann <gineera@aspect135.co.uk>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@lists.sourceforge.net, manuel.jander@gmail.com
Subject: Re: au88x0 Init before create components
Date: Mon, 1 May 2006 22:17:48 +0100	[thread overview]
Message-ID: <200605012217.48660.gineera@aspect135.co.uk> (raw)
In-Reply-To: <s5h8xps5qcv.wl%tiwai@suse.de>

[-- Attachment #1: Type: text/plain, Size: 776 bytes --]

On Wednesday 26 April 2006 16:05, you wrote:
>
> Anyway, I'd suggest to move the definition of driver, shortname and
> longname there with a short comment that it's needed for mpu401
> instance, and keep the rest as it is.
>
> Also, I feel "Aureal au8810 MIDI 0" is more intuitive than
> "MIDI Aureal au8810 0".  It's a matter of taste, though...

Reduced patch is attached

Regards  Alan

Change the order in vortex_probe to set the card details before creating the 
components, meaning for example that card->shortname is available when 
registering the midi port.

I have also added extra to card->shortname, and a line to overwrite the midi 
name following snd_mpu401_uart_new.

au88x0-card-details-midi-name.patch

Signed-off-by: Alan Horstmann <gineera@aspect135.co.uk>

[-- Attachment #2: au88x0-card-details-midi-name.patch --]
[-- Type: text/x-diff, Size: 1708 bytes --]

diff -ru alsa-driver-orig-1.0.11rc3/alsa-kernel/pci/au88x0/au88x0.c alsa-driver-1.0.11rc3/alsa-kernel/pci/au88x0/au88x0.c
--- alsa-driver-orig-1.0.11rc3/alsa-kernel/pci/au88x0/au88x0.c	2006-01-13 17:16:29.000000000 +0000
+++ alsa-driver-1.0.11rc3/alsa-kernel/pci/au88x0/au88x0.c	2006-04-24 08:12:16.000000000 +0100
@@ -261,6 +261,13 @@
 		return err;
 	}
 	snd_vortex_workaround(pci, pcifix[dev]);
+
+	// Card details needed in snd_vortex_midi
+	strcpy(card->driver, CARD_NAME_SHORT);
+	sprintf(card->shortname, "Aureal Vortex %s", CARD_NAME_SHORT);
+	sprintf(card->longname, "%s at 0x%lx irq %i",
+		card->shortname, chip->io, chip->irq);
+
	// (4) Alloc components.
 	// ADB pcm.
 	if ((err = snd_vortex_new_pcm(chip, VORTEX_PCM_ADB, NR_ADB)) < 0) {
@@ -323,11 +330,6 @@
 #endif

	// (5)
-	strcpy(card->driver, CARD_NAME_SHORT);
-	strcpy(card->shortname, CARD_NAME_SHORT);
-	sprintf(card->longname, "%s at 0x%lx irq %i",
-		card->shortname, chip->io, chip->irq);
-
	if ((err = pci_read_config_word(pci, PCI_DEVICE_ID,
				  &(chip->device))) < 0) {
		snd_card_free(card);
diff -ru alsa-driver-orig-1.0.11rc3/alsa-kernel/pci/au88x0/au88x0_mpu401.c alsa-driver-1.0.11rc3/alsa-kernel/pci/au88x0/au88x0_mpu401.c
--- alsa-driver-orig-1.0.11rc3/alsa-kernel/pci/au88x0/au88x0_mpu401.c	2006-01-13 17:16:29.000000000 +0000
+++ alsa-driver-1.0.11rc3/alsa-kernel/pci/au88x0/au88x0_mpu401.c	2006-04-24 07:57:51.000000000 +0100
@@ -107,6 +107,9 @@
 	mpu = rmidi->private_data;
 	mpu->cport = (unsigned long)(vortex->mmio + VORTEX_MIDI_CMD);
 #endif
+	/* Overwrite MIDI name */
+	snprintf(rmidi->name, sizeof(rmidi->name), "%s MIDI %d", CARD_NAME_SHORT , vortex->card->number);
+
 	vortex->rmidi = rmidi;
 	return 0;
 }

  parent reply	other threads:[~2006-05-01 21:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-26 13:14 au88x0 Init before create components Alan Horstmann
2006-04-26 15:05 ` Takashi Iwai
2006-04-26 20:00   ` Alan Horstmann
2006-04-27  9:52     ` Takashi Iwai
2006-05-01 21:17   ` Alan Horstmann [this message]
2006-05-03 12:11     ` Takashi Iwai
2006-05-03 14:55       ` Alan Horstmann
2006-05-03 15:03         ` Takashi Iwai
2006-04-26 18:24 ` Manuel Jander

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=200605012217.48660.gineera@aspect135.co.uk \
    --to=gineera@aspect135.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=manuel.jander@gmail.com \
    --cc=tiwai@suse.de \
    /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.