Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342606
b: refs/heads/master
c: cba46f1
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Nov 22, 2012
1 parent a556a7e commit 8ff0e50
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 77 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3fdf1469ee7af4367de8f563f69681920844ec95
refs/heads/master: cba46f11cb469ec48b04ec94320b4954ab4d7169
1 change: 1 addition & 0 deletions trunk/sound/pci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ config SND_MAESTRO3_INPUT

config SND_MIXART
tristate "Digigram miXart"
select FW_LOADER
select SND_HWDEP
select SND_PCM
help
Expand Down
76 changes: 0 additions & 76 deletions trunk/sound/pci/mixart/mixart_hwdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,14 +546,6 @@ static int mixart_dsp_load(struct mixart_mgr* mgr, int index, const struct firmw
}


#if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
#if !defined(CONFIG_USE_MIXARTLOADER) && !defined(CONFIG_SND_MIXART) /* built-in kernel */
#define SND_MIXART_FW_LOADER /* use the standard firmware loader */
#endif
#endif

#ifdef SND_MIXART_FW_LOADER

int snd_mixart_setup_firmware(struct mixart_mgr *mgr)
{
static char *fw_files[3] = {
Expand Down Expand Up @@ -583,71 +575,3 @@ int snd_mixart_setup_firmware(struct mixart_mgr *mgr)
MODULE_FIRMWARE("mixart/miXart8.xlx");
MODULE_FIRMWARE("mixart/miXart8.elf");
MODULE_FIRMWARE("mixart/miXart8AES.xlx");

#else /* old style firmware loading */

/* miXart hwdep interface id string */
#define SND_MIXART_HWDEP_ID "miXart Loader"

static int mixart_hwdep_dsp_status(struct snd_hwdep *hw,
struct snd_hwdep_dsp_status *info)
{
struct mixart_mgr *mgr = hw->private_data;

strcpy(info->id, "miXart");
info->num_dsps = MIXART_HARDW_FILES_MAX_INDEX;

if (mgr->dsp_loaded & (1 << MIXART_MOTHERBOARD_ELF_INDEX))
info->chip_ready = 1;

info->version = MIXART_DRIVER_VERSION;
return 0;
}

static int mixart_hwdep_dsp_load(struct snd_hwdep *hw,
struct snd_hwdep_dsp_image *dsp)
{
struct mixart_mgr* mgr = hw->private_data;
struct firmware fw;
int err;

fw.size = dsp->length;
fw.data = vmalloc(dsp->length);
if (! fw.data) {
snd_printk(KERN_ERR "miXart: cannot allocate image size %d\n",
(int)dsp->length);
return -ENOMEM;
}
if (copy_from_user((void *) fw.data, dsp->image, dsp->length)) {
vfree(fw.data);
return -EFAULT;
}
err = mixart_dsp_load(mgr, dsp->index, &fw);
vfree(fw.data);
if (err < 0)
return err;
mgr->dsp_loaded |= 1 << dsp->index;
return err;
}

int snd_mixart_setup_firmware(struct mixart_mgr *mgr)
{
int err;
struct snd_hwdep *hw;

/* only create hwdep interface for first cardX (see "index" module parameter)*/
if ((err = snd_hwdep_new(mgr->chip[0]->card, SND_MIXART_HWDEP_ID, 0, &hw)) < 0)
return err;

hw->iface = SNDRV_HWDEP_IFACE_MIXART;
hw->private_data = mgr;
hw->ops.dsp_status = mixart_hwdep_dsp_status;
hw->ops.dsp_load = mixart_hwdep_dsp_load;
hw->exclusive = 1;
sprintf(hw->name, SND_MIXART_HWDEP_ID);
mgr->dsp_loaded = 0;

return snd_card_register(mgr->chip[0]->card);
}

#endif /* SND_MIXART_FW_LOADER */

0 comments on commit 8ff0e50

Please sign in to comment.