ChangeSet 1.2181.25.30, 2005/03/22 09:14:43+01:00, [EMAIL PROTECTED]

        [ALSA] fix bug with pci hotplug mode
        
        MIXART driver
        Fix the Oops with hotplug fw loader.
        (Theis fix is missing in the last commit to mixart.c accidentally.)
        
        Signed-off-by: Markus Bollinger <[EMAIL PROTECTED]>
        Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>



 mixart.h       |    2 +-
 mixart_hwdep.c |    9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)


diff -Nru a/sound/pci/mixart/mixart.h b/sound/pci/mixart/mixart.h
--- a/sound/pci/mixart/mixart.h 2005-03-30 16:15:35 -08:00
+++ b/sound/pci/mixart/mixart.h 2005-03-30 16:15:35 -08:00
@@ -112,7 +112,7 @@
        struct semaphore setup_mutex; /* mutex used in hw_params, open and 
close */
 
        /* hardware interface */
-       snd_hwdep_t *hwdep;
+       unsigned int dsp_loaded;      /* bit flags of loaded dsp indices */
        unsigned int board_type;      /* read from embedded once elf file is 
loaded, 250 = miXart8, 251 = with AES, 252 = with Cobranet */
 
        struct snd_dma_buffer flowinfo;
diff -Nru a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c
--- a/sound/pci/mixart/mixart_hwdep.c   2005-03-30 16:15:35 -08:00
+++ b/sound/pci/mixart/mixart_hwdep.c   2005-03-30 16:15:35 -08:00
@@ -546,6 +546,7 @@
                release_firmware(fw_entry);
                if (err < 0)
                        return err;
+               mgr->dsp_loaded |= 1 << i;
        }
        return 0;
 }
@@ -573,7 +574,7 @@
        strcpy(info->id, "miXart");
         info->num_dsps = MIXART_HARDW_FILES_MAX_INDEX;
 
-       if (mgr->hwdep->dsp_loaded & (1 <<  MIXART_MOTHERBOARD_ELF_INDEX))
+       if (mgr->dsp_loaded & (1 <<  MIXART_MOTHERBOARD_ELF_INDEX))
                info->chip_ready = 1;
 
        info->version = MIXART_DRIVER_VERSION;
@@ -599,6 +600,9 @@
        }
        err = mixart_dsp_load(mgr, dsp->index, &fw);
        vfree(fw.data);
+       if (err < 0)
+               return err;
+       mgr->dsp_loaded |= 1 << dsp->index;
        return err;
 }
 
@@ -619,8 +623,7 @@
        hw->ops.dsp_load = mixart_hwdep_dsp_load;
        hw->exclusive = 1;
        sprintf(hw->name,  SND_MIXART_HWDEP_ID);
-       mgr->hwdep = hw;
-       mgr->hwdep->dsp_loaded = 0;
+       mgr->dsp_loaded = 0;
 
        return snd_card_register(mgr->chip[0]->card);
 }
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to