|
@@ -1294,6 +1294,8 @@ static int __init calibrate_adc(WORD srate)
|
|
|
|
|
|
static int upload_dsp_code(void)
|
|
static int upload_dsp_code(void)
|
|
{
|
|
{
|
|
|
|
+ int ret = 0;
|
|
|
|
+
|
|
msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS);
|
|
msnd_outb(HPBLKSEL_0, dev.io + HP_BLKS);
|
|
#ifndef HAVE_DSPCODEH
|
|
#ifndef HAVE_DSPCODEH
|
|
INITCODESIZE = mod_firmware_load(INITCODEFILE, &INITCODE);
|
|
INITCODESIZE = mod_firmware_load(INITCODEFILE, &INITCODE);
|
|
@@ -1312,7 +1314,8 @@ static int upload_dsp_code(void)
|
|
memcpy_toio(dev.base, PERMCODE, PERMCODESIZE);
|
|
memcpy_toio(dev.base, PERMCODE, PERMCODESIZE);
|
|
if (msnd_upload_host(&dev, INITCODE, INITCODESIZE) < 0) {
|
|
if (msnd_upload_host(&dev, INITCODE, INITCODESIZE) < 0) {
|
|
printk(KERN_WARNING LOGNAME ": Error uploading to DSP\n");
|
|
printk(KERN_WARNING LOGNAME ": Error uploading to DSP\n");
|
|
- return -ENODEV;
|
|
|
|
|
|
+ ret = -ENODEV;
|
|
|
|
+ goto out;
|
|
}
|
|
}
|
|
#ifdef HAVE_DSPCODEH
|
|
#ifdef HAVE_DSPCODEH
|
|
printk(KERN_INFO LOGNAME ": DSP firmware uploaded (resident)\n");
|
|
printk(KERN_INFO LOGNAME ": DSP firmware uploaded (resident)\n");
|
|
@@ -1320,12 +1323,13 @@ static int upload_dsp_code(void)
|
|
printk(KERN_INFO LOGNAME ": DSP firmware uploaded\n");
|
|
printk(KERN_INFO LOGNAME ": DSP firmware uploaded\n");
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+out:
|
|
#ifndef HAVE_DSPCODEH
|
|
#ifndef HAVE_DSPCODEH
|
|
vfree(INITCODE);
|
|
vfree(INITCODE);
|
|
vfree(PERMCODE);
|
|
vfree(PERMCODE);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- return 0;
|
|
|
|
|
|
+ return ret;
|
|
}
|
|
}
|
|
|
|
|
|
#ifdef MSND_CLASSIC
|
|
#ifdef MSND_CLASSIC
|