Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  *  Driver for Gravis UltraSound Classic soundcard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include <linux/err.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/isa.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/delay.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <linux/time.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <asm/dma.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include <sound/core.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include <sound/gus.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #define SNDRV_LEGACY_FIND_FREE_IRQ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #define SNDRV_LEGACY_FIND_FREE_DMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #include <sound/initval.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #define CRD_NAME "Gravis UltraSound Classic"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #define DEV_NAME "gusclassic"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) MODULE_DESCRIPTION(CRD_NAME);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) MODULE_LICENSE("GPL");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) MODULE_SUPPORTED_DEVICE("{{Gravis,UltraSound Classic}}");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;	/* Index 0-MAX */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;	/* ID for this card */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE;	/* Enable this card */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) static long port[SNDRV_CARDS] = SNDRV_DEFAULT_PORT;	/* 0x220,0x230,0x240,0x250,0x260 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) static int irq[SNDRV_CARDS] = SNDRV_DEFAULT_IRQ;	/* 3,5,9,11,12,15 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) static int dma1[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) static int dma2[SNDRV_CARDS] = SNDRV_DEFAULT_DMA;	/* 1,3,5,6,7 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) static int joystick_dac[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 29};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 				/* 0 to 31, (0.59V-4.52V or 0.389V-2.98V) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) static int channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 24};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) static int pcm_channels[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) module_param_array(index, int, NULL, 0444);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) MODULE_PARM_DESC(index, "Index value for " CRD_NAME " soundcard.");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) module_param_array(id, charp, NULL, 0444);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) MODULE_PARM_DESC(id, "ID string for " CRD_NAME " soundcard.");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) module_param_array(enable, bool, NULL, 0444);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) MODULE_PARM_DESC(enable, "Enable " CRD_NAME " soundcard.");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) module_param_hw_array(port, long, ioport, NULL, 0444);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) MODULE_PARM_DESC(port, "Port # for " CRD_NAME " driver.");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) module_param_hw_array(irq, int, irq, NULL, 0444);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) MODULE_PARM_DESC(irq, "IRQ # for " CRD_NAME " driver.");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) module_param_hw_array(dma1, int, dma, NULL, 0444);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) MODULE_PARM_DESC(dma1, "DMA1 # for " CRD_NAME " driver.");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) module_param_hw_array(dma2, int, dma, NULL, 0444);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) MODULE_PARM_DESC(dma2, "DMA2 # for " CRD_NAME " driver.");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) module_param_array(joystick_dac, int, NULL, 0444);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) MODULE_PARM_DESC(joystick_dac, "Joystick DAC level 0.59V-4.52V or 0.389V-2.98V for " CRD_NAME " driver.");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) module_param_array(channels, int, NULL, 0444);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) MODULE_PARM_DESC(channels, "GF1 channels for " CRD_NAME " driver.");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) module_param_array(pcm_channels, int, NULL, 0444);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) MODULE_PARM_DESC(pcm_channels, "Reserved PCM channels for " CRD_NAME " driver.");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) static int snd_gusclassic_match(struct device *dev, unsigned int n)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	return enable[n];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) static int snd_gusclassic_create(struct snd_card *card,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 				 struct device *dev, unsigned int n,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 				 struct snd_gus_card **rgus)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	static const long possible_ports[] = {0x220, 0x230, 0x240, 0x250, 0x260};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 	static const int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, 4, -1};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	static const int possible_dmas[] = {5, 6, 7, 1, 3, -1};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	int i, error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	if (irq[n] == SNDRV_AUTO_IRQ) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 		irq[n] = snd_legacy_find_free_irq(possible_irqs);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 		if (irq[n] < 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 			dev_err(dev, "unable to find a free IRQ\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 			return -EBUSY;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 	if (dma1[n] == SNDRV_AUTO_DMA) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 		dma1[n] = snd_legacy_find_free_dma(possible_dmas);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 		if (dma1[n] < 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 			dev_err(dev, "unable to find a free DMA1\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 			return -EBUSY;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	if (dma2[n] == SNDRV_AUTO_DMA) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 		dma2[n] = snd_legacy_find_free_dma(possible_dmas);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 		if (dma2[n] < 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 			dev_err(dev, "unable to find a free DMA2\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 			return -EBUSY;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 		}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	if (port[n] != SNDRV_AUTO_PORT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 		return snd_gus_create(card, port[n], irq[n], dma1[n], dma2[n],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 				0, channels[n], pcm_channels[n], 0, rgus);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	i = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	do {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 		port[n] = possible_ports[i];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 		error = snd_gus_create(card, port[n], irq[n], dma1[n], dma2[n],
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 				0, channels[n], pcm_channels[n], 0, rgus);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	} while (error < 0 && ++i < ARRAY_SIZE(possible_ports));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 	return error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) static int snd_gusclassic_detect(struct snd_gus_card *gus)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	unsigned char d;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 0);	/* reset GF1 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 		snd_printdd("[0x%lx] check 1 failed - 0x%x\n", gus->gf1.port, d);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	udelay(160);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	snd_gf1_i_write8(gus, SNDRV_GF1_GB_RESET, 1);	/* release reset */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	udelay(160);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	if (((d = snd_gf1_i_look8(gus, SNDRV_GF1_GB_RESET)) & 0x07) != 1) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 		snd_printdd("[0x%lx] check 2 failed - 0x%x\n", gus->gf1.port, d);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		return -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) static int snd_gusclassic_probe(struct device *dev, unsigned int n)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	struct snd_card *card;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 	struct snd_gus_card *gus;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 	int error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	error = snd_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	if (error < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		return error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	if (pcm_channels[n] < 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		pcm_channels[n] = 2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	error = snd_gusclassic_create(card, dev, n, &gus);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 	if (error < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 	error = snd_gusclassic_detect(gus);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	if (error < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 	gus->joystick_dac = joystick_dac[n];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	error = snd_gus_initialize(gus);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	if (error < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	error = -ENODEV;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	if (gus->max_flag || gus->ess_flag) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 		dev_err(dev, "GUS Classic or ACE soundcard was "
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 			"not detected at 0x%lx\n", gus->gf1.port);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	error = snd_gf1_new_mixer(gus);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	if (error < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	error = snd_gf1_pcm_new(gus, 0, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	if (error < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	if (!gus->ace_flag) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 		error = snd_gf1_rawmidi_new(gus, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 		if (error < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 			goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	sprintf(card->longname + strlen(card->longname),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 		" at 0x%lx, irq %d, dma %d",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 		gus->gf1.port, gus->gf1.irq, gus->gf1.dma1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	if (gus->gf1.dma2 >= 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 		sprintf(card->longname + strlen(card->longname),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 			"&%d", gus->gf1.dma2);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 	error = snd_card_register(card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	if (error < 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 		goto out;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 	dev_set_drvdata(dev, card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) out:	snd_card_free(card);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	return error;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) static int snd_gusclassic_remove(struct device *dev, unsigned int n)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	snd_card_free(dev_get_drvdata(dev));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) static struct isa_driver snd_gusclassic_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	.match		= snd_gusclassic_match,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	.probe		= snd_gusclassic_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	.remove		= snd_gusclassic_remove,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) #if 0	/* FIXME */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 	.suspend	= snd_gusclassic_suspend,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) 	.remove		= snd_gusclassic_remove,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	.driver		= {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 		.name	= DEV_NAME
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) module_isa_driver(snd_gusclassic_driver, SNDRV_CARDS);