Skip to contentSkip to conversation

ALSA Harmony bugfixes

PATCH New Stuart Brady 1 participant 1 message Aug 27, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA Harmony bugfixes

Two patches for the ALSA Harmony driver:

One fixes a crash when reloading the ALSA Harmony driver. The other is a minor cleanup for formats/rates.

sound/parisc/harmony.c +3 -1
@@ -1111,11 +1111,13 @@
 		{	
 			DPRINTK(KERN_INFO PFX "Freeing card %d\n", idx);
 			harmony = snd_harmony_cards[idx]->private_data;
-			free_irq(harmony->irq, snd_card_harmony_interrupt);
+			free_irq(harmony->irq, harmony);
 			printk(KERN_INFO PFX "Card unloaded %d, irq=%d\n", idx, harmony->irq);
 			snd_card_free(snd_harmony_cards[idx]);
 		}
 	}	
+	if (unregister_parisc_driver(&snd_card_harmony_driver) < 0)
+		printk(KERN_ERR "Failed to unregister Harmony driver\n");
 }
 
 module_init(alsa_card_harmony_init)
sound/parisc/harmony.c +4 -4
@@ -283,7 +283,7 @@
 {
 	unsigned int idx;
 	
-	for (idx = 0; idx <= RATES; idx++)
+	for (idx = 0; idx < RATES; idx++)
 		if (snd_card_harmony_rates[idx] == rate)
 			return rate_bits[idx];
 	return HARMONY_SR_44KHZ; /* fallback */
@@ -648,10 +648,10 @@
 					SNDRV_PCM_INFO_JOINT_DUPLEX | 
 					SNDRV_PCM_INFO_MMAP_VALID |
 					SNDRV_PCM_INFO_BLOCK_TRANSFER),
-	.formats =		(SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_BE | 
-					SNDRV_PCM_FMTBIT_A_LAW | SNDRV_PCM_FMTBIT_MU_LAW),
+	.formats =		(SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW |
+					SNDRV_PCM_FMTBIT_S16_BE),
 	.rates =		SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
-	.rate_min =		5500,
+	.rate_min =		5125,
 	.rate_max =		48000,
 	.channels_min =		1,
 	.channels_max =		2,
Signature · 5 lines
Stuart Brady
_______________________________________________
parisc-linux mailing list
[email protected]
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux