26 #include <linux/slab.h>
28 #include <linux/module.h>
40 #define BUSY_LOOPS 100000
55 snd_printd(
"%s [0x%lx]: timeout (0x%x)\n", __func__, chip->
port, val);
95 static int snd_sbdsp_version(
struct snd_sb *
chip)
105 static int snd_sbdsp_probe(
struct snd_sb * chip)
118 spin_unlock_irqrestore(&chip->
reg_lock, flags);
121 version = snd_sbdsp_version(chip);
123 spin_unlock_irqrestore(&chip->
reg_lock, flags);
126 spin_unlock_irqrestore(&chip->
reg_lock, flags);
127 major = version >> 8;
128 minor = version & 0xff;
129 snd_printdd(
"SB [0x%lx]: DSP chip found, version = %i.%i\n",
130 chip->
port, major, minor);
158 chip->
port, major, minor);
163 str =
"16 (ALS-100)";
166 str =
"16 (ALS-4000)";
169 str =
"(DT019X/ALS007)";
175 str =
"Pro (Jazz16)";
181 chip->
version = (major << 8) | minor;
185 static int snd_sbdsp_free(
struct snd_sb *chip)
192 if (chip->
dma8 >= 0) {
208 return snd_sbdsp_free(chip);
245 "SoundBlaster", (
void *) chip)) {
247 snd_sbdsp_free(chip);
253 goto __skip_allocation;
257 snd_sbdsp_free(chip);
262 if (dma8 >= 0 &&
request_dma(dma8,
"SoundBlaster - 8bit")) {
264 snd_sbdsp_free(chip);
269 if (hardware !=
SB_HW_ALS100 && (dma16 < 5 || dma16 > 7)) {
272 }
else if (
request_dma(dma16,
"SoundBlaster - 16bit")) {
274 snd_sbdsp_free(chip);
284 if ((err = snd_sbdsp_probe(chip)) < 0) {
285 snd_sbdsp_free(chip);
289 snd_sbdsp_free(chip);
314 static int __init alsa_sb_common_init(
void)
319 static void __exit alsa_sb_common_exit(
void)