Skip to contentSkip to conversation

Patch for ymfpci in test12-pre7

PATCH Pete Zaitcev 1 participant 1 message Dec 10, 2000

lore
Share & tools
lore
#0 lore raw

Hi, Linus:

The attached patch fixes the following problems with ymfpci in 2.4 tree:

1. Enumeration was wrong, this bit people with several soundcards (Abhijit Menon-Sen).
2. Must use semaphore to guard open/close.
3. Old ymfpci locks up if compiled with CONFIG_SMP due to recursive calls to spin_lock_irqsave().
4. Endianness buglet with ''rev'' (same as in ALSA).

Also, The patch removes P3 tagged messages that I do not anticipate to use soon.

More improvements are in my queue (bugs from Pavel Roskin, Simon Higgins, etc.), which I would like to put in later.

Thanks in advance,
--Pete

drivers/sound/ymfpci.h +2 -6
@@ -247,7 +247,7 @@
 };
 
 struct ymf_unit {
-	unsigned int rev;	/* PCI revision */
+	u8 rev;				/* PCI revision */
 	void *reg_area_virt;
 	void *work_ptr;				// +
 
@@ -275,13 +275,13 @@
 	u16 ac97_features;
 
 	struct pci_dev *pci;
-	int inst;		/* Unit number (instance) */
 
 	spinlock_t reg_lock;
 	spinlock_t voice_lock;
 
 	/* soundcore stuff */
 	int dev_audio;
+	struct semaphore open_sem;
 
 	struct list_head ymf_devs;
 	struct ymf_state *states[1];			// *
@@ -331,10 +331,6 @@
 
 struct ymf_state {
 	struct ymf_unit *unit;			/* backpointer */
-
-	/* single open lock mechanism, only used for recording */
-	struct semaphore open_sem;
-	wait_queue_head_t open_wait;
 
 	/* virtual channel number */
 	int virt;				// * unused a.t.m.
drivers/sound/ymfpci.c +38 -45

352 lines not on this page · raw message

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/