Changeset 207


Ignore:
Timestamp:
Jun 18, 2007, 3:00:22 AM (18 years ago)
Author:
Brendan Oakley
Message:

Merged to Alsa 0.9.0rc2.

Location:
GPL/branches/alsa-resync1/alsa-kernel
Files:
1 added
5 deleted
59 edited
1 moved

Legend:

Unmodified
Added
Removed
  • GPL/branches/alsa-resync1/alsa-kernel/core/info.c

    r206 r207  
    106106        return 0;
    107107    va_start(args, fmt);
    108     res = vsprintf(sbuffer, fmt, args);
     108        res = vsnprintf(sbuffer, sizeof(sbuffer), fmt, args);
    109109    va_end(args);
    110110    if (buffer->size + res >= buffer->len) {
  • GPL/branches/alsa-resync1/alsa-kernel/core/init.c

    r206 r207  
    4747
    4848#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
    49 int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int free_flag);
     49int (*snd_mixer_oss_notify_callback)(snd_card_t *card, int free_flag);
    5050#endif
    5151
     
    456456                write_unlock(&snd_card_rwlock);
    457457                return 0;
    458         }
     458        }
    459459
    460460        if (card->id[0] == '\0')
  • GPL/branches/alsa-resync1/alsa-kernel/core/memory.c

    r206 r207  
    2828#include <linux/slab.h>
    2929#include <linux/time.h>
     30#include <linux/pci.h>
    3031#include <sound/core.h>
    3132#include <sound/info.h>
  • GPL/branches/alsa-resync1/alsa-kernel/core/rtctimer.c

    r112 r207  
    213213MODULE_LICENSE("GPL");
    214214
    215 EXPORT_NO_SYMBOLS;
    216 
    217215#endif /* CONFIG_RTC || CONFIG_RTC_MODULE */
  • GPL/branches/alsa-resync1/alsa-kernel/core/seq/seq_midi.c

    r34 r207  
    4141#include <sound/initval.h>
    4242
    43 MODULE_AUTHOR("Frank van de Pol <fvdpol@coil.demon.nl>, Jaroslav Kysela <perex@suse.cz>");
     43MODULE_AUTHOR("Frank van de Pol <fvdpol@home.nl>, Jaroslav Kysela <perex@suse.cz>");
    4444MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer MIDI synth.");
    4545MODULE_LICENSE("GPL");
  • GPL/branches/alsa-resync1/alsa-kernel/core/timer.c

    r106 r207  
    19311931EXPORT_SYMBOL(snd_timer_start);
    19321932EXPORT_SYMBOL(snd_timer_stop);
     1933EXPORT_SYMBOL(snd_timer_del);
    19331934EXPORT_SYMBOL(snd_timer_continue);
    19341935EXPORT_SYMBOL(snd_timer_pause);
  • GPL/branches/alsa-resync1/alsa-kernel/drivers/dummy.c

    r206 r207  
    2121#include <sound/driver.h>
    2222#include <linux/init.h>
     23#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0)
     24#include <linux/jiffies.h>
     25#else
    2326#include <linux/sched.h>
     27#endif
    2428#include <linux/slab.h>
    2529#include <linux/time.h>
     
    3135#define SNDRV_GET_ID
    3236#include <sound/initval.h>
    33 
    34 EXPORT_NO_SYMBOLS;
    3537
    3638MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/drivers/mpu401/mpu401.c

    r92 r207  
    3030#include <sound/initval.h>
    3131#include <linux/delay.h>
    32 
    33 EXPORT_NO_SYMBOLS;
    3432
    3533MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/drivers/mtpav.c

    r92 r207  
    6464 *      globals
    6565 */
    66 EXPORT_NO_SYMBOLS;
    67 
    6866MODULE_AUTHOR("Michael T. Mayers");
    6967MODULE_DESCRIPTION("MOTU MidiTimePiece AV multiport MIDI");
  • GPL/branches/alsa-resync1/alsa-kernel/drivers/opl3/opl3_voice.h

    r32 r207  
    4545
    4646/* Prototypes for opl3_oss.c */
    47 #ifdef CONFIG_SND_OSSEMUL
     47#ifdef CONFIG_SND_SEQUENCER_OSS
    4848void snd_opl3_init_seq_oss(opl3_t *opl3, char *name);
    4949void snd_opl3_free_seq_oss(opl3_t *opl3);
  • GPL/branches/alsa-resync1/alsa-kernel/drivers/serial-u16550.c

    r92 r207  
    114114#include <linux/serial_reg.h>
    115115
    116 EXPORT_NO_SYMBOLS;
    117116MODULE_DESCRIPTION("MIDI serial");
    118117MODULE_LICENSE("GPL");
  • GPL/branches/alsa-resync1/alsa-kernel/drivers/virmidi.c

    r92 r207  
    5151#define SNDRV_GET_ID
    5252#include <sound/initval.h>
    53 
    54 EXPORT_NO_SYMBOLS;
    5553
    5654MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/ad1816a/ad1816a.c

    r112 r207  
    3939#define PFX "ad1816a: "
    4040
    41 EXPORT_NO_SYMBOLS;
    4241MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
    4342MODULE_DESCRIPTION("AD1816A, AD1815");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/ad1848/ad1848.c

    r92 r207  
    3333#define chip_t ad1848_t
    3434
    35 EXPORT_NO_SYMBOLS;
    3635MODULE_AUTHOR("Tugrul Galatali <galatalt@stuy.edu>, Jaroslav Kysela <perex@suse.cz>");
    3736MODULE_DESCRIPTION("AD1848/AD1847/CS4248");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/als100.c

    r112 r207  
    3737
    3838#define PFX "als100: "
    39 
    40 EXPORT_NO_SYMBOLS;
    4139
    4240MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/azt2320.c

    r112 r207  
    4747
    4848#define PFX "azt2320: "
    49 
    50 EXPORT_NO_SYMBOLS;
    5149
    5250MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/cmi8330.c

    r112 r207  
    5252#define SNDRV_GET_ID
    5353#include <sound/initval.h>
    54 
    55 EXPORT_NO_SYMBOLS;
    5654
    5755MODULE_AUTHOR("George Talusan <gstalusan@uwaterloo.ca>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/cs423x/cs4231.c

    r92 r207  
    3232
    3333#define chip_t cs4231_t
    34 
    35 EXPORT_NO_SYMBOLS;
    3634
    3735MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/cs423x/cs4236.c

    r112 r207  
    3737#define chip_t cs4231_t
    3838
    39 EXPORT_NO_SYMBOLS;
    4039MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
    4140MODULE_LICENSE("GPL");
     
    258257        /* TerraTec AudioSystem EWS64XL - CS4236B */
    259258        ISAPNP_CS4232('C','S','C',0xa836,0xa800,0xa810,0xa803),
     259        /* TerraTec AudioSystem EWS64XL - CS4236B */
     260        ISAPNP_CS4232_WOMPU('C','S','C',0xa836,0xa800,0xa810),
    260261        /* Crystal Semiconductors CS4237B */
    261262        ISAPNP_CS4232('C','S','C',0x4637,0x0000,0x0010,0x0003),
     
    288289        /* CS4235 without MPU401 */
    289290        ISAPNP_CS4232_WOMPU('C','S','C',0xe825,0x0100,0x0110),
     291        /* Some noname CS4236 based card */
     292        ISAPNP_CS4232('C','S','C',0xe936,0x0000,0x0010,0x0003),
    290293        /* CS4236B */
    291294        ISAPNP_CS4232('C','S','C',0xf235,0x0000,0x0010,0x0003),
     
    355358                        snd_irq[dev], snd_dma1[dev], snd_dma2[dev]);
    356359        /* CTRL initialization */
     360        if (acard->ctrl && snd_cport[dev] >= 0) {
    357361        pdev = acard->ctrl;
    358362        if (pdev->prepare(pdev) < 0) {
     
    369373        snd_cport[dev] = pdev->resource[0].start;
    370374        snd_printdd("isapnp CTRL: control port=0x%lx\n", snd_cport[dev]);
     375        }
    371376        /* MPU initialization */
    372377        if (acard->mpu && snd_mpu_port[dev] >= 0) {
  • GPL/branches/alsa-resync1/alsa-kernel/isa/dt0197h.c

    r112 r207  
    3333
    3434#define PFX "dt0197h: "
    35 
    36 EXPORT_NO_SYMBOLS;
    3735
    3836MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/es1688/es1688.c

    r112 r207  
    3636
    3737#define chip_t es1688_t
    38 
    39 EXPORT_NO_SYMBOLS;
    4038
    4139MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/es18xx.c

    r112 r207  
    20542054/* Card level */
    20552055
    2056 EXPORT_NO_SYMBOLS;
    20572056MODULE_AUTHOR("Christian Fischbach <fishbach@pool.informatik.rwth-aachen.de>, Abramo Bagnara <abramo@alsa-project.org>"); 
    20582057MODULE_DESCRIPTION("ESS ES18xx AudioDrive");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gus_pcm.c

    r92 r207  
    674674        formats:                (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |
    675675                                 SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE),
    676         rates:                  SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_44100,
     676        rates:                  SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
    677677        rate_min:               5510,
    678678        rate_max:               48000,
  • GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gus_synth.c

    r32 r207  
    5959                if (voice == NULL) {
    6060                        snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port);
     61                        snd_gus_use_dec(gus);
    6162                        up(&gus->register_mutex);
    6263                        return -EBUSY;
     
    7576        down(&gus->register_mutex);
    7677        snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port);
     78        snd_gus_use_dec(gus);
    7779        up(&gus->register_mutex);
    7880        return 0;
  • GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusclassic.c

    r112 r207  
    3232#define SNDRV_GET_ID
    3333#include <sound/initval.h>
    34 
    35 EXPORT_NO_SYMBOLS;
    3634
    3735MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusextreme.c

    r112 r207  
    3535#define SNDRV_GET_ID
    3636#include <sound/initval.h>
    37 
    38 EXPORT_NO_SYMBOLS;
    3937
    4038MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusmax.c

    r112 r207  
    3333#define SNDRV_GET_ID
    3434#include <sound/initval.h>
    35 
    36 EXPORT_NO_SYMBOLS;
    3735
    3836MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/gus/interwave.c

    r112 r207  
    4545#include <sound/initval.h>
    4646
    47 EXPORT_NO_SYMBOLS;
    4847MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
    4948MODULE_CLASSES("{sound}");
     
    831830        }
    832831        sprintf(pcm->name + strlen(pcm->name), " rev %c", gus->revision + 'A');
    833         strcat(pcm->name, " (chip)");
     832        strcat(pcm->name, " (codec)");
    834833        if ((err = snd_cs4231_timer(cs4231, 2, NULL)) < 0) {
    835834                snd_card_free(card);
  • GPL/branches/alsa-resync1/alsa-kernel/isa/opl3sa2.c

    r206 r207  
    3636#define SNDRV_GET_ID
    3737#include <sound/initval.h>
    38 
    39 EXPORT_NO_SYMBOLS;
    4038
    4139MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/opti9xx/opti92x-ad1848.c

    r92 r207  
    5454#include <sound/initval.h>
    5555
    56 EXPORT_NO_SYMBOLS;
    5756MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
    5857MODULE_CLASSES("{sound}");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000.c

    r112 r207  
    110110snd_emu8000_dma_chan(emu8000_t *emu, int ch, int mode)
    111111{
     112        unsigned right_bit = (mode & EMU8000_RAM_RIGHT) ? 0x01000000 : 0;
     113        mode &= EMU8000_RAM_MODE_MASK;
    112114        if (mode == EMU8000_RAM_CLOSE) {
    113115                EMU8000_CCCA_WRITE(emu, ch, 0);
     
    123125        EMU8000_CSL_WRITE(emu, ch, 0);
    124126        if (mode == EMU8000_RAM_WRITE) /* DMA write */
    125                 EMU8000_CCCA_WRITE(emu, ch, 0x06000000);
     127                EMU8000_CCCA_WRITE(emu, ch, 0x06000000 | right_bit);
    126128        else       /* DMA read */
    127                 EMU8000_CCCA_WRITE(emu, ch, 0x04000000);
     129                EMU8000_CCCA_WRITE(emu, ch, 0x04000000 | right_bit);
    128130}
    129131
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000_callback.c

    r32 r207  
    1717 *   You should have received a copy of the GNU General Public License
    1818 *   along with this program; if not, write to the Free Software
    19  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    20  */
    21 
     19 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
     20 */
     21
     22#define __NO_VERSION__
    2223#include "emu8000_local.h"
     24#include <sound/asoundef.h>
    2325
    2426/*
     
    2628 */
    2729static snd_emux_voice_t *get_voice(snd_emux_t *emu, snd_emux_port_t *port);
    28 static void start_voice(snd_emux_voice_t *vp);
     30static int start_voice(snd_emux_voice_t *vp);
    2931static void trigger_voice(snd_emux_voice_t *vp);
    3032static void release_voice(snd_emux_voice_t *vp);
     
    3335static void terminate_voice(snd_emux_voice_t *vp);
    3436static void sysex(snd_emux_t *emu, char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
    35 #ifdef CONFIG_SND_OSSEMUL
     37#ifdef CONFIG_SND_SEQUENCER_OSS
    3638static int oss_ioctl(snd_emux_t *emu, int cmd, int p1, int p2);
    3739#endif
     
    9395        load_fx:        load_fx,
    9496        sysex:          sysex,
    95 #ifdef CONFIG_SND_OSSEMUL
     97#ifdef CONFIG_SND_SEQUENCER_OSS
    9698        oss_ioctl:      oss_ioctl,
    9799#endif
     
    208210                if (state == SNDRV_EMUX_ST_OFF)
    209211                        bp = best + OFF;
    210                 else if (state == SNDRV_EMUX_ST_RELEASED) {
     212                else if (state == SNDRV_EMUX_ST_RELEASED ||
     213                         state == SNDRV_EMUX_ST_PENDING) {
    211214                        bp = best + RELEASED;
    212215                        val = (EMU8000_CVCF_READ(hw, vp->ch) >> 16) & 0xffff;
     
    247250/*
    248251 */
    249 static void
     252static int
    250253start_voice(snd_emux_voice_t *vp)
    251254{
     
    256259        emu8000_t *hw;
    257260
    258         hw = snd_magic_cast(emu8000_t, vp->hw, return);
     261        hw = snd_magic_cast(emu8000_t, vp->hw, return -EINVAL);
    259262        ch = vp->ch;
    260263        chan = vp->chan;
     
    320323        EMU8000_VTFT_WRITE(hw, ch, temp | vp->ftarget);
    321324        EMU8000_CVCF_WRITE(hw, ch, temp | 0xff00);
     325
     326        return 0;
    322327}
    323328
     
    492497
    493498
    494 #ifdef CONFIG_SND_OSSEMUL
     499#ifdef CONFIG_SND_SEQUENCER_OSS
    495500/*
    496501 * OSS ioctl callback
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000_local.h

    r32 r207  
    1919 *   You should have received a copy of the GNU General Public License
    2020 *   along with this program; if not, write to the Free Software
    21  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     21 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    2222 */
    2323
     24#include <sound/driver.h>
     25#include <linux/wait.h>
     26#include <linux/sched.h>
     27#include <linux/slab.h>
     28#include <sound/core.h>
    2429#include <sound/emu8000.h>
    2530#include <sound/emu8000_reg.h>
     
    3540void snd_emu8000_ops_setup(emu8000_t *emu);
    3641
     42/* emu8000_pcm.c */
     43int snd_emu8000_pcm_new(snd_card_t *card, emu8000_t *emu, int index);
     44
    3745#endif  /* __EMU8000_LOCAL_H */
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000_synth.c

    r32 r207  
    1818 *   You should have received a copy of the GNU General Public License
    1919 *   along with this program; if not, write to the Free Software
    20  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     20 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    2121 */
    2222
    23 #define SNDRV_MAIN_OBJECT_FILE
    2423#include "emu8000_local.h"
     24#include <linux/init.h>
    2525#include <sound/initval.h>
    2626
    27 EXPORT_NO_SYMBOLS;
     27MODULE_AUTHOR("Takashi Iwai, Steve Ratcliffe");
     28MODULE_DESCRIPTION("Emu8000 synth plug-in routine");
     29MODULE_LICENSE("GPL");
    2830MODULE_CLASSES("{sound}");
    29 MODULE_AUTHOR("Takashi Iwai, Steve Ratcliffe");
    3031
    3132/*----------------------------------------------------------------*/
     
    7071        emu->midi_ports = hw->seq_ports < 2 ? hw->seq_ports : 2; /* number of virmidi ports */
    7172        emu->midi_devidx = 1;
     73        emu->linear_panning = 1;
    7274
    7375        if (snd_emux_register(emu, dev->card, hw->index, "Emu8000") < 0) {
     
    7880                return -ENOMEM;
    7981        }
     82
     83        if (hw->mem_size > 0)
     84                snd_emu8000_pcm_new(dev->card, hw, 1);
    8085
    8186        dev->driver_data = hw;
     
    96101
    97102        hw = dev->driver_data;
     103        if (hw->pcm)
     104                snd_device_free(dev->card, hw->pcm);
    98105        if (hw->emu)
    99106                snd_emux_free(hw->emu);
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sb/es968.c

    r112 r207  
    3535
    3636#define chip_t sb_t
    37 
    38 EXPORT_NO_SYMBOLS;
    3937
    4038MODULE_AUTHOR("Massimo Piccioni <dafastidio@libero.it>");
     
    160158#endif  /* __ISAPNP__ */
    161159
    162 static void __exit snd_card_es968_free(snd_card_t *card)
     160static void snd_card_es968_free(snd_card_t *card)
    163161{
    164162    struct snd_card_es968 *acard = (struct snd_card_es968 *)card->private_data;
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sb/sb16.c

    r112 r207  
    4848#else
    4949#define PFX "sb16: "
    50 #endif
    51 
    52 #ifndef SNDRV_SBAWE
    53 EXPORT_NO_SYMBOLS;
    5450#endif
    5551
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sb/sb8.c

    r112 r207  
    3232
    3333#define chip_t sb_t
    34 
    35 EXPORT_NO_SYMBOLS;
    3634
    3735MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sgalaxy.c

    r112 r207  
    3434#define SNDRV_GET_ID
    3535#include <sound/initval.h>
    36 
    37 EXPORT_NO_SYMBOLS;
    3836
    3937MODULE_AUTHOR("Christopher Butler <chrisb@sandy.force9.co.uk>");
  • GPL/branches/alsa-resync1/alsa-kernel/isa/wavefront/wavefront.c

    r112 r207  
    3636#define chip_t cs4231_t
    3737
    38 EXPORT_NO_SYMBOLS;
    3938MODULE_AUTHOR("Paul Barton-Davis <pbd@op.net>");
    4039MODULE_DESCRIPTION("Turtle Beach Wavefront");
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ali5451/ali5451.c

    r206 r207  
    3333#include <linux/interrupt.h>
    3434#include <linux/init.h>
     35#include <linux/pci.h>
    3536#include <linux/slab.h>
    3637#include <sound/core.h>
  • GPL/branches/alsa-resync1/alsa-kernel/pci/als4000.c

    r92 r207  
    6060
    6161#include <sound/driver.h>
     62#include <asm/io.h>
     63#include <linux/init.h>
     64#include <linux/pci.h>
     65#include <linux/slab.h>
     66#include <sound/core.h>
    6267#include <sound/pcm.h>
    6368#include <sound/rawmidi.h>
     
    6873#include <sound/initval.h>
    6974
    70 EXPORT_NO_SYMBOLS;
     75MODULE_AUTHOR("Bart Hartgers <bart@etpmod.phys.tue.nl>");
    7176MODULE_DESCRIPTION("Avance Logic ALS4000");
     77MODULE_LICENSE("GPL");
    7278MODULE_CLASSES("{sound}");
    7379MODULE_DEVICES("{{Avance Logic,ALS4000}}");
  • GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emu10k1.c

    r84 r207  
    2626#include <sound/driver.h>
    2727#include <linux/init.h>
     28#include <linux/pci.h>
    2829#include <linux/time.h>
    2930#include <sound/core.h>
  • GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emu10k1_main.c

    r92 r207  
    3535#include <linux/delay.h>
    3636#include <linux/init.h>
     37#include <linux/pci.h>
    3738#include <linux/slab.h>
    3839#include <linux/vmalloc.h>
  • GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emufx.c

    r84 r207  
    3232#include <linux/delay.h>
    3333#include <linux/slab.h>
    34 
     34#include <linux/init.h>
    3535#include <sound/core.h>
    3636#include <sound/tlv.h>
  • GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emumixer.c

    r84 r207  
    3434#include <sound/driver.h>
    3535#include <linux/time.h>
     36#include <linux/init.h>
    3637#include <sound/core.h>
    3738#include <sound/emu10k1.h>
  • GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emumpu401.c

    r84 r207  
    2323#include <sound/driver.h>
    2424#include <linux/time.h>
     25#include <linux/init.h>
    2526#include <sound/core.h>
    2627#include <sound/emu10k1.h>
  • GPL/branches/alsa-resync1/alsa-kernel/pci/emu10k1/emuproc.c

    r206 r207  
    2929#include <sound/driver.h>
    3030#include <linux/slab.h>
     31#include <linux/init.h>
    3132#include <sound/core.h>
    3233#include <sound/emu10k1.h>
  • GPL/branches/alsa-resync1/alsa-kernel/pci/es1968.c

    r206 r207  
    101101#include <linux/interrupt.h>
    102102#include <linux/init.h>
     103#include <linux/pci.h>
    103104#include <linux/slab.h>
    104105#include <sound/core.h>
     
    112113#define DRIVER_NAME "ES1968"
    113114
    114 EXPORT_NO_SYMBOLS;
    115115MODULE_DESCRIPTION("ESS Maestro");
    116116MODULE_CLASSES("{sound}");
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712.c

    r112 r207  
    3131#include <linux/interrupt.h>
    3232#include <linux/init.h>
     33#include <linux/pci.h>
    3334#include <linux/slab.h>
    3435#include <sound/core.h>
     
    4849#define SND_CS8404
    4950#include <sound/cs8403.h>
    50 
    51 EXPORT_NO_SYMBOLS;
    5251
    5352MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
     
    12351234        switch (ice->eeprom.subvendor) {
    12361235        case ICE1712_SUBDEVICE_DELTA1010:
     1236        case ICE1712_SUBDEVICE_DELTA1010LT:     // check it --jk
    12371237        case ICE1712_SUBDEVICE_DELTADIO2496:
    12381238        case ICE1712_SUBDEVICE_DELTA66:
     
    41014101                /* follow thru */
    41024102        case ICE1712_SUBDEVICE_DELTA1010:
     4103        case ICE1712_SUBDEVICE_STDSP24:
    41034104                ice->num_adcs = ice->num_dacs = ice->num_total_dacs = 8;
    41044105                break;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/korg1212/korg1212.c

    r112 r207  
    2424#include <linux/delay.h>
    2525#include <linux/init.h>
     26#include <linux/pci.h>
    2627#include <linux/slab.h>
    2728#include <sound/core.h>
     
    3233#include <sound/initval.h>
    3334
    34 #define DEBUG                    1
    35 //#define LARGEALLOC               1
    36 #define PRINTK  printk
     35// ----------------------------------------------------------------------------
     36// Debug Stuff
     37// ----------------------------------------------------------------------------
     38#define K1212_DEBUG_LEVEL               0
     39#define K1212_DEBUG_PRINTK              printk
     40
     41// ----------------------------------------------------------------------------
     42// Record/Play Buffer Allocation Method. If K1212_LARGEALLOC is defined all
     43// buffers are alocated as a large piece inside KorgSharedBuffer.
     44// ----------------------------------------------------------------------------
     45//#define K1212_LARGEALLOC              1
    3746
    3847// ----------------------------------------------------------------------------
     
    273282
    274283typedef struct KorgSharedBuffer {
    275 #ifdef LARGEALLOC
     284#ifdef K1212_LARGEALLOC
    276285   KorgAudioBuffer   playDataBufs[kNumBuffers];
    277286   KorgAudioBuffer   recordDataBufs[kNumBuffers];
     
    373382};
    374383
    375 EXPORT_NO_SYMBOLS;
    376384MODULE_DESCRIPTION("korg1212");
    377385MODULE_LICENSE("GPL");
     
    522530
    523531        if (korg1212->outDoorbellPtr) {
    524 #ifdef DEBUG
    525                 PRINTK("DEBUG: Card <- 0x%08x 0x%08x [%s]\n", doorbellVal, mailBox0Val, stateName[korg1212->cardState]);
     532#if K1212_DEBUG_LEVEL > 0
     533                K1212_DEBUG_PRINTK("K1212_DEBUG: Card <- 0x%08x 0x%08x [%s]\n", doorbellVal, mailBox0Val, stateName[korg1212->cardState]);
    526534#endif
    527535                for (retryCount = 0; retryCount < MAX_COMMAND_RETRIES; retryCount++) {
     
    570578        unsigned long endtime = jiffies + 20 * HZ;
    571579
    572 #ifdef DEBUG
    573         PRINTK("DEBUG: WaitForCardStopAck [%s]\n", stateName[korg1212->cardState]);
    574 #endif // DEBUG
     580#if K1212_DEBUG_LEVEL > 0
     581        K1212_DEBUG_PRINTK("K1212_DEBUG: WaitForCardStopAck [%s]\n", stateName[korg1212->cardState]);
     582#endif
    575583
    576584        if (korg1212->inIRQ)
     
    624632static int snd_korg1212_OpenCard(korg1212_t * korg1212)
    625633{
    626 #ifdef DEBUG
    627         PRINTK("DEBUG: OpenCard [%s]\n", stateName[korg1212->cardState]);
     634#if K1212_DEBUG_LEVEL > 0
     635        K1212_DEBUG_PRINTK("K1212_DEBUG: OpenCard [%s]\n", stateName[korg1212->cardState]);
    628636#endif
    629637        snd_korg1212_setCardState(korg1212, K1212_STATE_OPEN);
     
    633641static int snd_korg1212_CloseCard(korg1212_t * korg1212)
    634642{
    635 #ifdef DEBUG
    636         PRINTK("DEBUG: CloseCard [%s]\n", stateName[korg1212->cardState]);
     643#if K1212_DEBUG_LEVEL > 0
     644        K1212_DEBUG_PRINTK("K1212_DEBUG: CloseCard [%s]\n", stateName[korg1212->cardState]);
    637645#endif
    638646
     
    640648                rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_SelectPlayMode,
    641649                                K1212_MODE_StopPlay, 0, 0, 0);
    642 #ifdef DEBUG
    643         if (rc) PRINTK("DEBUG: CloseCard - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     650#if K1212_DEBUG_LEVEL > 0
     651        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: CloseCard - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    644652#endif
    645653
     
    659667static int snd_korg1212_SetupForPlay(korg1212_t * korg1212)
    660668{
    661 #ifdef DEBUG
    662         PRINTK("DEBUG: SetupForPlay [%s]\n", stateName[korg1212->cardState]);
     669#if K1212_DEBUG_LEVEL > 0
     670        K1212_DEBUG_PRINTK("K1212_DEBUG: SetupForPlay [%s]\n", stateName[korg1212->cardState]);
    663671#endif
    664672
     
    667675                                        K1212_MODE_SetupPlay, 0, 0, 0);
    668676
    669 #ifdef DEBUG
    670         if (rc) PRINTK("DEBUG: SetupForPlay - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     677#if K1212_DEBUG_LEVEL > 0
     678        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: SetupForPlay - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    671679#endif
    672680        if (rc != K1212_CMDRET_Success) {
     
    678686static int snd_korg1212_TriggerPlay(korg1212_t * korg1212)
    679687{
    680 #ifdef DEBUG
    681         PRINTK("DEBUG: TriggerPlay [%s]\n", stateName[korg1212->cardState]);
     688#if K1212_DEBUG_LEVEL > 0
     689        K1212_DEBUG_PRINTK("K1212_DEBUG: TriggerPlay [%s]\n", stateName[korg1212->cardState]);
    682690#endif
    683691
     
    685693        rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_TriggerPlay, 0, 0, 0, 0);
    686694
    687 #ifdef DEBUG
    688         if (rc) PRINTK("DEBUG: TriggerPlay - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     695#if K1212_DEBUG_LEVEL > 0
     696        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: TriggerPlay - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    689697#endif
    690698
     
    697705static int snd_korg1212_StopPlay(korg1212_t * korg1212)
    698706{
    699 #ifdef DEBUG
    700         PRINTK("DEBUG: StopPlay [%s]\n", stateName[korg1212->cardState]);
     707#if K1212_DEBUG_LEVEL > 0
     708        K1212_DEBUG_PRINTK("K1212_DEBUG: StopPlay [%s]\n", stateName[korg1212->cardState]);
    701709#endif
    702710
     
    722730static int snd_korg1212_SetMonitorMode(korg1212_t *korg1212, MonitorModeSelector mode)
    723731{
    724 #ifdef DEBUG
    725         PRINTK("DEBUG: SetMonitorMode [%s]\n", stateName[korg1212->cardState]);
     732#if K1212_DEBUG_LEVEL > 0
     733        K1212_DEBUG_PRINTK("K1212_DEBUG: SetMonitorMode [%s]\n", stateName[korg1212->cardState]);
    726734#endif
    727735
     
    791799                                          0, 0, 0);
    792800
    793 #ifdef DEBUG
    794         if (rc) PRINTK("DEBUG: Set Clock Source Selector - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     801#if K1212_DEBUG_LEVEL > 0
     802        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Set Clock Source Selector - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    795803#endif
    796804
     
    827835        u16       count;
    828836
    829 #ifdef DEBUG
    830         PRINTK("DEBUG: WriteADCSensivity [%s]\n", stateName[korg1212->cardState]);
     837#if K1212_DEBUG_LEVEL > 0
     838        K1212_DEBUG_PRINTK("K1212_DEBUG: WriteADCSensivity [%s]\n", stateName[korg1212->cardState]);
    831839#endif
    832840
     
    952960                rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_SelectPlayMode,
    953961                                K1212_MODE_MonitorOn, 0, 0, 0);
    954 #ifdef DEBUG
    955                 if (rc) PRINTK("DEBUG: WriteADCSensivity - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     962#if K1212_DEBUG_LEVEL > 0
     963                if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: WriteADCSensivity - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    956964#endif
    957965
     
    965973        int channel;
    966974
    967 #ifdef DEBUG
    968         PRINTK("DEBUG: DSP download is complete. [%s]\n", stateName[korg1212->cardState]);
     975#if K1212_DEBUG_LEVEL > 0
     976        K1212_DEBUG_PRINTK("K1212_DEBUG: DSP download is complete. [%s]\n", stateName[korg1212->cardState]);
    969977#endif
    970978
     
    974982        rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_BootFromDSPPage4, 0, 0, 0, 0);
    975983
    976 #ifdef DEBUG
    977         if (rc) PRINTK("DEBUG: Boot from Page 4 - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     984#if K1212_DEBUG_LEVEL > 0
     985        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Boot from Page 4 - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    978986#endif
    979987        mdelay(DSP_BOOT_DELAY_IN_MS);
     
    991999        );
    9921000
    993 #ifdef DEBUG
    994         if (rc) PRINTK("DEBUG: Configure Buffer Memory - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     1001#if K1212_DEBUG_LEVEL > 0
     1002        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Configure Buffer Memory - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    9951003#endif
    9961004
     
    10051013        );
    10061014
    1007 #ifdef DEBUG
    1008         if (rc) PRINTK("DEBUG: Configure Misc Memory - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     1015#if K1212_DEBUG_LEVEL > 0
     1016        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Configure Misc Memory - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    10091017#endif
    10101018
     
    10271035                                          ClockSourceSelector[korg1212->clkSrcRate],
    10281036                                          0, 0, 0);
    1029 #ifdef DEBUG
    1030         if (rc) PRINTK("DEBUG: Set Clock Source Selector - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     1037#if K1212_DEBUG_LEVEL > 0
     1038        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Set Clock Source Selector - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    10311039#endif
    10321040
    10331041        snd_korg1212_setCardState(korg1212, K1212_STATE_READY);
    10341042
    1035 #ifdef DEBUG
    1036         if (rc) PRINTK("DEBUG: Set Monitor On - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     1043#if K1212_DEBUG_LEVEL > 0
     1044        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Set Monitor On - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    10371045#endif
    10381046
     
    10631071        switch (doorbellValue) {
    10641072                case K1212_DB_DSPDownloadDone:
    1065 #ifdef DEBUG
    1066                         PRINTK("DEBUG: IRQ DNLD count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]);
     1073#if K1212_DEBUG_LEVEL > 0
     1074                        K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ DNLD count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]);
    10671075#endif
    10681076                        if (korg1212->cardState == K1212_STATE_DSP_IN_PROCESS) {
     
    10761084                // ------------------------------------------------------------------------
    10771085                case K1212_ISRCODE_DMAERROR:
    1078 #ifdef DEBUG
    1079                         PRINTK("DEBUG: IRQ DMAE count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]);
     1086#if K1212_DEBUG_LEVEL > 0
     1087                        K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ DMAE count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]);
    10801088#endif
    10811089                        writel(0, &korg1212->sharedBufferPtr->cardCommand);
     
    10871095                // ------------------------------------------------------------------------
    10881096                case K1212_ISRCODE_CARDSTOPPED:
    1089 #ifdef DEBUG
    1090                         PRINTK("DEBUG: IRQ CSTP count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]);
     1097#if K1212_DEBUG_LEVEL > 0
     1098                        K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ CSTP count - %ld, %x, [%s].\n", korg1212->irqcount, doorbellValue, stateName[korg1212->cardState]);
    10911099#endif
    10921100                        writel(0, &korg1212->sharedBufferPtr->cardCommand);
     
    10941102
    10951103                default:
    1096 #ifdef XDEBUG
    1097                         PRINTK("DEBUG: IRQ DFLT count - %ld, %x, cpos=%d [%s].\n", korg1212->irqcount, doorbellValue,
     1104#if K1212_DEBUG_LEVEL > 1
     1105                        K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ DFLT count - %ld, %x, cpos=%d [%s].\n", korg1212->irqcount, doorbellValue,
    10981106                                korg1212->currentBuffer, stateName[korg1212->cardState]);
    10991107#endif
     
    11241132{
    11251133
    1126 #ifdef DEBUG
    1127         PRINTK("DEBUG: DSP download is starting... [%s]\n", stateName[korg1212->cardState]);
     1134#if K1212_DEBUG_LEVEL > 0
     1135        K1212_DEBUG_PRINTK("K1212_DEBUG: DSP download is starting... [%s]\n", stateName[korg1212->cardState]);
    11281136#endif
    11291137
     
    11431151                                     0, 0, 0);
    11441152
    1145 #ifdef DEBUG
    1146         if (rc) PRINTK("DEBUG: Start DSP Download RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     1153#if K1212_DEBUG_LEVEL > 0
     1154        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Start DSP Download RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    11471155#endif
    11481156
     
    11961204        korg1212_t *korg1212 = (korg1212_t *) pcm->private_data;
    11971205
    1198 #ifdef DEBUG
    1199                 PRINTK("DEBUG: snd_korg1212_free_pcm [%s]\n", stateName[korg1212->cardState]);
     1206#if K1212_DEBUG_LEVEL > 0
     1207                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_free_pcm [%s]\n", stateName[korg1212->cardState]);
    12001208#endif
    12011209
     
    12191227        snd_pcm_runtime_t *runtime = substream->runtime;
    12201228
    1221 #ifdef DEBUG
    1222                 PRINTK("DEBUG: snd_korg1212_playback_open [%s]\n", stateName[korg1212->cardState]);
     1229#if K1212_DEBUG_LEVEL > 0
     1230                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_open [%s]\n", stateName[korg1212->cardState]);
    12231231#endif
    12241232
     
    12491257        snd_pcm_runtime_t *runtime = substream->runtime;
    12501258
    1251 #ifdef DEBUG
    1252                 PRINTK("DEBUG: snd_korg1212_capture_open [%s]\n", stateName[korg1212->cardState]);
     1259#if K1212_DEBUG_LEVEL > 0
     1260                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_open [%s]\n", stateName[korg1212->cardState]);
    12531261#endif
    12541262
     
    12781286        korg1212_t *korg1212 = _snd_pcm_substream_chip(substream);
    12791287
    1280 #ifdef DEBUG
    1281                 PRINTK("DEBUG: snd_korg1212_playback_close [%s]\n", stateName[korg1212->cardState]);
     1288#if K1212_DEBUG_LEVEL > 0
     1289                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_close [%s]\n", stateName[korg1212->cardState]);
    12821290#endif
    12831291
     
    12981306        korg1212_t *korg1212 = _snd_pcm_substream_chip(substream);
    12991307
    1300 #ifdef DEBUG
    1301                 PRINTK("DEBUG: snd_korg1212_capture_close [%s]\n", stateName[korg1212->cardState]);
     1308#if K1212_DEBUG_LEVEL > 0
     1309                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_close [%s]\n", stateName[korg1212->cardState]);
    13021310#endif
    13031311
     
    13281336        info->step = sizeof(KorgAudioFrame) * 8;
    13291337
    1330 #ifdef DEBUG
    1331                 PRINTK("DEBUG: snd_korg1212_channel_info %d:, offset=%ld, first=%d, step=%d\n", chn, info->offset, info->first, info->step);
     1338#if K1212_DEBUG_LEVEL > 0
     1339                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_channel_info %d:, offset=%ld, first=%d, step=%d\n", chn, info->offset, info->first, info->step);
    13321340#endif
    13331341
     
    13381346                             unsigned int cmd, void *arg)
    13391347{
    1340 #ifdef DEBUG
    1341                 PRINTK("DEBUG: snd_korg1212_ioctl: cmd=%d\n", cmd);
     1348#if K1212_DEBUG_LEVEL > 0
     1349                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_ioctl: cmd=%d\n", cmd);
    13421350#endif
    13431351        if (cmd == SNDRV_PCM_IOCTL1_CHANNEL_INFO ) {
     
    13561364        int err;
    13571365
    1358 #ifdef DEBUG
    1359                 PRINTK("DEBUG: snd_korg1212_hw_params [%s]\n", stateName[korg1212->cardState]);
     1366#if K1212_DEBUG_LEVEL > 0
     1367                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_hw_params [%s]\n", stateName[korg1212->cardState]);
    13601368#endif
    13611369
     
    13831391        unsigned long flags;
    13841392
    1385 #ifdef DEBUG
    1386                 PRINTK("DEBUG: snd_korg1212_prepare [%s]\n", stateName[korg1212->cardState]);
     1393#if K1212_DEBUG_LEVEL > 0
     1394                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_prepare [%s]\n", stateName[korg1212->cardState]);
    13871395#endif
    13881396
     
    14021410        korg1212_t *korg1212 = _snd_pcm_substream_chip(substream);
    14031411
    1404 #ifdef DEBUG
    1405                 PRINTK("DEBUG: snd_korg1212_trigger [%s] cmd=%d\n", stateName[korg1212->cardState], cmd);
     1412#if K1212_DEBUG_LEVEL > 0
     1413                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_trigger [%s] cmd=%d\n", stateName[korg1212->cardState], cmd);
    14061414#endif
    14071415
     
    14331441        pos = korg1212->currentBuffer * kPlayBufferFrames;
    14341442
    1435 #ifdef XDEBUG
    1436                 PRINTK("DEBUG: snd_korg1212_pointer [%s] %ld\n", stateName[korg1212->cardState], pos);
     1443#if K1212_DEBUG_LEVEL > 1
     1444                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_pointer [%s] %ld\n", stateName[korg1212->cardState], pos);
    14371445#endif
    14381446
     
    14491457        KorgAudioFrame * dst = korg1212->playDataBufsPtr[0].bufferData + pos;
    14501458
    1451 #ifdef DEBUG
    1452                 PRINTK("DEBUG: snd_korg1212_playback_copy [%s] %ld %ld\n", stateName[korg1212->cardState], pos, count);
     1459#if K1212_DEBUG_LEVEL > 0
     1460                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_copy [%s] %ld %ld\n", stateName[korg1212->cardState], pos, count);
    14531461#endif
    14541462 
    14551463        snd_assert(pos + count <= K1212_MAX_SAMPLES, return -EINVAL);
    14561464
    1457         copy_from_user(dst, src, count * K1212_FRAME_SIZE);
    1458 
    1459         return 0;
     1465        return copy_from_user(dst, src, count * K1212_FRAME_SIZE) ? -EFAULT : 0;
    14601466}
    14611467
     
    14691475        KorgAudioFrame * src = korg1212->recordDataBufsPtr[0].bufferData + pos;
    14701476
    1471 #ifdef DEBUG
    1472                 PRINTK("DEBUG: snd_korg1212_capture_copy [%s] %ld %ld\n", stateName[korg1212->cardState], pos, count);
     1477#if K1212_DEBUG_LEVEL > 0
     1478                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_capture_copy [%s] %ld %ld\n", stateName[korg1212->cardState], pos, count);
    14731479#endif
    14741480
    14751481        snd_assert(pos + count <= K1212_MAX_SAMPLES, return -EINVAL);
    14761482
    1477         copy_to_user(dst, src, count * K1212_FRAME_SIZE);
    1478 
    1479         return 0;
     1483        return copy_to_user(dst, src, count * K1212_FRAME_SIZE) ? -EFAULT : 0;
    14801484}
    14811485
     
    14881492        KorgAudioFrame * dst = korg1212->playDataBufsPtr[0].bufferData + pos;
    14891493
    1490 #ifdef DEBUG
    1491                 PRINTK("DEBUG: snd_korg1212_playback_silence [%s]\n", stateName[korg1212->cardState]);
     1494#if K1212_DEBUG_LEVEL > 0
     1495                K1212_DEBUG_PRINTK("K1212_DEBUG: snd_korg1212_playback_silence [%s]\n", stateName[korg1212->cardState]);
    14921496#endif
    14931497
     
    19401944        iomem2_size = pci_resource_len(korg1212->pci, 2);
    19411945
    1942 #ifdef DEBUG
    1943         PRINTK("DEBUG: resources:\n"
     1946#if K1212_DEBUG_LEVEL > 0
     1947        K1212_DEBUG_PRINTK("K1212_DEBUG: resources:\n"
    19441948                   "    iomem = 0x%lx (%d)\n"
    19451949                   "    ioport  = 0x%lx (%d)\n"
     
    20052009        korg1212->idRegPtr = (u32 *) (korg1212->iobase + DEV_VEND_ID_OFFSET);
    20062010
    2007 #ifdef DEBUG
    2008         PRINTK("DEBUG: card registers:\n"
     2011#if K1212_DEBUG_LEVEL > 0
     2012        K1212_DEBUG_PRINTK("K1212_DEBUG: card registers:\n"
    20092013                   "    Status register = 0x%p\n"
    20102014                   "    OutDoorbell     = 0x%p\n"
     
    20392043        }
    20402044
    2041 #ifdef DEBUG
    2042         PRINTK("DEBUG: Shared Buffer Area = 0x%p (0x%08lx), %d bytes\n", korg1212->sharedBufferPtr, korg1212->sharedBufferPhy, sizeof(KorgSharedBuffer));
    2043 #endif
    2044 
    2045 #ifndef LARGEALLOC
     2045#if K1212_DEBUG_LEVEL > 0
     2046        K1212_DEBUG_PRINTK("K1212_DEBUG: Shared Buffer Area = 0x%p (0x%08lx), %d bytes\n", korg1212->sharedBufferPtr, korg1212->sharedBufferPhy, sizeof(KorgSharedBuffer));
     2047#endif
     2048
     2049#ifndef K1212_LARGEALLOC
    20462050
    20472051        korg1212->DataBufsSize = sizeof(KorgAudioBuffer) * kNumBuffers;
     
    20552059        }
    20562060
    2057 #ifdef DEBUG
    2058         PRINTK("DEBUG: Play Data Area = 0x%p (0x%08x), %d bytes\n",
     2061#if K1212_DEBUG_LEVEL > 0
     2062        K1212_DEBUG_PRINTK("K1212_DEBUG: Play Data Area = 0x%p (0x%08x), %d bytes\n",
    20592063                korg1212->playDataBufsPtr, korg1212->PlayDataPhy, korg1212->DataBufsSize);
    20602064#endif
     
    20682072        }
    20692073
    2070 #ifdef DEBUG
    2071         PRINTK("DEBUG: Record Data Area = 0x%p (0x%08x), %d bytes\n",
     2074#if K1212_DEBUG_LEVEL > 0
     2075        K1212_DEBUG_PRINTK("K1212_DEBUG: Record Data Area = 0x%p (0x%08x), %d bytes\n",
    20722076                korg1212->recordDataBufsPtr, korg1212->RecDataPhy, korg1212->DataBufsSize);
    20732077#endif
    20742078
    2075 #else // LARGEALLOC
     2079#else // K1212_LARGEALLOC
    20762080
    20772081        korg1212->recordDataBufsPtr = korg1212->sharedBufferPtr->recordDataBufs;
     
    20802084        korg1212->RecDataPhy  = (u32) &((KorgSharedBuffer *) korg1212->sharedBufferPhy)->recordDataBufs;
    20812085
    2082 #endif // LARGEALLOC
     2086#endif // K1212_LARGEALLOC
    20832087
    20842088        korg1212->dspCodeSize = sizeof (dspCode);
     
    20962100        }
    20972101
    2098 #ifdef DEBUG
    2099         PRINTK("DEBUG: DSP Code area = 0x%p (0x%08x) %d bytes [%s]\n",
     2102#if K1212_DEBUG_LEVEL > 0
     2103        K1212_DEBUG_PRINTK("K1212_DEBUG: DSP Code area = 0x%p (0x%08x) %d bytes [%s]\n",
    21002104                   korg1212->dspMemPtr, korg1212->dspMemPhy, korg1212->dspCodeSize,
    21012105                   stateName[korg1212->cardState]);
     
    21042108        rc = snd_korg1212_Send1212Command(korg1212, K1212_DB_RebootCard, 0, 0, 0, 0);
    21052109
    2106 #ifdef DEBUG
    2107         if (rc) PRINTK("DEBUG: Reboot Card - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
     2110#if K1212_DEBUG_LEVEL > 0
     2111        if (rc) K1212_DEBUG_PRINTK("K1212_DEBUG: Reboot Card - RC = %d [%s]\n", rc, stateName[korg1212->cardState]);
    21082112#endif
    21092113
     
    22022206        }
    22032207
    2204 #ifndef LARGEALLOC
     2208#ifndef K1212_LARGEALLOC
    22052209
    22062210        // ------------------------------------------------------
     
    22402244static void snd_korg1212_card_free(snd_card_t *card)
    22412245{
    2242 #ifdef DEBUG
    2243         PRINTK("DEBUG: Freeing card\n");
     2246#if K1212_DEBUG_LEVEL > 0
     2247        K1212_DEBUG_PRINTK("K1212_DEBUG: Freeing card\n");
    22442248#endif
    22452249        snd_korg1212_free(card->private_data);
     
    22812285                korg1212->iomem, korg1212->irq);
    22822286
    2283 #ifdef DEBUG
    2284         PRINTK("DEBUG: %s\n", card->longname);
     2287#if K1212_DEBUG_LEVEL > 0
     2288        K1212_DEBUG_PRINTK("K1212_DEBUG: %s\n", card->longname);
    22852289#endif
    22862290
  • GPL/branches/alsa-resync1/alsa-kernel/pci/maestro3.c

    r206 r207  
    3737#include <linux/interrupt.h>
    3838#include <linux/init.h>
     39#include <linux/pci.h>
    3940#include <linux/slab.h>
    4041#include <linux/vmalloc.h>
  • GPL/branches/alsa-resync1/alsa-kernel/pci/rme96.c

    r112 r207  
    2828#include <linux/delay.h>
    2929#include <linux/init.h>
     30#include <linux/pci.h>
    3031#include <linux/slab.h>
    3132#include <sound/core.h>
     
    3839
    3940/* note, two last pcis should be equal, it is not a bug */
    40 EXPORT_NO_SYMBOLS;
    4141
    4242MODULE_AUTHOR("Anders Torger <torger@ludd.luth.se>");
  • GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/hammerfall_mem.c

    r206 r207  
    55        Copyright (C) 1999 Paul Barton-Davis
    66
    7     This module is only needed if you compiled the rme9652 driver with
     7    This module is only needed if you compiled the hammerfall driver with
    88    the PREALLOCATE_MEMORY option. It allocates the memory need to
    99    run the board and holds it until the module is unloaded. Because
     
    2424    You should have received a copy of the GNU General Public License
    2525    along with this program; if not, write to the Free Software
    26     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    27 
    28     $Id: rme9652_mem.c,v 1.1.1.1 2003/07/02 13:56:54 eleph Exp $
     26    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
     27
     28    hammerfall_mem.c,v 1.2 2002/06/19 08:52:11 perex Exp
    2929
    3030
     
    3535*/
    3636
    37 #ifdef ALSA_BUILD
    3837#ifdef TARGET_OS2
    3938#include <sound/driver.h>
    4039#endif
    41 #define MODULE
    42 #endif
    4340#include <linux/config.h>
    4441#include <linux/version.h>
    45 #if defined(ALSA_BUILD) && defined(CONFIG_MODVERSIONS) && !defined(__GENKSYMS__) && !defined(__DEPEND__)
    46 #define MODVERSIONS
    47 #include <linux/modversions.h>
    48 #include <sound/sndversions.h>
    49 #endif
    5042#include <linux/module.h>
    5143#include <linux/pci.h>
    5244#include <linux/init.h>
     45#include <linux/mm.h>
    5346#include <sound/initval.h>
    5447
    55 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
    56 #include <linux/kernel.h>
    57 #include <linux/sched.h>
    58 #include <linux/malloc.h>
    59 #include <asm/io.h>
    60 #define __init
    61 #define __exit
    62 #define virt_to_page(x) (&mem_map[MAP_NR(x)])
    63 #define pci_for_each_dev(dev) \
    64         for(dev = pci_devices; dev; dev = dev->next)
    65 #endif
    66 
    67 #define RME9652_CARDS                   8
    68 #define RME9652_CHANNEL_BUFFER_SAMPLES  (16*1024)
    69 #define RME9652_CHANNEL_BUFFER_BYTES    (4*RME9652_CHANNEL_BUFFER_SAMPLES)
     48#define HAMMERFALL_CARDS                        8
     49#define HAMMERFALL_CHANNEL_BUFFER_SAMPLES  (16*1024)
     50#define HAMMERFALL_CHANNEL_BUFFER_BYTES    (4*HAMMERFALL_CHANNEL_BUFFER_SAMPLES)
    7051
    7152/* export */
    7253
    7354static int snd_enable[8] = {1,1,1,1,1,1,1,1};
    74 MODULE_PARM(snd_enable, "1-" __MODULE_STRING(RME9652_CARDS) "i");
     55MODULE_PARM(snd_enable, "1-" __MODULE_STRING(HAMMERFALL_CARDS) "i");
    7556MODULE_PARM_DESC(snd_enable, "Enable cards to allocate buffers for.");
    7657
     
    7859MODULE_DESCRIPTION("Memory allocator for RME Hammerfall");
    7960MODULE_CLASSES("{sound}");
     61MODULE_LICENSE("GPL");
    8062
    8163/* Since we don't know at this point if we're allocating memory for a
    8264   Hammerfall or a Hammerfall/Light, assume the worst and allocate
    8365   space for the maximum number of channels.
    84                    
    85    See note in rme9652.h about why we allocate for an extra channel. 
     66
     67   The extra channel is allocated because we need a 64kB-aligned
     68   buffer in the actual interface driver code (see rme9652.c or hdsp.c
     69   for details)
    8670*/
    8771
    88 #define TOTAL_SIZE (26+1)*(RME9652_CHANNEL_BUFFER_BYTES)
    89 #define NBUFS   2*RME9652_CARDS
    90 
    91 #define RME9652_BUF_ALLOCATED 0x1
    92 #define RME9652_BUF_USED      0x2
    93 
    94 typedef struct rme9652_buf_stru rme9652_buf_t;
    95 
    96 struct rme9652_buf_stru {
     72#define TOTAL_SIZE (26+1)*(HAMMERFALL_CHANNEL_BUFFER_BYTES)
     73#define NBUFS   2*HAMMERFALL_CARDS
     74
     75#define HAMMERFALL_BUF_ALLOCATED 0x1
     76#define HAMMERFALL_BUF_USED      0x2
     77
     78typedef struct hammerfall_buf_stru hammerfall_buf_t;
     79
     80struct hammerfall_buf_stru {
    9781        struct pci_dev *pci;
    9882        void *buf;
     
    10185};
    10286
    103 static rme9652_buf_t rme9652_buffers[NBUFS];
    104 
    105 /* These are here so that we have absolutely no dependencies on any
    106    other modules. Dependencies can (1) cause us to lose in the rush
    107    for 2x 1.6MB chunks of contiguous memory and (2) make driver
    108    debugging difficult because unloading and reloading the snd module
    109    causes us to have to do the same for this one. Since on 2.2
    110    kernels, and before, we can rarely if ever allocate memory after
    111    starting things running, this would be bad.
     87static hammerfall_buf_t hammerfall_buffers[NBUFS];
     88
     89/* These are here so that we have absolutely no dependencies
     90   on any other modules. Dependencies can (1) cause us to
     91   lose in the rush for 2x1.6MB chunks of contiguous memory
     92   and (2) make driver debugging difficult because unloading
     93   and reloading the snd module causes us to have to do the
     94   same for this one. Since we can rarely if ever allocate
     95   memory after starting things running, that would be very
     96   undesirable. 
    11297*/
    11398
     
    117102#endif
    118103
    119 static void *rme9652_malloc_pages(struct pci_dev *pci,
     104static void *hammerfall_malloc_pages(struct pci_dev *pci,
    120105                                  unsigned long size,
    121106                                  dma_addr_t *dmaaddr)
     
    133118#endif
    134119        if (res != NULL) {
    135                 mem_map_t *page = virt_to_page(res);
    136                 mem_map_t *last_page = page + (size + PAGE_SIZE - 1) / PAGE_SIZE;
     120                struct page *page = virt_to_page(res);
     121                struct page *last_page = page + (size + PAGE_SIZE - 1) / PAGE_SIZE;
    137122                while (page < last_page)
    138123                        set_bit(PG_reserved, &(page++)->flags);
     
    141126}
    142127
    143 static void rme9652_free_pages(struct pci_dev *pci, unsigned long size,
     128static void hammerfall_free_pages(struct pci_dev *pci, unsigned long size,
    144129                               void *ptr, dma_addr_t dmaaddr)
    145130{
    146         mem_map_t *page, *last_page;
     131        struct page *page, *last_page;
    147132
    148133        if (ptr == NULL)
     
    159144                for (pg = 0; PAGE_SIZE * (1 << pg) < size; pg++);
    160145                if (bus_to_virt(dmaaddr) != ptr) {
    161                         printk(KERN_ERR "rme9652_free_pages: dmaaddr != ptr\n");
     146                        printk(KERN_ERR "hammerfall_free_pages: dmaaddr != ptr\n");
    162147                        return;
    163148                }
     
    167152}
    168153
    169 void *snd_rme9652_get_buffer (int card, dma_addr_t *dmaaddr)
    170 
    171 {
    172         int i;
    173         rme9652_buf_t *rbuf;
    174 
    175         if (card < 0 || card >= RME9652_CARDS) {
    176                 printk(KERN_ERR "snd_rme9652_get_buffer: card %d is out of range", card);
    177                 return NULL;
    178         }
    179         for (i = card * 2; i < card * 2 + 2; i++) {
    180                 rbuf = &rme9652_buffers[i];
    181                 if (rbuf->flags == RME9652_BUF_ALLOCATED) {
    182                         rbuf->flags |= RME9652_BUF_USED;
     154void *snd_hammerfall_get_buffer (struct pci_dev *pcidev, dma_addr_t *dmaaddr)
     155{
     156        int i;
     157        hammerfall_buf_t *rbuf;
     158
     159        for (i = 0; i < NBUFS; i++) {
     160                rbuf = &hammerfall_buffers[i];
     161                if (rbuf->flags == HAMMERFALL_BUF_ALLOCATED) {
     162                        rbuf->flags |= HAMMERFALL_BUF_USED;
     163                        rbuf->pci = pcidev;
    183164                        MOD_INC_USE_COUNT;
    184165                        *dmaaddr = rbuf->addr;
     
    190171}
    191172
    192 void snd_rme9652_free_buffer (int card, void *addr)
    193 
    194 {
    195         int i;
    196         rme9652_buf_t *rbuf;
    197 
    198         if (card < 0 || card >= RME9652_CARDS) {
    199                 printk(KERN_ERR "snd_rme9652_get_buffer: card %d is out of range", card);
    200                 return;
    201         }
    202         for (i = card * 2; i < card * 2 + 2; i++) {
    203                 rbuf = &rme9652_buffers[i];
    204                 if (rbuf->buf == addr) {
     173void snd_hammerfall_free_buffer (struct pci_dev *pcidev, void *addr)
     174{
     175        int i;
     176        hammerfall_buf_t *rbuf;
     177
     178        for (i = 0; i < NBUFS; i++) {
     179                rbuf = &hammerfall_buffers[i];
     180                if (rbuf->buf == addr && rbuf->pci == pcidev) {
    205181                        MOD_DEC_USE_COUNT;
    206                         rbuf->flags &= ~RME9652_BUF_USED;
     182                        rbuf->flags &= ~HAMMERFALL_BUF_USED;
    207183                        return;
    208184                }
    209185        }
    210186
    211         printk ("RME9652 memory allocator: unknown buffer address passed to free buffer");
    212 }
    213 
    214 static void __exit rme9652_free_buffers (void)
    215 
    216 {
    217         int i;
    218         rme9652_buf_t *rbuf;
     187        printk ("Hammerfall memory allocator: unknown buffer address or PCI device ID");
     188}
     189
     190static void __exit hammerfall_free_buffers (void)
     191
     192{
     193        int i;
     194        hammerfall_buf_t *rbuf;
    219195
    220196        for (i = 0; i < NBUFS; i++) {
     
    228204                */
    229205
    230                 rbuf = &rme9652_buffers[i];
    231 
    232                 if (rbuf->flags == RME9652_BUF_ALLOCATED) {
    233                         rme9652_free_pages (rbuf->pci, TOTAL_SIZE, rbuf->buf, rbuf->addr);
     206                rbuf = &hammerfall_buffers[i];
     207
     208                if (rbuf->flags == HAMMERFALL_BUF_ALLOCATED) {
     209                        hammerfall_free_pages (rbuf->pci, TOTAL_SIZE, rbuf->buf, rbuf->addr);
    234210                        rbuf->buf = NULL;
    235211                        rbuf->flags = 0;
     
    238214}                               
    239215
    240 static int __init alsa_rme9652_mem_init(void)
     216static int __init alsa_hammerfall_mem_init(void)
    241217{
    242218        int i;
    243219        struct pci_dev *pci;
    244         rme9652_buf_t *rbuf;
     220        hammerfall_buf_t *rbuf;
    245221
    246222        /* make sure our buffer records are clean */
    247223
    248224        for (i = 0; i < NBUFS; i++) {
    249                 rbuf = &rme9652_buffers[i];
     225                rbuf = &hammerfall_buffers[i];
    250226                rbuf->pci = NULL;
    251227                rbuf->buf = NULL;
     
    260236       
    261237        i = 0;  /* card number */
    262         rbuf = rme9652_buffers;
     238        rbuf = hammerfall_buffers;
    263239        pci_for_each_dev(pci) {
    264240                int k;
    265                 if (pci->vendor != 0x10ee || pci->device != 0x3fc4)
     241               
     242                /* check for Hammerfall and Hammerfall DSP cards */
     243
     244                if (pci->vendor != 0x10ee || (pci->device != 0x3fc4 && pci->device != 0x3fc5))
    266245                        continue;
    267246
     
    270249
    271250                for (k = 0; k < 2; ++k) {
    272                         rbuf->buf = rme9652_malloc_pages(pci, TOTAL_SIZE, &rbuf->addr);
     251                        rbuf->buf = hammerfall_malloc_pages(pci, TOTAL_SIZE, &rbuf->addr);
    273252                        if (rbuf->buf == NULL) {
    274                                 rme9652_free_buffers();
    275                                 printk(KERN_ERR "RME9652 memory allocator: no memory available for card %d buffer %d\n", i, k + 1);
     253                                hammerfall_free_buffers();
     254                                printk(KERN_ERR "Hammerfall memory allocator: no memory available for card %d buffer %d\n", i, k + 1);
    276255                                return -ENOMEM;
    277256                        }
    278                         rbuf->flags = RME9652_BUF_ALLOCATED;
     257                        rbuf->flags = HAMMERFALL_BUF_ALLOCATED;
    279258                        rbuf++;
    280259                }
     
    283262
    284263        if (i == 0)
    285                 printk(KERN_ERR "RME9652 memory allocator: no RME9652 card found...\n");
    286        
     264                printk(KERN_ERR "Hammerfall memory allocator: "
     265                       "no Hammerfall cards found...\n");
     266        else
     267                printk(KERN_ERR "Hammerfall memory allocator: "
     268                       "buffers allocated for %d cards\n", i);
     269
    287270        return 0;
    288271}
    289272
    290 static void __exit alsa_rme9652_mem_exit(void)
    291 {
    292         rme9652_free_buffers();
    293 }
    294 
    295 module_init(alsa_rme9652_mem_init)
    296 module_exit(alsa_rme9652_mem_exit)
    297 
    298 EXPORT_SYMBOL(snd_rme9652_get_buffer);
    299 EXPORT_SYMBOL(snd_rme9652_free_buffer);
     273static void __exit alsa_hammerfall_mem_exit(void)
     274{
     275        hammerfall_free_buffers();
     276}
     277
     278module_init(alsa_hammerfall_mem_init)
     279module_exit(alsa_hammerfall_mem_exit)
     280
     281EXPORT_SYMBOL(snd_hammerfall_get_buffer);
     282EXPORT_SYMBOL(snd_hammerfall_free_buffer);
  • GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/makefile.os2

    r32 r207  
    1313#
    1414#===================================================================
    15 FILE1    = rme9652_mem.obj rme9652.obj
     15FILE1    = hammerfall_mem.obj rme9652.obj hdsp.obj
    1616FILE2    =
    1717FILE3    =
  • GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/rme9652.c

    r112 r207  
    2525#include <linux/delay.h>
    2626#include <linux/init.h>
     27#include <linux/pci.h>
    2728#include <linux/slab.h>
    2829#include <sound/core.h>
     
    3940static int snd_precise_ptr[SNDRV_CARDS] = { [0 ... (SNDRV_CARDS-1)] = 0 }; /* Enable precise pointer */
    4041
    41 EXPORT_NO_SYMBOLS;
    4242MODULE_PARM(snd_index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
    4343MODULE_PARM_DESC(snd_index, "Index value for RME Digi9652 (Hammerfall) soundcard.");
     
    304304};
    305305
    306 #define RME9652_PREALLOCATE_MEMORY      /* via module snd-rme9652_mem */
     306#define RME9652_PREALLOCATE_MEMORY      /* via module snd-hammerfall-mem */
    307307
    308308#ifdef RME9652_PREALLOCATE_MEMORY
    309 extern void *snd_rme9652_get_buffer(int card, dma_addr_t *dmaaddr);
    310 extern void snd_rme9652_free_buffer(int card, void *ptr);
     309extern void *snd_hammerfall_get_buffer(struct pci_dev *, dma_addr_t *dmaaddr);
     310extern void snd_hammerfall_free_buffer(struct pci_dev *, void *ptr);
    311311#endif
    312312
     
    479479        int reject_if_open = 0;
    480480        int xrate;
     481
     482        if (!snd_rme9652_use_is_exclusive (rme9652)) {
     483                return -EBUSY;
     484        }
    481485
    482486        /* Changing from a "single speed" to a "double speed" rate is
     
    523527        }
    524528
    525         if (reject_if_open &&
    526             (rme9652->capture_pid >= 0 || rme9652->playback_pid >= 0)) {
     529        if (reject_if_open && (rme9652->capture_pid >= 0 || rme9652->playback_pid >= 0)) {
    527530                spin_unlock_irq(&rme9652->lock);
    528531                return -EBUSY;
     
    532535                rme9652_stop(rme9652);
    533536        }
    534 
    535537        rme9652->control_register &= ~(RME9652_freq | RME9652_DS);
    536538        rme9652->control_register |= rate;
     
    19381940                                   rme9652->capture_buffer_addr);
    19391941#else
    1940                 snd_rme9652_free_buffer(rme9652->dev, rme9652->capture_buffer_unaligned);
     1942                snd_hammerfall_free_buffer(rme9652->pci, rme9652->capture_buffer_unaligned);
    19411943#endif
    19421944        }
     
    19491951                                   rme9652->playback_buffer_addr);
    19501952#else
    1951                 snd_rme9652_free_buffer(rme9652->dev, rme9652->playback_buffer_unaligned);
     1953                snd_hammerfall_free_buffer(rme9652->pci, rme9652->playback_buffer_unaligned);
    19521954#endif
    19531955        }
     
    19821984        pb = snd_malloc_pci_pages(rme9652->pci, RME9652_DMA_AREA_BYTES, &pb_addr);
    19831985#else
    1984         cb = snd_rme9652_get_buffer(rme9652->dev, &cb_addr);
    1985         pb = snd_rme9652_get_buffer(rme9652->dev, &pb_addr);
     1986        cb = snd_hammerfall_get_buffer(rme9652->pci, &cb_addr);
     1987        pb = snd_hammerfall_get_buffer(rme9652->pci, &pb_addr);
    19861988#endif
    19871989
     
    19891991                if (cb) {
    19901992#ifdef RME9652_PREALLOCATE_MEMORY
    1991                         snd_rme9652_free_buffer(rme9652->dev, cb);
     1993                        snd_hammerfall_free_buffer(rme9652->pci, cb);
    19921994#else
    19931995                        snd_free_pci_pages(rme9652->pci, RME9652_DMA_AREA_BYTES, cb, cb_addr);
     
    19961998                if (pb) {
    19971999#ifdef RME9652_PREALLOCATE_MEMORY
    1998                         snd_rme9652_free_buffer(rme9652->dev, pb);
     2000                        snd_hammerfall_free_buffer(rme9652->pci, pb);
    19992001#else
    20002002                        snd_free_pci_pages(rme9652->pci, RME9652_DMA_AREA_BYTES, pb, pb_addr);
     
    21282130                                                       channel);
    21292131        snd_assert(channel_buf != NULL, return -EIO);
    2130         copy_from_user(channel_buf + pos * 4, src, count * 4);
     2132        if (copy_from_user(channel_buf + pos * 4, src, count * 4))
     2133                return -EFAULT;
    21312134        return count;
    21322135}
     
    21432146                                                       channel);
    21442147        snd_assert(channel_buf != NULL, return -EIO);
    2145         copy_to_user(dst, channel_buf + pos * 4, count * 4);
     2148        if (copy_to_user(dst, channel_buf + pos * 4, count * 4))
     2149                return -EFAULT;
    21462150        return count;
    21472151}
     
    23422346                                rme9652_silence_playback(rme9652);
    23432347                }
     2348        } else {
     2349                if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
     2350                        rme9652_silence_playback(rme9652);
    23442351        }
    23452352 _ok:
     
    27692776        rme9652->card = card;
    27702777
     2778        pci_read_config_word(rme9652->pci, PCI_CLASS_REVISION, &rev);
     2779
     2780        switch (rev & 0xff) {
     2781        case 3:
     2782        case 4:
     2783        case 8:
     2784        case 9:
     2785                break;
     2786
     2787        default:
     2788                /* who knows? */
     2789                return -ENODEV;
     2790        }
     2791
    27712792        if ((err = pci_enable_device(pci)) < 0)
    27722793                return err;
     
    27802801        }
    27812802
    2782         if (request_irq(pci->irq, snd_rme9652_interrupt, SA_INTERRUPT|SA_SHIRQ, "rme9652", (void *)rme9652)) {
    2783                 snd_printk("unable to grab IRQ %d\n", pci->irq);
    2784                 return -EBUSY;
    2785         }
    2786         rme9652->irq = pci->irq;
    2787 
    27882803        rme9652->iobase = (unsigned long) ioremap_nocache(rme9652->port, RME9652_IO_EXTENT);
    27892804        if (rme9652->iobase == 0) {
     
    27922807        }
    27932808
     2809        if (request_irq(pci->irq, snd_rme9652_interrupt, SA_INTERRUPT|SA_SHIRQ, "rme9652", (void *)rme9652)) {
     2810                snd_printk("unable to request IRQ %d\n", pci->irq);
     2811                return -EBUSY;
     2812        }
     2813        rme9652->irq = pci->irq;
    27942814        rme9652->precise_ptr = precise_ptr;
    27952815
     
    28132833        */
    28142834
    2815         pci_read_config_word(rme9652->pci, PCI_CLASS_REVISION, &rev);
    2816         strcpy(card->driver, "RME9652");
    2817         switch (rev & 0xff) {
     2835        switch (rev) {
    28182836        case 8: /* original eprom */
    28192837                strcpy(card->driver, "RME9636");
     
    28312849                break;
    28322850        case 4: /* W52_G EPROM */
     2851                strcpy(card->driver, "RME9652");
    28332852                rme9652->card_name = "RME Digi9652 (Rev G)";
    28342853                rme9652->ss_channels = RME9652_NCHANNELS;
    28352854                break;
    2836         default:
    28372855        case 3: /* original eprom */
     2856                strcpy(card->driver, "RME9652");
    28382857                if (rme9652->hw_rev == 15) {
    28392858                        rme9652->card_name = "RME Digi9652 (Rev 1.5)";
  • GPL/branches/alsa-resync1/alsa-kernel/pci/sonicvibes.c

    r112 r207  
    2727#include <linux/delay.h>
    2828#include <linux/init.h>
     29#include <linux/pci.h>
    2930#include <linux/slab.h>
    3031#include <sound/core.h>
     
    3940#include <linux/gameport.h>
    4041#endif
    41 
    42 EXPORT_NO_SYMBOLS;
    4342
    4443MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident.c

    r206 r207  
    2424#include <sound/driver.h>
    2525#include <linux/init.h>
     26#include <linux/pci.h>
    2627#include <linux/time.h>
    2728#include <sound/core.h>
  • GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident_main.c

    r206 r207  
    3333#include <linux/delay.h>
    3434#include <linux/init.h>
     35#include <linux/pci.h>
    3536#include <linux/slab.h>
    3637#include <linux/vmalloc.h>
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ymfpci/ymfpci.c

    r92 r207  
    2222#include <sound/driver.h>
    2323#include <linux/init.h>
     24#include <linux/pci.h>
    2425#include <linux/time.h>
    2526#include <sound/core.h>
     
    2930#define SNDRV_GET_ID
    3031#include <sound/initval.h>
    31 
    32 EXPORT_NO_SYMBOLS;
    3332
    3433MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ymfpci/ymfpci_main.c

    r106 r207  
    3030#include <linux/delay.h>
    3131#include <linux/init.h>
     32#include <linux/pci.h>
    3233#include <linux/slab.h>
    3334#include <sound/core.h>
Note: See TracChangeset for help on using the changeset viewer.