diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 11:51:23 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-13 11:51:23 -0800 |
commit | 046e7d685bc370fd4c879ab6635ad3f69e6673d1 (patch) | |
tree | 36b981f8d1f2bfd348c1479acbe3a9426d35c377 /sound/drivers | |
parent | fe504c5c745aeb767d978fbedeb94775fd4cb69c (diff) | |
parent | 6eb827d23577a4efec2b10a9c4cc9ded268a1d1c (diff) |
Merge tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"This update contains a fairly wide range of changes all over in sound
subdirectory, mainly because of UAPI header moves by David and __dev*
annotation removals by Bill. Other highlights are:
- Introduced the support for wallclock timestamps in ALSA PCM core
- Add the poll loop implementation for HD-audio jack detection
- Yet more VGA-switcheroo fixes for HD-audio
- New VIA HD-audio codec support
- More fixes on resource management in USB audio and MIDI drivers
- More quirks for USB-audio ASUS Xonar U3, Reloop Play, Focusrite,
Roland VG-99, etc
- Add support for FastTrack C400 usb-audio
- Clean ups in many drivers regarding firmware loading
- Add PSC724 Ultiimate Edge support to ice1712
- A few hdspm driver updates
- New Stanton SCS.1d/1m FireWire driver
- Standardisation of the logging in ASoC codes
- DT and dmaengine support for ASoC Atmel
- Support for Wolfson ADSP cores
- New drivers for Freescale/iVeia P1022 and Maxim MAX98090
- Lots of other ASoC driver fixes and developments"
Fix up trivial conflicts. And go out on a limb and assume the dts file
'status' field of one of the conflicting things was supposed to be
"disabled", not "disable" like in pretty much all other cases.
* tag 'sound-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (341 commits)
ALSA: hda - Move runtime PM check to runtime_idle callback
ALSA: hda - Add stereo-dmic fixup for Acer Aspire One 522
ALSA: hda - Avoid doubly suspend after vga switcheroo
ALSA: usb-audio: Enable S/PDIF on the ASUS Xonar U3
ALSA: hda - Check validity of CORB/RIRB WP reads
ALSA: hda - use usleep_range in link reset and change timeout check
ALSA: HDA: VIA: Add support for codec VT1808.
ALSA: HDA: VIA Add support for codec VT1705CF.
ASoC: codecs: remove __dev* attributes
ASoC: utils: remove __dev* attributes
ASoC: ux500: remove __dev* attributes
ASoC: txx9: remove __dev* attributes
ASoC: tegra: remove __dev* attributes
ASoC: spear: remove __dev* attributes
ASoC: sh: remove __dev* attributes
ASoC: s6000: remove __dev* attributes
ASoC: OMAP: remove __dev* attributes
ASoC: nuc900: remove __dev* attributes
ASoC: mxs: remove __dev* attributes
ASoC: kirkwood: remove __dev* attributes
...
Diffstat (limited to 'sound/drivers')
-rw-r--r-- | sound/drivers/Kconfig | 2 | ||||
-rw-r--r-- | sound/drivers/aloop.c | 52 | ||||
-rw-r--r-- | sound/drivers/dummy.c | 87 | ||||
-rw-r--r-- | sound/drivers/ml403-ac97cr.c | 10 | ||||
-rw-r--r-- | sound/drivers/mpu401/mpu401.c | 18 | ||||
-rw-r--r-- | sound/drivers/mtpav.c | 14 | ||||
-rw-r--r-- | sound/drivers/mts64.c | 40 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp.c | 14 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp_input.c | 2 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp_input.h | 2 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp_lib.c | 2 | ||||
-rw-r--r-- | sound/drivers/pcsp/pcsp_mixer.c | 10 | ||||
-rw-r--r-- | sound/drivers/portman2x4.c | 18 | ||||
-rw-r--r-- | sound/drivers/serial-u16550.c | 32 | ||||
-rw-r--r-- | sound/drivers/virmidi.c | 6 | ||||
-rw-r--r-- | sound/drivers/vx/vx_hwdep.c | 139 |
16 files changed, 190 insertions, 258 deletions
diff --git a/sound/drivers/Kconfig b/sound/drivers/Kconfig index fe5ae09ffccb..7d02c322ed93 100644 --- a/sound/drivers/Kconfig +++ b/sound/drivers/Kconfig @@ -14,6 +14,7 @@ config SND_OPL4_LIB config SND_VX_LIB tristate + select FW_LOADER select SND_HWDEP select SND_PCM @@ -35,7 +36,6 @@ config SND_PCSP tristate "PC-Speaker support (READ HELP!)" depends on PCSPKR_PLATFORM && X86 && HIGH_RES_TIMERS depends on INPUT - depends on EXPERIMENTAL select SND_PCM help If you don't have a sound card in your computer, you can include a diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index 0fe6d64ff840..3d822328d383 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c @@ -120,7 +120,6 @@ struct loopback_pcm { unsigned int last_drift; unsigned long last_jiffies; struct timer_list timer; - spinlock_t timer_lock; }; static struct platform_device *devices[SNDRV_CARDS]; @@ -166,12 +165,12 @@ static inline unsigned int get_rate_shift(struct loopback_pcm *dpcm) return get_setup(dpcm)->rate_shift; } +/* call in cable->lock */ static void loopback_timer_start(struct loopback_pcm *dpcm) { unsigned long tick; unsigned int rate_shift = get_rate_shift(dpcm); - spin_lock(&dpcm->timer_lock); if (rate_shift != dpcm->pcm_rate_shift) { dpcm->pcm_rate_shift = rate_shift; dpcm->period_size_frac = frac_pos(dpcm, dpcm->pcm_period_size); @@ -184,15 +183,13 @@ static void loopback_timer_start(struct loopback_pcm *dpcm) tick = (tick + dpcm->pcm_bps - 1) / dpcm->pcm_bps; dpcm->timer.expires = jiffies + tick; add_timer(&dpcm->timer); - spin_unlock(&dpcm->timer_lock); } +/* call in cable->lock */ static inline void loopback_timer_stop(struct loopback_pcm *dpcm) { - spin_lock(&dpcm->timer_lock); del_timer(&dpcm->timer); dpcm->timer.expires = 0; - spin_unlock(&dpcm->timer_lock); } #define CABLE_VALID_PLAYBACK (1 << SNDRV_PCM_STREAM_PLAYBACK) @@ -274,8 +271,8 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd) spin_lock(&cable->lock); cable->running |= stream; cable->pause &= ~stream; - spin_unlock(&cable->lock); loopback_timer_start(dpcm); + spin_unlock(&cable->lock); if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) loopback_active_notify(dpcm); break; @@ -283,23 +280,23 @@ static int loopback_trigger(struct snd_pcm_substream *substream, int cmd) spin_lock(&cable->lock); cable->running &= ~stream; cable->pause &= ~stream; - spin_unlock(&cable->lock); loopback_timer_stop(dpcm); + spin_unlock(&cable->lock); if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) loopback_active_notify(dpcm); break; case SNDRV_PCM_TRIGGER_PAUSE_PUSH: spin_lock(&cable->lock); cable->pause |= stream; - spin_unlock(&cable->lock); loopback_timer_stop(dpcm); + spin_unlock(&cable->lock); break; case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: spin_lock(&cable->lock); dpcm->last_jiffies = jiffies; cable->pause &= ~stream; - spin_unlock(&cable->lock); loopback_timer_start(dpcm); + spin_unlock(&cable->lock); break; default: return -EINVAL; @@ -477,6 +474,7 @@ static inline void bytepos_finish(struct loopback_pcm *dpcm, dpcm->buf_pos %= dpcm->pcm_buffer_size; } +/* call in cable->lock */ static unsigned int loopback_pos_update(struct loopback_cable *cable) { struct loopback_pcm *dpcm_play = @@ -485,9 +483,7 @@ static unsigned int loopback_pos_update(struct loopback_cable *cable) cable->streams[SNDRV_PCM_STREAM_CAPTURE]; unsigned long delta_play = 0, delta_capt = 0; unsigned int running, count1, count2; - unsigned long flags; - spin_lock_irqsave(&cable->lock, flags); running = cable->running ^ cable->pause; if (running & (1 << SNDRV_PCM_STREAM_PLAYBACK)) { delta_play = jiffies - dpcm_play->last_jiffies; @@ -529,32 +525,39 @@ static unsigned int loopback_pos_update(struct loopback_cable *cable) bytepos_finish(dpcm_play, count1); bytepos_finish(dpcm_capt, count1); unlock: - spin_unlock_irqrestore(&cable->lock, flags); return running; } static void loopback_timer_function(unsigned long data) { struct loopback_pcm *dpcm = (struct loopback_pcm *)data; - unsigned int running; + unsigned long flags; - running = loopback_pos_update(dpcm->cable); - if (running & (1 << dpcm->substream->stream)) { + spin_lock_irqsave(&dpcm->cable->lock, flags); + if (loopback_pos_update(dpcm->cable) & (1 << dpcm->substream->stream)) { loopback_timer_start(dpcm); if (dpcm->period_update_pending) { dpcm->period_update_pending = 0; + spin_unlock_irqrestore(&dpcm->cable->lock, flags); + /* need to unlock before calling below */ snd_pcm_period_elapsed(dpcm->substream); + return; } } + spin_unlock_irqrestore(&dpcm->cable->lock, flags); } static snd_pcm_uframes_t loopback_pointer(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct loopback_pcm *dpcm = runtime->private_data; + snd_pcm_uframes_t pos; + spin_lock(&dpcm->cable->lock); loopback_pos_update(dpcm->cable); - return bytes_to_frames(runtime, dpcm->buf_pos); + pos = dpcm->buf_pos; + spin_unlock(&dpcm->cable->lock); + return bytes_to_frames(runtime, pos); } static struct snd_pcm_hardware loopback_pcm_hardware = @@ -672,7 +675,6 @@ static int loopback_open(struct snd_pcm_substream *substream) dpcm->substream = substream; setup_timer(&dpcm->timer, loopback_timer_function, (unsigned long)dpcm); - spin_lock_init(&dpcm->timer_lock); cable = loopback->cables[substream->number][dev]; if (!cable) { @@ -772,8 +774,8 @@ static struct snd_pcm_ops loopback_capture_ops = { .mmap = snd_pcm_lib_mmap_vmalloc, }; -static int __devinit loopback_pcm_new(struct loopback *loopback, - int device, int substreams) +static int loopback_pcm_new(struct loopback *loopback, + int device, int substreams) { struct snd_pcm *pcm; int err; @@ -947,7 +949,7 @@ static int loopback_channels_get(struct snd_kcontrol *kcontrol, return 0; } -static struct snd_kcontrol_new loopback_controls[] __devinitdata = { +static struct snd_kcontrol_new loopback_controls[] = { { .iface = SNDRV_CTL_ELEM_IFACE_PCM, .name = "PCM Rate Shift 100000", @@ -996,7 +998,7 @@ static struct snd_kcontrol_new loopback_controls[] __devinitdata = { } }; -static int __devinit loopback_mixer_new(struct loopback *loopback, int notify) +static int loopback_mixer_new(struct loopback *loopback, int notify) { struct snd_card *card = loopback->card; struct snd_pcm *pcm; @@ -1109,7 +1111,7 @@ static void print_cable_info(struct snd_info_entry *entry, mutex_unlock(&loopback->cable_lock); } -static int __devinit loopback_proc_new(struct loopback *loopback, int cidx) +static int loopback_proc_new(struct loopback *loopback, int cidx) { char name[32]; struct snd_info_entry *entry; @@ -1130,7 +1132,7 @@ static int __devinit loopback_proc_new(struct loopback *loopback, int cidx) #endif -static int __devinit loopback_probe(struct platform_device *devptr) +static int loopback_probe(struct platform_device *devptr) { struct snd_card *card; struct loopback *loopback; @@ -1175,7 +1177,7 @@ static int __devinit loopback_probe(struct platform_device *devptr) return err; } -static int __devexit loopback_remove(struct platform_device *devptr) +static int loopback_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); platform_set_drvdata(devptr, NULL); @@ -1213,7 +1215,7 @@ static SIMPLE_DEV_PM_OPS(loopback_pm, loopback_suspend, loopback_resume); static struct platform_driver loopback_driver = { .probe = loopback_probe, - .remove = __devexit_p(loopback_remove), + .remove = loopback_remove, .driver = { .name = SND_LOOPBACK_DRIVER, .owner = THIS_MODULE, diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 54bb6644a598..fd798f753609 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -134,6 +134,9 @@ struct snd_dummy { spinlock_t mixer_lock; int mixer_volume[MIXER_ADDR_LAST+1][2]; int capture_source[MIXER_ADDR_LAST+1][2]; + int iobox; + struct snd_kcontrol *cd_volume_ctl; + struct snd_kcontrol *cd_switch_ctl; const struct dummy_timer_ops *timer_ops; }; @@ -685,8 +688,8 @@ static struct snd_pcm_ops dummy_pcm_ops_no_buf = { .page = dummy_pcm_page, }; -static int __devinit snd_card_dummy_pcm(struct snd_dummy *dummy, int device, - int substreams) +static int snd_card_dummy_pcm(struct snd_dummy *dummy, int device, + int substreams) { struct snd_pcm *pcm; struct snd_pcm_ops *ops; @@ -817,6 +820,57 @@ static int snd_dummy_capsrc_put(struct snd_kcontrol *kcontrol, struct snd_ctl_el return change; } +static int snd_dummy_iobox_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *info) +{ + const char *const names[] = { "None", "CD Player" }; + + return snd_ctl_enum_info(info, 1, 2, names); +} + +static int snd_dummy_iobox_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *value) +{ + struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol); + + value->value.enumerated.item[0] = dummy->iobox; + return 0; +} + +static int snd_dummy_iobox_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *value) +{ + struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol); + int changed; + + if (value->value.enumerated.item[0] > 1) + return -EINVAL; + + changed = value->value.enumerated.item[0] != dummy->iobox; + if (changed) { + dummy->iobox = value->value.enumerated.item[0]; + + if (dummy->iobox) { + dummy->cd_volume_ctl->vd[0].access &= + ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; + dummy->cd_switch_ctl->vd[0].access &= + ~SNDRV_CTL_ELEM_ACCESS_INACTIVE; + } else { + dummy->cd_volume_ctl->vd[0].access |= + SNDRV_CTL_ELEM_ACCESS_INACTIVE; + dummy->cd_switch_ctl->vd[0].access |= + SNDRV_CTL_ELEM_ACCESS_INACTIVE; + } + + snd_ctl_notify(dummy->card, SNDRV_CTL_EVENT_MASK_INFO, + &dummy->cd_volume_ctl->id); + snd_ctl_notify(dummy->card, SNDRV_CTL_EVENT_MASK_INFO, + &dummy->cd_switch_ctl->id); + } + + return changed; +} + static struct snd_kcontrol_new snd_dummy_controls[] = { DUMMY_VOLUME("Master Volume", 0, MIXER_ADDR_MASTER), DUMMY_CAPSRC("Master Capture Switch", 0, MIXER_ADDR_MASTER), @@ -827,22 +881,37 @@ DUMMY_CAPSRC("Line Capture Switch", 0, MIXER_ADDR_LINE), DUMMY_VOLUME("Mic Volume", 0, MIXER_ADDR_MIC), DUMMY_CAPSRC("Mic Capture Switch", 0, MIXER_ADDR_MIC), DUMMY_VOLUME("CD Volume", 0, MIXER_ADDR_CD), -DUMMY_CAPSRC("CD Capture Switch", 0, MIXER_ADDR_CD) +DUMMY_CAPSRC("CD Capture Switch", 0, MIXER_ADDR_CD), +{ + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "External I/O Box", + .info = snd_dummy_iobox_info, + .get = snd_dummy_iobox_get, + .put = snd_dummy_iobox_put, +}, }; -static int __devinit snd_card_dummy_new_mixer(struct snd_dummy *dummy) +static int snd_card_dummy_new_mixer(struct snd_dummy *dummy) { struct snd_card *card = dummy->card; + struct snd_kcontrol *kcontrol; unsigned int idx; int err; spin_lock_init(&dummy->mixer_lock); strcpy(card->mixername, "Dummy Mixer"); + dummy->iobox = 1; for (idx = 0; idx < ARRAY_SIZE(snd_dummy_controls); idx++) { - err = snd_ctl_add(card, snd_ctl_new1(&snd_dummy_controls[idx], dummy)); + kcontrol = snd_ctl_new1(&snd_dummy_controls[idx], dummy); + err = snd_ctl_add(card, kcontrol); if (err < 0) return err; + if (!strcmp(kcontrol->id.name, "CD Volume")) + dummy->cd_volume_ctl = kcontrol; + else if (!strcmp(kcontrol->id.name, "CD Capture Switch")) + dummy->cd_switch_ctl = kcontrol; + } return 0; } @@ -962,7 +1031,7 @@ static void dummy_proc_write(struct snd_info_entry *entry, } } -static void __devinit dummy_proc_init(struct snd_dummy *chip) +static void dummy_proc_init(struct snd_dummy *chip) { struct snd_info_entry *entry; @@ -977,7 +1046,7 @@ static void __devinit dummy_proc_init(struct snd_dummy *chip) #define dummy_proc_init(x) #endif /* CONFIG_SND_DEBUG && CONFIG_PROC_FS */ -static int __devinit snd_dummy_probe(struct platform_device *devptr) +static int snd_dummy_probe(struct platform_device *devptr) { struct snd_card *card; struct snd_dummy *dummy; @@ -1057,7 +1126,7 @@ static int __devinit snd_dummy_probe(struct platform_device *devptr) return err; } -static int __devexit snd_dummy_remove(struct platform_device *devptr) +static int snd_dummy_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); platform_set_drvdata(devptr, NULL); @@ -1093,7 +1162,7 @@ static SIMPLE_DEV_PM_OPS(snd_dummy_pm, snd_dummy_suspend, snd_dummy_resume); static struct platform_driver snd_dummy_driver = { .probe = snd_dummy_probe, - .remove = __devexit_p(snd_dummy_remove), + .remove = snd_dummy_remove, .driver = { .name = SND_DUMMY_DRIVER, .owner = THIS_MODULE, diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c index 6c83b1aed288..8125a7e95ee4 100644 --- a/sound/drivers/ml403-ac97cr.c +++ b/sound/drivers/ml403-ac97cr.c @@ -1063,7 +1063,7 @@ snd_ml403_ac97cr_codec_write(struct snd_ac97 *ac97, unsigned short reg, return; } -static int __devinit +static int snd_ml403_ac97cr_chip_init(struct snd_ml403_ac97cr *ml403_ac97cr) { unsigned long end_time; @@ -1108,7 +1108,7 @@ static int snd_ml403_ac97cr_dev_free(struct snd_device *snddev) return snd_ml403_ac97cr_free(ml403_ac97cr); } -static int __devinit +static int snd_ml403_ac97cr_create(struct snd_card *card, struct platform_device *pfdev, struct snd_ml403_ac97cr **rml403_ac97cr) { @@ -1204,7 +1204,7 @@ static void snd_ml403_ac97cr_mixer_free(struct snd_ac97 *ac97) PDEBUG(INIT_INFO, "mixer_free(): (done)\n"); } -static int __devinit +static int snd_ml403_ac97cr_mixer(struct snd_ml403_ac97cr *ml403_ac97cr) { struct snd_ac97_bus *bus; @@ -1237,7 +1237,7 @@ snd_ml403_ac97cr_mixer(struct snd_ml403_ac97cr *ml403_ac97cr) return err; } -static int __devinit +static int snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device, struct snd_pcm **rpcm) { @@ -1268,7 +1268,7 @@ snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device, return 0; } -static int __devinit snd_ml403_ac97cr_probe(struct platform_device *pfdev) +static int snd_ml403_ac97cr_probe(struct platform_device *pfdev) { struct snd_card *card; struct snd_ml403_ac97cr *ml403_ac97cr = NULL; diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c index bc03a2046c9c..da1a29bfc85d 100644 --- a/sound/drivers/mpu401/mpu401.c +++ b/sound/drivers/mpu401/mpu401.c @@ -100,7 +100,7 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard) return err; } -static int __devinit snd_mpu401_probe(struct platform_device *devptr) +static int snd_mpu401_probe(struct platform_device *devptr) { int dev = devptr->id; int err; @@ -126,7 +126,7 @@ static int __devinit snd_mpu401_probe(struct platform_device *devptr) return 0; } -static int __devexit snd_mpu401_remove(struct platform_device *devptr) +static int snd_mpu401_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); platform_set_drvdata(devptr, NULL); @@ -137,7 +137,7 @@ static int __devexit snd_mpu401_remove(struct platform_device *devptr) static struct platform_driver snd_mpu401_driver = { .probe = snd_mpu401_probe, - .remove = __devexit_p(snd_mpu401_remove), + .remove = snd_mpu401_remove, .driver = { .name = SND_MPU401_DRIVER, .owner = THIS_MODULE, @@ -156,8 +156,8 @@ static struct pnp_device_id snd_mpu401_pnpids[] = { MODULE_DEVICE_TABLE(pnp, snd_mpu401_pnpids); -static int __devinit snd_mpu401_pnp(int dev, struct pnp_dev *device, - const struct pnp_device_id *id) +static int snd_mpu401_pnp(int dev, struct pnp_dev *device, + const struct pnp_device_id *id) { if (!pnp_port_valid(device, 0) || pnp_port_flags(device, 0) & IORESOURCE_DISABLED) { @@ -182,8 +182,8 @@ static int __devinit snd_mpu401_pnp(int dev, struct pnp_dev *device, return 0; } -static int __devinit snd_mpu401_pnp_probe(struct pnp_dev *pnp_dev, - const struct pnp_device_id *id) +static int snd_mpu401_pnp_probe(struct pnp_dev *pnp_dev, + const struct pnp_device_id *id) { static int dev; struct snd_card *card; @@ -211,7 +211,7 @@ static int __devinit snd_mpu401_pnp_probe(struct pnp_dev *pnp_dev, return -ENODEV; } -static void __devexit snd_mpu401_pnp_remove(struct pnp_dev *dev) +static void snd_mpu401_pnp_remove(struct pnp_dev *dev) { struct snd_card *card = (struct snd_card *) pnp_get_drvdata(dev); @@ -223,7 +223,7 @@ static struct pnp_driver snd_mpu401_pnp_driver = { .name = "mpu401", .id_table = snd_mpu401_pnpids, .probe = snd_mpu401_pnp_probe, - .remove = __devexit_p(snd_mpu401_pnp_remove), + .remove = snd_mpu401_pnp_remove, }; #else static struct pnp_driver snd_mpu401_pnp_driver; diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c index cad73af3860c..9f1815b99a15 100644 --- a/sound/drivers/mtpav.c +++ b/sound/drivers/mtpav.c @@ -583,7 +583,7 @@ static irqreturn_t snd_mtpav_irqh(int irq, void *dev_id) /* * get ISA resources */ -static int __devinit snd_mtpav_get_ISA(struct mtpav * mcard) +static int snd_mtpav_get_ISA(struct mtpav *mcard) { if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) { snd_printk(KERN_ERR "MTVAP port 0x%lx is busy\n", port); @@ -619,8 +619,8 @@ static struct snd_rawmidi_ops snd_mtpav_input = { * get RAWMIDI resources */ -static void __devinit snd_mtpav_set_name(struct mtpav *chip, - struct snd_rawmidi_substream *substream) +static void snd_mtpav_set_name(struct mtpav *chip, + struct snd_rawmidi_substream *substream) { if (substream->number >= 0 && substream->number < chip->num_ports) sprintf(substream->name, "MTP direct %d", (substream->number % chip->num_ports) + 1); @@ -634,7 +634,7 @@ static void __devinit snd_mtpav_set_name(struct mtpav *chip, strcpy(substream->name, "MTP broadcast"); } -static int __devinit snd_mtpav_get_RAWMIDI(struct mtpav *mcard) +static int snd_mtpav_get_RAWMIDI(struct mtpav *mcard) { int rval; struct snd_rawmidi *rawmidi; @@ -691,7 +691,7 @@ static void snd_mtpav_free(struct snd_card *card) /* */ -static int __devinit snd_mtpav_probe(struct platform_device *dev) +static int snd_mtpav_probe(struct platform_device *dev) { struct snd_card *card; int err; @@ -746,7 +746,7 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev) return err; } -static int __devexit snd_mtpav_remove(struct platform_device *devptr) +static int snd_mtpav_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); platform_set_drvdata(devptr, NULL); @@ -757,7 +757,7 @@ static int __devexit snd_mtpav_remove(struct platform_device *devptr) static struct platform_driver snd_mtpav_driver = { .probe = snd_mtpav_probe, - .remove = __devexit_p(snd_mtpav_remove), + .remove = snd_mtpav_remove, .driver = { .name = SND_MTPAV_DRIVER, .owner = THIS_MODULE, diff --git a/sound/drivers/mts64.c b/sound/drivers/mts64.c index 2d5514b0a290..4e0dd22ba08e 100644 --- a/sound/drivers/mts64.c +++ b/sound/drivers/mts64.c @@ -83,9 +83,9 @@ static int snd_mts64_free(struct mts64 *mts) return 0; } -static int __devinit snd_mts64_create(struct snd_card *card, - struct pardevice *pardev, - struct mts64 **rchip) +static int snd_mts64_create(struct snd_card *card, + struct pardevice *pardev, + struct mts64 **rchip) { struct mts64 *mts; @@ -214,7 +214,7 @@ static int mts64_device_ready(struct parport *p) * 0 init ok * -EIO failure */ -static int __devinit mts64_device_init(struct parport *p) +static int mts64_device_init(struct parport *p) { int i; @@ -290,7 +290,7 @@ static u8 mts64_map_midi_input(u8 c) * 0 device found * -ENODEV no device */ -static int __devinit mts64_probe(struct parport *p) +static int mts64_probe(struct parport *p) { u8 c; @@ -483,7 +483,7 @@ __out: return changed; } -static struct snd_kcontrol_new mts64_ctl_smpte_switch __devinitdata = { +static struct snd_kcontrol_new mts64_ctl_smpte_switch = { .iface = SNDRV_CTL_ELEM_IFACE_RAWMIDI, .name = "SMPTE Playback Switch", .index = 0, @@ -556,7 +556,7 @@ static int snd_mts64_ctl_smpte_time_put(struct snd_kcontrol *kctl, return changed; } -static struct snd_kcontrol_new mts64_ctl_smpte_time_hours __devinitdata = { +static struct snd_kcontrol_new mts64_ctl_smpte_time_hours = { .iface = SNDRV_CTL_ELEM_IFACE_RAWMIDI, .name = "SMPTE Time Hours", .index = 0, @@ -567,7 +567,7 @@ static struct snd_kcontrol_new mts64_ctl_smpte_time_hours __devinitdata = { .put = snd_mts64_ctl_smpte_time_put }; -static struct snd_kcontrol_new mts64_ctl_smpte_time_minutes __devinitdata = { +static struct snd_kcontrol_new mts64_ctl_smpte_time_minutes = { .iface = SNDRV_CTL_ELEM_IFACE_RAWMIDI, .name = "SMPTE Time Minutes", .index = 0, @@ -578,7 +578,7 @@ static struct snd_kcontrol_new mts64_ctl_smpte_time_minutes __devinitdata = { .put = snd_mts64_ctl_smpte_time_put }; -static struct snd_kcontrol_new mts64_ctl_smpte_time_seconds __devinitdata = { +static struct snd_kcontrol_new mts64_ctl_smpte_time_seconds = { .iface = SNDRV_CTL_ELEM_IFACE_RAWMIDI, .name = "SMPTE Time Seconds", .index = 0, @@ -589,7 +589,7 @@ static struct snd_kcontrol_new mts64_ctl_smpte_time_seconds __devinitdata = { .put = snd_mts64_ctl_smpte_time_put }; -static struct snd_kcontrol_new mts64_ctl_smpte_time_frames __devinitdata = { +static struct snd_kcontrol_new mts64_ctl_smpte_time_frames = { .iface = SNDRV_CTL_ELEM_IFACE_RAWMIDI, .name = "SMPTE Time Frames", .index = 0, @@ -651,7 +651,7 @@ static int snd_mts64_ctl_smpte_fps_put(struct snd_kcontrol *kctl, return changed; } -static struct snd_kcontrol_new mts64_ctl_smpte_fps __devinitdata = { +static struct snd_kcontrol_new mts64_ctl_smpte_fps = { .iface = SNDRV_CTL_ELEM_IFACE_RAWMIDI, .name = "SMPTE Fps", .index = 0, @@ -663,11 +663,11 @@ static struct snd_kcontrol_new mts64_ctl_smpte_fps __devinitdata = { }; -static int __devinit snd_mts64_ctl_create(struct snd_card *card, - struct mts64 *mts) +static int snd_mts64_ctl_create(struct snd_card *card, + struct mts64 *mts) { int err, i; - static struct snd_kcontrol_new *control[] __devinitdata = { + static struct snd_kcontrol_new *control[] = { &mts64_ctl_smpte_switch, &mts64_ctl_smpte_time_hours, &mts64_ctl_smpte_time_minutes, @@ -774,7 +774,7 @@ static struct snd_rawmidi_ops snd_mts64_rawmidi_input_ops = { }; /* Create and initialize the rawmidi component */ -static int __devinit snd_mts64_rawmidi_create(struct snd_card *card) +static int snd_mts64_rawmidi_create(struct snd_card *card) { struct mts64 *mts = card->private_data; struct snd_rawmidi *rmidi; @@ -860,7 +860,7 @@ __out: spin_unlock(&mts->lock); } -static int __devinit snd_mts64_probe_port(struct parport *p) +static int snd_mts64_probe_port(struct parport *p) { struct pardevice *pardev; int res; @@ -884,7 +884,7 @@ static int __devinit snd_mts64_probe_port(struct parport *p) return res; } -static void __devinit snd_mts64_attach(struct parport *p) +static void snd_mts64_attach(struct parport *p) { struct platform_device *device; @@ -940,7 +940,7 @@ static void snd_mts64_card_private_free(struct snd_card *card) snd_mts64_free(mts); } -static int __devinit snd_mts64_probe(struct platform_device *pdev) +static int snd_mts64_probe(struct platform_device *pdev) { struct pardevice *pardev; struct parport *p; @@ -1025,7 +1025,7 @@ __err: return err; } -static int __devexit snd_mts64_remove(struct platform_device *pdev) +static int snd_mts64_remove(struct platform_device *pdev) { struct snd_card *card = platform_get_drvdata(pdev); @@ -1038,7 +1038,7 @@ static int __devexit snd_mts64_remove(struct platform_device *pdev) static struct platform_driver snd_mts64_driver = { .probe = snd_mts64_probe, - .remove = __devexit_p(snd_mts64_remove), + .remove = snd_mts64_remove, .driver = { .name = PLATFORM_DRIVER, .owner = THIS_MODULE, diff --git a/sound/drivers/pcsp/pcsp.c b/sound/drivers/pcsp/pcsp.c index ef171295f6d4..7a5fdb9b0afc 100644 --- a/sound/drivers/pcsp/pcsp.c +++ b/sound/drivers/pcsp/pcsp.c @@ -39,7 +39,7 @@ MODULE_PARM_DESC(nopcm, "Disable PC-Speaker PCM sound. Only beeps remain."); struct snd_pcsp pcsp_chip; -static int __devinit snd_pcsp_create(struct snd_card *card) +static int snd_pcsp_create(struct snd_card *card) { static struct snd_device_ops ops = { }; struct timespec tp; @@ -93,7 +93,7 @@ static int __devinit snd_pcsp_create(struct snd_card *card) return 0; } -static int __devinit snd_card_pcsp_probe(int devnum, struct device *dev) +static int snd_card_pcsp_probe(int devnum, struct device *dev) { struct snd_card *card; int err; @@ -142,7 +142,7 @@ static int __devinit snd_card_pcsp_probe(int devnum, struct device *dev) return 0; } -static int __devinit alsa_card_pcsp_init(struct device *dev) +static int alsa_card_pcsp_init(struct device *dev) { int err; @@ -161,12 +161,12 @@ static int __devinit alsa_card_pcsp_init(struct device *dev) return 0; } -static void __devexit alsa_card_pcsp_exit(struct snd_pcsp *chip) +static void alsa_card_pcsp_exit(struct snd_pcsp *chip) { snd_card_free(chip->card); } -static int __devinit pcsp_probe(struct platform_device *dev) +static int pcsp_probe(struct platform_device *dev) { int err; @@ -184,7 +184,7 @@ static int __devinit pcsp_probe(struct platform_device *dev) return 0; } -static int __devexit pcsp_remove(struct platform_device *dev) +static int pcsp_remove(struct platform_device *dev) { struct snd_pcsp *chip = platform_get_drvdata(dev); alsa_card_pcsp_exit(chip); @@ -227,7 +227,7 @@ static struct platform_driver pcsp_platform_driver = { .pm = PCSP_PM_OPS, }, .probe = pcsp_probe, - .remove = __devexit_p(pcsp_remove), + .remove = pcsp_remove, .shutdown = pcsp_shutdown, }; diff --git a/sound/drivers/pcsp/pcsp_input.c b/sound/drivers/pcsp/pcsp_input.c index b5e2b54c2604..b874b0ad99cd 100644 --- a/sound/drivers/pcsp/pcsp_input.c +++ b/sound/drivers/pcsp/pcsp_input.c @@ -77,7 +77,7 @@ static int pcspkr_input_event(struct input_dev *dev, unsigned int type, return 0; } -int __devinit pcspkr_input_init(struct input_dev **rdev, struct device *dev) +int pcspkr_input_init(struct input_dev **rdev, struct device *dev) { int err; diff --git a/sound/drivers/pcsp/pcsp_input.h b/sound/drivers/pcsp/pcsp_input.h index e66738c78333..d692749b8c9b 100644 --- a/sound/drivers/pcsp/pcsp_input.h +++ b/sound/drivers/pcsp/pcsp_input.h @@ -7,7 +7,7 @@ #ifndef __PCSP_INPUT_H__ #define __PCSP_INPUT_H__ -int __devinit pcspkr_input_init(struct input_dev **rdev, struct device *dev); +int pcspkr_input_init(struct input_dev **rdev, struct device *dev); int pcspkr_input_remove(struct input_dev *dev); void pcspkr_stop_sound(void); diff --git a/sound/drivers/pcsp/pcsp_lib.c b/sound/drivers/pcsp/pcsp_lib.c index 434981dd4a61..29ebaa4ec0fd 100644 --- a/sound/drivers/pcsp/pcsp_lib.c +++ b/sound/drivers/pcsp/pcsp_lib.c @@ -334,7 +334,7 @@ static struct snd_pcm_ops snd_pcsp_playback_ops = { .pointer = snd_pcsp_playback_pointer, }; -int __devinit snd_pcsp_new_pcm(struct snd_pcsp *chip) +int snd_pcsp_new_pcm(struct snd_pcsp *chip) { int err; diff --git a/sound/drivers/pcsp/pcsp_mixer.c b/sound/drivers/pcsp/pcsp_mixer.c index 6f633f4f3b96..f1e1defc09b1 100644 --- a/sound/drivers/pcsp/pcsp_mixer.c +++ b/sound/drivers/pcsp/pcsp_mixer.c @@ -119,17 +119,17 @@ static int pcsp_pcspkr_put(struct snd_kcontrol *kcontrol, .put = pcsp_##ctl_type##_put, \ } -static struct snd_kcontrol_new __devinitdata snd_pcsp_controls_pcm[] = { +static struct snd_kcontrol_new snd_pcsp_controls_pcm[] = { PCSP_MIXER_CONTROL(enable, "Master Playback Switch"), PCSP_MIXER_CONTROL(treble, "BaseFRQ Playback Volume"), }; -static struct snd_kcontrol_new __devinitdata snd_pcsp_controls_spkr[] = { +static struct snd_kcontrol_new snd_pcsp_controls_spkr[] = { PCSP_MIXER_CONTROL(pcspkr, "Beep Playback Switch"), }; -static int __devinit snd_pcsp_ctls_add(struct snd_pcsp *chip, - struct snd_kcontrol_new *ctls, int num) +static int snd_pcsp_ctls_add(struct snd_pcsp *chip, + struct snd_kcontrol_new *ctls, int num) { int i, err; struct snd_card *card = chip->card; @@ -141,7 +141,7 @@ static int __devinit snd_pcsp_ctls_add(struct snd_pcsp *chip, return 0; } -int __devinit snd_pcsp_new_mixer(struct snd_pcsp *chip, int nopcm) +int snd_pcsp_new_mixer(struct snd_pcsp *chip, int nopcm) { int err; struct snd_card *card = chip->card; diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index 8364855ed14f..991018df7131 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c @@ -96,9 +96,9 @@ static int portman_free(struct portman *pm) return 0; } -static int __devinit portman_create(struct snd_card *card, - struct pardevice *pardev, - struct portman **rchip) +static int portman_create(struct snd_card *card, + struct pardevice *pardev, + struct portman **rchip) { struct portman *pm; @@ -561,7 +561,7 @@ static struct snd_rawmidi_ops snd_portman_midi_input = { }; /* Create and initialize the rawmidi component */ -static int __devinit snd_portman_rawmidi_create(struct snd_card *card) +static int snd_portman_rawmidi_create(struct snd_card *card) { struct portman *pm = card->private_data; struct snd_rawmidi *rmidi; @@ -648,7 +648,7 @@ static void snd_portman_interrupt(void *userdata) spin_unlock(&pm->reg_lock); } -static int __devinit snd_portman_probe_port(struct parport *p) +static int snd_portman_probe_port(struct parport *p) { struct pardevice *pardev; int res; @@ -672,7 +672,7 @@ static int __devinit snd_portman_probe_port(struct parport *p) return res ? -EIO : 0; } -static void __devinit snd_portman_attach(struct parport *p) +static void snd_portman_attach(struct parport *p) { struct platform_device *device; @@ -728,7 +728,7 @@ static void snd_portman_card_private_free(struct snd_card *card) portman_free(pm); } -static int __devinit snd_portman_probe(struct platform_device *pdev) +static int snd_portman_probe(struct platform_device *pdev) { struct pardevice *pardev; struct parport *p; @@ -814,7 +814,7 @@ __err: return err; } -static int __devexit snd_portman_remove(struct platform_device *pdev) +static int snd_portman_remove(struct platform_device *pdev) { struct snd_card *card = platform_get_drvdata(pdev); @@ -827,7 +827,7 @@ static int __devexit snd_portman_remove(struct platform_device *pdev) static struct platform_driver snd_portman_driver = { .probe = snd_portman_probe, - .remove = __devexit_p(snd_portman_remove), + .remove = snd_portman_remove, .driver = { .name = PLATFORM_DRIVER, .owner = THIS_MODULE, diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c index 86700671d1ac..7425dd8c1f09 100644 --- a/sound/drivers/serial-u16550.c +++ b/sound/drivers/serial-u16550.c @@ -328,7 +328,7 @@ static void snd_uart16550_buffer_timer(unsigned long data) * return 0 if found * return negative error if not found */ -static int __devinit snd_uart16550_detect(struct snd_uart16550 *uart) +static int snd_uart16550_detect(struct snd_uart16550 *uart) { unsigned long io_base = uart->base; int ok; @@ -783,14 +783,14 @@ static int snd_uart16550_dev_free(struct snd_device *device) return snd_uart16550_free(uart); } -static int __devinit snd_uart16550_create(struct snd_card *card, - unsigned long iobase, - int irq, - unsigned int speed, - unsigned int base, - int adaptor, - int droponfull, - struct snd_uart16550 **ruart) +static int snd_uart16550_create(struct snd_card *card, + unsigned long iobase, + int irq, + unsigned int speed, + unsigned int base, + int adaptor, + int droponfull, + struct snd_uart16550 **ruart) { static struct snd_device_ops ops = { .dev_free = snd_uart16550_dev_free, @@ -863,7 +863,7 @@ static int __devinit snd_uart16550_create(struct snd_card *card, return 0; } -static void __devinit snd_uart16550_substreams(struct snd_rawmidi_str *stream) +static void snd_uart16550_substreams(struct snd_rawmidi_str *stream) { struct snd_rawmidi_substream *substream; @@ -872,9 +872,9 @@ static void __devinit snd_uart16550_substreams(struct snd_rawmidi_str *stream) } } -static int __devinit snd_uart16550_rmidi(struct snd_uart16550 *uart, int device, - int outs, int ins, - struct snd_rawmidi **rmidi) +static int snd_uart16550_rmidi(struct snd_uart16550 *uart, int device, + int outs, int ins, + struct snd_rawmidi **rmidi) { struct snd_rawmidi *rrawmidi; int err; @@ -899,7 +899,7 @@ static int __devinit snd_uart16550_rmidi(struct snd_uart16550 *uart, int device, return 0; } -static int __devinit snd_serial_probe(struct platform_device *devptr) +static int snd_serial_probe(struct platform_device *devptr) { struct snd_card *card; struct snd_uart16550 *uart; @@ -982,7 +982,7 @@ static int __devinit snd_serial_probe(struct platform_device *devptr) return err; } -static int __devexit snd_serial_remove(struct platform_device *devptr) +static int snd_serial_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); platform_set_drvdata(devptr, NULL); @@ -993,7 +993,7 @@ static int __devexit snd_serial_remove(struct platform_device *devptr) static struct platform_driver snd_serial_driver = { .probe = snd_serial_probe, - .remove = __devexit_p( snd_serial_remove), + .remove = snd_serial_remove, .driver = { .name = SND_SERIAL_DRIVER, .owner = THIS_MODULE, diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c index d7d514df9058..cc4be88d7318 100644 --- a/sound/drivers/virmidi.c +++ b/sound/drivers/virmidi.c @@ -83,7 +83,7 @@ struct snd_card_virmidi { static struct platform_device *devices[SNDRV_CARDS]; -static int __devinit snd_virmidi_probe(struct platform_device *devptr) +static int snd_virmidi_probe(struct platform_device *devptr) { struct snd_card *card; struct snd_card_virmidi *vmidi; @@ -129,7 +129,7 @@ static int __devinit snd_virmidi_probe(struct platform_device *devptr) return err; } -static int __devexit snd_virmidi_remove(struct platform_device *devptr) +static int snd_virmidi_remove(struct platform_device *devptr) { snd_card_free(platform_get_drvdata(devptr)); platform_set_drvdata(devptr, NULL); @@ -140,7 +140,7 @@ static int __devexit snd_virmidi_remove(struct platform_device *devptr) static struct platform_driver snd_virmidi_driver = { .probe = snd_virmidi_probe, - .remove = __devexit_p(snd_virmidi_remove), + .remove = snd_virmidi_remove, .driver = { .name = SND_VIRMIDI_DRIVER, .owner = THIS_MODULE, diff --git a/sound/drivers/vx/vx_hwdep.c b/sound/drivers/vx/vx_hwdep.c index 4a1fae99ac55..3014b86362bd 100644 --- a/sound/drivers/vx/vx_hwdep.c +++ b/sound/drivers/vx/vx_hwdep.c @@ -29,8 +29,6 @@ #include <sound/hwdep.h> #include <sound/vx_core.h> -#ifdef SND_VX_FW_LOADER - MODULE_FIRMWARE("vx/bx_1_vxp.b56"); MODULE_FIRMWARE("vx/bx_1_vp4.b56"); MODULE_FIRMWARE("vx/x1_1_vx2.xlx"); @@ -119,142 +117,5 @@ void snd_vx_free_firmware(struct vx_core *chip) #endif } -#else /* old style firmware loading */ - -static int vx_hwdep_dsp_status(struct snd_hwdep *hw, - struct snd_hwdep_dsp_status *info) -{ - static char *type_ids[VX_TYPE_NUMS] = { - [VX_TYPE_BOARD] = "vxboard", - [VX_TYPE_V2] = "vx222", - [VX_TYPE_MIC] = "vx222", - [VX_TYPE_VXPOCKET] = "vxpocket", - [VX_TYPE_VXP440] = "vxp440", - }; - struct vx_core *vx = hw->private_data; - - if (snd_BUG_ON(!type_ids[vx->type])) - return -EINVAL; - strcpy(info->id, type_ids[vx->type]); - if (vx_is_pcmcia(vx)) - info->num_dsps = 4; - else - info->num_dsps = 3; - if (vx->chip_status & VX_STAT_CHIP_INIT) - info->chip_ready = 1; - info->version = VX_DRIVER_VERSION; - return 0; -} - -static void free_fw(const struct firmware *fw) -{ - if (fw) { - vfree(fw->data); - kfree(fw); - } -} - -static int vx_hwdep_dsp_load(struct snd_hwdep *hw, - struct snd_hwdep_dsp_image *dsp) -{ - struct vx_core *vx = hw->private_data; - int index, err; - struct firmware *fw; - - if (snd_BUG_ON(!vx->ops->load_dsp)) - return -ENXIO; - - fw = kmalloc(sizeof(*fw), GFP_KERNEL); - if (! fw) { - snd_printk(KERN_ERR "cannot allocate firmware\n"); - return -ENOMEM; - } - fw->size = dsp->length; - fw->data = vmalloc(fw->size); - if (! fw->data) { - snd_printk(KERN_ERR "cannot allocate firmware image (length=%d)\n", - (int)fw->size); - kfree(fw); - return -ENOMEM; - } - if (copy_from_user((void *)fw->data, dsp->image, dsp->length)) { - free_fw(fw); - return -EFAULT; - } - - index = dsp->index; - if (! vx_is_pcmcia(vx)) - index++; - err = vx->ops->load_dsp(vx, index, fw); - if (err < 0) { - free_fw(fw); - return err; - } -#ifdef CONFIG_PM - vx->firmware[index] = fw; -#else - free_fw(fw); -#endif - - if (index == 1) - vx->chip_status |= VX_STAT_XILINX_LOADED; - if (index < 3) - return 0; - - /* ok, we reached to the last one */ - /* create the devices if not built yet */ - if (! (vx->chip_status & VX_STAT_DEVICE_INIT)) { - if ((err = snd_vx_pcm_new(vx)) < 0) - return err; - - if ((err = snd_vx_mixer_new(vx)) < 0) - return err; - - if (vx->ops->add_controls) - if ((err = vx->ops->add_controls(vx)) < 0) - return err; - - if ((err = snd_card_register(vx->card)) < 0) - return err; - - vx->chip_status |= VX_STAT_DEVICE_INIT; - } - vx->chip_status |= VX_STAT_CHIP_INIT; - return 0; -} - - -/* exported */ -int snd_vx_setup_firmware(struct vx_core *chip) -{ - int err; - struct snd_hwdep *hw; - - if ((err = snd_hwdep_new(chip->card, SND_VX_HWDEP_ID, 0, &hw)) < 0) - return err; - - hw->iface = SNDRV_HWDEP_IFACE_VX; - hw->private_data = chip; - hw->ops.dsp_status = vx_hwdep_dsp_status; - hw->ops.dsp_load = vx_hwdep_dsp_load; - hw->exclusive = 1; - sprintf(hw->name, "VX Loader (%s)", chip->card->driver); - chip->hwdep = hw; - - return snd_card_register(chip->card); -} - -/* exported */ -void snd_vx_free_firmware(struct vx_core *chip) -{ -#ifdef CONFIG_PM - int i; - for (i = 0; i < 4; i++) - free_fw(chip->firmware[i]); -#endif -} - -#endif /* SND_VX_FW_LOADER */ - EXPORT_SYMBOL(snd_vx_setup_firmware); EXPORT_SYMBOL(snd_vx_free_firmware); |