Changeset 519 for GPL/branches


Ignore:
Timestamp:
Jul 20, 2010, 5:52:49 PM (15 years ago)
Author:
David Azarewicz
Message:

Changes to PCI bus scan, malloc, cleanup all warnings, misc other changes

Location:
GPL/branches/uniaud32-2.1.x
Files:
42 edited

Legend:

Unmodified
Added
Removed
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/core/memalloc.c

    r504 r519  
    216216                        struct snd_dma_buffer *dmab)
    217217{
    218     dprintf(("snd_dma_alloc_pages with size = %d",size));
     218    dprintf(("snd_dma_alloc_pages with size = %d", size));
    219219        if (WARN_ON(!size))
    220220                return -ENXIO;
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/core/pcm_lib.c

    r499 r519  
    360360      __delta:
    361361        delta = (new_hw_ptr - old_hw_ptr) % runtime->boundary;
     362#ifdef CONFIG_SND_PCM_XRUN_DEBUG
    362363        if (xrun_debug(substream, in_interrupt ?
    363364                        XRUN_DEBUG_PERIODUPDATE : XRUN_DEBUG_HWPTRUPDATE)) {
     
    376377                           (unsigned long)runtime->hw_ptr_base);
    377378        }
     379#endif
    378380        /* something must be really wrong */
    379381        if (delta >= runtime->buffer_size + runtime->period_size) {
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/core/pcm_native.c

    r499 r519  
    34963496#endif /* CONFIG_SND_SUPPORT_OLD_API */
    34973497
     3498#if 0 /* DAZ */
    34983499#ifndef CONFIG_MMU
    34993500static unsigned long snd_pcm_get_unmapped_area(struct file *file,
     
    35193520#else
    35203521# define snd_pcm_get_unmapped_area NULL
     3522#endif
    35213523#endif
    35223524
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/core/seq/seq_timer.c

    r499 r519  
    4646                tmr->tick.resolution += s;
    4747        }
    48         if (tmr->tick.resolution <= 0)
     48        if (tmr->tick.resolution == 0) /* DAZ was 'unsigned <= 0' */
    4949                tmr->tick.resolution = 1;
    5050        snd_seq_timer_update_tick(&tmr->tick, 0);
     
    399399
    400400        cur_time = tmr->cur_time;
    401         if (tmr->running) { 
     401        if (tmr->running) {
    402402                struct timeval tm;
    403403                int usec;
     
    413413                snd_seq_sanity_real_time(&cur_time);
    414414        }
    415                
     415
    416416        return cur_time;       
    417417}
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/core/sgbuf.c

    r484 r519  
    118118        struct page **pgtable;
    119119
    120 #ifdef DEBUG
    121         dprintf(("snd_malloc_sgbuf_pages. size %x",size));
    122 #endif
     120        dprintf(("snd_malloc_sgbuf_pages. size %x", size));
    123121
    124122        dmab->area = NULL;
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/include/sound/adriver.h

    r305 r519  
     1DAZ - Apparently this file is not used by the driver on OS2
     2
    13#ifndef __SOUND_LOCAL_DRIVER_H
    24#define __SOUND_LOCAL_DRIVER_H
     
    963965        MODULE_PARM(name, SNDRV_MODULE_TYPE_##type)
    964966#else
    965 #define module_param_array(name, type, nump, perm) 
    966 #define module_param(name, type, perm) 
     967#define module_param_array(name, type, nump, perm)
     968#define module_param(name, type, perm)
    967969#endif /* TARGET_OS2 */
    968970#elif LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/ac97/ac97_codec.c

    r499 r519  
    14431443       
    14441444        /* build Beep controls */
    1445         if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) && 
     1445        if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) &&
    14461446                ((ac97->flags & AC97_HAS_PC_BEEP) ||
    14471447            snd_ac97_try_volume_mix(ac97, AC97_PC_BEEP))) {
     
    23612361        power |= AC97_PD_PR2;   /* Analog Mixer powerdown (Vref on) */
    23622362        snd_ac97_write(ac97, AC97_POWERDOWN, power);
     2363#ifdef CONFIG_SND_AC97_POWER_SAVE
    23632364        if (ac97_is_power_save_mode(ac97)) {
    23642365                power |= AC97_PD_PR3;   /* Analog Mixer powerdown */
     
    23702371                snd_ac97_write(ac97, AC97_POWERDOWN, power);
    23712372        }
     2373#endif
    23722374}
    23732375
     
    29142916        int result;
    29152917
    2916         snd_printdd("ac97_tune_hardware quirk=%lx override=%s pci=(%04x:%04x %04x:%04x) ac97=(%04x:%04x)\n",
     2918        dprintf(("ac97_tune_hardware: quirk=%lx override=%s pci=(%04x:%04x %04x:%04x) ac97=(%04x:%04x)",
    29172919                quirk, override,
    29182920                ac97->pci->vendor, ac97->pci->device, ac97->pci->subsystem_vendor, ac97->pci->subsystem_device,         
    2919                 ac97->subsystem_vendor, ac97->subsystem_device);
     2921                ac97->subsystem_vendor, ac97->subsystem_device));
    29202922        /* quirk overriden? */
    29212923        if (override && strcmp(override, "-1") && strcmp(override, "default")) {
    2922                 snd_printdd("ac97 quirk for %s (%04x:%04x)\n", override, ac97->subsystem_vendor, ac97->subsystem_device);
     2924                rprintf(("ac97 quirk for %s (%04x:%04x)", override, ac97->subsystem_vendor, ac97->subsystem_device));
    29232925                result = apply_quirk_str(ac97, override);
    29242926                if (result < 0)
    2925                         snd_printk(KERN_ERR "applying quirk type %s failed (%d)\n", override, result);
     2927                        rprintf(("applying quirk type %s failed (%d)", override, result));
    29262928                return result;
    29272929        }
     
    29432945                }
    29442946                if ( quirk->codec_id && (quirk->codec_id != ac97->id) ) continue;
    2945                 snd_printdd("ac97 quirk for %s (%04x:%04x)\n", quirk->name, ac97->subsystem_vendor, ac97->subsystem_device);
     2947                rprintf(("ac97 quirk for %s (%04x:%04x)", quirk->name, ac97->subsystem_vendor, ac97->subsystem_device));
    29462948                result = apply_quirk(ac97, quirk->type);
    2947                 if (result < 0) snd_printk(KERN_ERR "applying quirk type %d for %s failed (%d)\n", quirk->type, quirk->name, result);
     2949                if (result < 0) rprintf(("applying quirk type %d for %s failed (%d)", quirk->type, quirk->name, result));
    29482950                return result;
    29492951        }
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/atiixp.c

    r500 r519  
    352352 * a static RING of buffer descriptors is used.
    353353 *
    354  * the ring is built in this function, and is set up to the hardware. 
     354 * the ring is built in this function, and is set up to the hardware.
    355355 */
    356356static int atiixp_build_dma_packets(struct atiixp *chip, struct atiixp_dma *dma,
     
    375375        }
    376376
    377         if (dma->periods == periods && dma->period_bytes == period_bytes) { 
    378                 writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN, 
    379                         (char*)chip->remap_addr + dma->ops->llp_offset); 
     377        if (dma->periods == periods && dma->period_bytes == period_bytes) {
     378                writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN,
     379                        (char*)chip->remap_addr + dma->ops->llp_offset);
    380380                return 0;
    381381        }
     
    476476{
    477477        unsigned int data;
    478    
     478
    479479        if (snd_atiixp_acquire_codec(chip) < 0)
    480480                return;
     
    491491        struct atiixp *chip = ac97->private_data;
    492492        return snd_atiixp_codec_read(chip, ac97->num, reg);
    493    
     493
    494494}
    495495
     
    514514        /* perform a software reset */
    515515        atiixp_update(chip, CMD, ATI_REG_CMD_AC_SOFT_RESET, ATI_REG_CMD_AC_SOFT_RESET);
     516#pragma disable_message (302)
    516517        atiixp_read(chip, CMD);
    517518        udelay(10);
    518519        atiixp_update(chip, CMD, ATI_REG_CMD_AC_SOFT_RESET, 0);
    519    
     520
    520521        timeout = 10;
    521522        while (! (atiixp_read(chip, CMD) & ATI_REG_CMD_ACLINK_ACTIVE)) {
     
    531532                }
    532533        }
     534#pragma enable_message (302)
    533535
    534536        /* deassert RESET and assert SYNC to make sure */
     
    589591                ac97_codec = ac97_probing_bugs(chip->pci);
    590592        if (ac97_codec >= 0) {
    591                 chip->codec_not_ready_bits |= 
     593                chip->codec_not_ready_bits |=
    592594                        CODEC_CHECK_BITS ^ (1 << (ac97_codec + 10));
    593595                return 0;
     
    937939        atiixp_update(chip, 6CH_REORDER, ATI_REG_6CH_REORDER_EN,
    938940                      substream->runtime->channels >= 6 ? ATI_REG_6CH_REORDER_EN: 0);
    939    
     941
    940942        spin_unlock_irq(&chip->reg_lock);
    941943        return 0;
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/ca0106/ca0106_proc.c

    r499 r519  
    66 *  FEATURES currently supported:
    77 *    See ca0106_main.c for features.
    8  * 
     8 *
    99 *  Changelog:
    1010 *    Support interrupts per period.
     
    272272}
    273273
    274 static void snd_ca0106_proc_iec958(struct snd_info_entry *entry, 
     274static void snd_ca0106_proc_iec958(struct snd_info_entry *entry,
    275275                                       struct snd_info_buffer *buffer)
    276276{
     
    283283                  (value & 0x200000) ? "SPDIF Locked" : "No SPDIF Lock",
    284284                  (value & 0x400000) ? "Audio Valid" : "No valid audio" );
    285         snd_iprintf(buffer, "Estimated sample rate: %u\n", 
     285        snd_iprintf(buffer, "Estimated sample rate: %u\n",
    286286                  ((value & 0xfffff) * 48000) / 0x8000 );
    287287        if (value & 0x200000) {
     
    294294}
    295295
    296 static void snd_ca0106_proc_reg_write32(struct snd_info_entry *entry, 
     296static void snd_ca0106_proc_reg_write32(struct snd_info_entry *entry,
    297297                                       struct snd_info_buffer *buffer)
    298298{
     
    304304                if (sscanf(line, "%x %x", &reg, &val) != 2)
    305305                        continue;
    306                 if (reg < 0x40 && val <= 0xffffffff) {
     306                if (reg < 0x40 /* && val <= 0xffffffff DAZ */) {
    307307                        spin_lock_irqsave(&emu->emu_lock, flags);
    308308                        outl(val, emu->port + (reg & 0xfffffffc));
     
    312312}
    313313
    314 static void snd_ca0106_proc_reg_read32(struct snd_info_entry *entry, 
     314static void snd_ca0106_proc_reg_read32(struct snd_info_entry *entry,
    315315                                       struct snd_info_buffer *buffer)
    316316{
     
    328328}
    329329
    330 static void snd_ca0106_proc_reg_read16(struct snd_info_entry *entry, 
     330static void snd_ca0106_proc_reg_read16(struct snd_info_entry *entry,
    331331                                       struct snd_info_buffer *buffer)
    332332{
     
    344344}
    345345
    346 static void snd_ca0106_proc_reg_read8(struct snd_info_entry *entry, 
     346static void snd_ca0106_proc_reg_read8(struct snd_info_entry *entry,
    347347                                       struct snd_info_buffer *buffer)
    348348{
     
    360360}
    361361
    362 static void snd_ca0106_proc_reg_read1(struct snd_info_entry *entry, 
     362static void snd_ca0106_proc_reg_read1(struct snd_info_entry *entry,
    363363                                       struct snd_info_buffer *buffer)
    364364{
     
    378378}
    379379
    380 static void snd_ca0106_proc_reg_read2(struct snd_info_entry *entry, 
     380static void snd_ca0106_proc_reg_read2(struct snd_info_entry *entry,
    381381                                       struct snd_info_buffer *buffer)
    382382{
     
    396396}
    397397
    398 static void snd_ca0106_proc_reg_write(struct snd_info_entry *entry, 
     398static void snd_ca0106_proc_reg_write(struct snd_info_entry *entry,
    399399                                       struct snd_info_buffer *buffer)
    400400{
     
    405405                if (sscanf(line, "%x %x %x", &reg, &channel_id, &val) != 3)
    406406                        continue;
    407                 if (reg < 0x80 && val <= 0xffffffff && channel_id <= 3)
     407                if (reg < 0x80 && /* val <= 0xffffffff && DAZ */ channel_id <= 3)
    408408                        snd_ca0106_ptr_write(emu, reg, channel_id, val);
    409409        }
    410410}
    411411
    412 static void snd_ca0106_proc_i2c_write(struct snd_info_entry *entry, 
     412static void snd_ca0106_proc_i2c_write(struct snd_info_entry *entry,
    413413                                       struct snd_info_buffer *buffer)
    414414{
     
    450450                entry->mode |= S_IWUSR;
    451451        }
    452         if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) 
     452        if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry))
    453453                snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2);
    454454        return 0;
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/cmipci.c

    r499 r519  
    957957                if (rem < rec->dma_size)
    958958                        goto ok;
    959         } 
     959        }
    960960        printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem);
    961961        return SNDRV_PCM_POS_XRUN;
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/emu10k1/emu10k1_main.c

    r426 r519  
    712712}
    713713
     714#if kthread_create != 0 /* DAZ to stop compiler warning */
    714715static int emu1010_firmware_thread(void *data)
    715716{
     
    773774        return 0;
    774775}
     776#endif
    775777
    776778/*
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/emu10k1/emu10k1x.c

    r499 r519  
    108108/********************************************************************************************************/
    109109#define PLAYBACK_LIST_ADDR      0x00            /* Base DMA address of a list of pointers to each period/size */
    110                                                 /* One list entry: 4 bytes for DMA address, 
     110                                                /* One list entry: 4 bytes for DMA address,
    111111                                                 * 4 bytes for period_size << 16.
    112112                                                 * One list entry is 8 bytes long.
     
    187187 *  - channel 2 is the center/lfe channel
    188188 * Volume is controlled by the AC97 for the front and rear channels by
    189  * the PCM Playback Volume, Sigmatel Surround Playback Volume and 
     189 * the PCM Playback Volume, Sigmatel Surround Playback Volume and
    190190 * Surround Playback Volume. The Sigmatel 4-Speaker Stereo switch affects
    191191 * the front/rear channel mixing in the REAR OUT jack. When using the
     
    200200        int number;
    201201        int use;
    202  
     202
    203203        struct emu10k1x_pcm *epcm;
    204204};
     
    256256/* hardware definition */
    257257static struct snd_pcm_hardware snd_emu10k1x_playback_hw = {
    258         .info =                 (SNDRV_PCM_INFO_MMAP | 
     258        .info =                 (SNDRV_PCM_INFO_MMAP |
    259259                                 SNDRV_PCM_INFO_INTERLEAVED |
    260260                                 SNDRV_PCM_INFO_BLOCK_TRANSFER |
     
    275275
    276276static struct snd_pcm_hardware snd_emu10k1x_capture_hw = {
    277         .info =                 (SNDRV_PCM_INFO_MMAP | 
     277        .info =                 (SNDRV_PCM_INFO_MMAP |
    278278                                 SNDRV_PCM_INFO_INTERLEAVED |
    279279                                 SNDRV_PCM_INFO_BLOCK_TRANSFER |
     
    293293};
    294294
    295 static unsigned int snd_emu10k1x_ptr_read(struct emu10k1x * emu, 
    296                                           unsigned int reg, 
     295static unsigned int snd_emu10k1x_ptr_read(struct emu10k1x * emu,
     296                                          unsigned int reg,
    297297                                          unsigned int chn)
    298298{
    299299        unsigned long flags;
    300300        unsigned int regptr, val;
    301  
     301
    302302        regptr = (reg << 16) | chn;
    303303
     
    309309}
    310310
    311 static void snd_emu10k1x_ptr_write(struct emu10k1x *emu, 
    312                                    unsigned int reg, 
    313                                    unsigned int chn, 
     311static void snd_emu10k1x_ptr_write(struct emu10k1x *emu,
     312                                   unsigned int reg,
     313                                   unsigned int chn,
    314314                                   unsigned int data)
    315315{
     
    397397        epcm->emu = chip;
    398398        epcm->substream = substream;
    399  
     399
    400400        runtime->private_data = epcm;
    401401        runtime->private_free = snd_emu10k1x_pcm_free_substream;
    402  
     402
    403403        runtime->hw = snd_emu10k1x_playback_hw;
    404404
     
    531531                return 0;
    532532       
    533         if (ptr3 != ptr4) 
     533        if (ptr3 != ptr4)
    534534                ptr1 = snd_emu10k1x_ptr_read(emu, PLAYBACK_POINTER, channel);
    535535        ptr2 = bytes_to_frames(runtime, ptr1);
     
    653653        switch (cmd) {
    654654        case SNDRV_PCM_TRIGGER_START:
    655                 snd_emu10k1x_intr_enable(emu, INTE_CAP_0_LOOP | 
     655                snd_emu10k1x_intr_enable(emu, INTE_CAP_0_LOOP |
    656656                                         INTE_CAP_0_HALF_LOOP);
    657657                snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0)|TRIGGER_CAPTURE);
     
    660660        case SNDRV_PCM_TRIGGER_STOP:
    661661                epcm->running = 0;
    662                 snd_emu10k1x_intr_disable(emu, INTE_CAP_0_LOOP | 
     662                snd_emu10k1x_intr_disable(emu, INTE_CAP_0_LOOP |
    663663                                          INTE_CAP_0_HALF_LOOP);
    664664                snd_emu10k1x_ptr_write(emu, TRIGGER_CHANNEL, 0, snd_emu10k1x_ptr_read(emu, TRIGGER_CHANNEL, 0) & ~(TRIGGER_CAPTURE));
     
    707707        unsigned long flags;
    708708        unsigned short val;
    709  
     709
    710710        spin_lock_irqsave(&emu->emu_lock, flags);
    711711        outb(reg, emu->port + AC97ADDRESS);
     
    720720        struct emu10k1x *emu = ac97->private_data;
    721721        unsigned long flags;
    722  
     722
    723723        spin_lock_irqsave(&emu->emu_lock, flags);
    724724        outb(reg, emu->port + AC97ADDRESS);
     
    736736                .read = snd_emu10k1x_ac97_read,
    737737        };
    738  
     738
    739739        if ((err = snd_ac97_bus(chip->card, 0, &ops, NULL, &pbus)) < 0)
    740740                return err;
     
    800800                        snd_emu10k1x_pcm_interrupt(chip, cap_voice);
    801801                else
    802                         snd_emu10k1x_intr_disable(chip, 
     802                        snd_emu10k1x_intr_disable(chip,
    803803                                                  INTE_CAP_0_LOOP |
    804804                                                  INTE_CAP_0_HALF_LOOP);
     
    810810                        if (pvoice->use)
    811811                                snd_emu10k1x_pcm_interrupt(chip, pvoice);
    812                         else 
     812                        else
    813813                                snd_emu10k1x_intr_disable(chip, mask);
    814814                }
     
    836836        int err;
    837837        int capture = 0;
    838  
     838
    839839        if (rpcm)
    840840                *rpcm = NULL;
     
    844844        if ((err = snd_pcm_new(emu->card, "emu10k1x", device, 1, capture, &pcm)) < 0)
    845845                return err;
    846  
     846
    847847        pcm->private_data = emu;
    848848       
     
    873873
    874874        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
    875                                               snd_dma_pci_data(emu->pci), 
     875                                              snd_dma_pci_data(emu->pci),
    876876                                              32*1024, 32*1024);
    877  
     877
    878878        if (rpcm)
    879879                *rpcm = pcm;
    880  
     880
    881881        return 0;
    882882}
     
    916916        spin_lock_init(&chip->emu_lock);
    917917        spin_lock_init(&chip->voice_lock);
    918  
     918
    919919        chip->port = pci_resource_start(pci, 0);
    920920        if ((chip->res_port = request_region(chip->port, 8,
    921                                              "EMU10K1X")) == NULL) { 
     921                                             "EMU10K1X")) == NULL) {
    922922                snd_printk(KERN_ERR "emu10k1x: cannot allocate the port 0x%lx\n", chip->port);
    923923                snd_emu10k1x_free(chip);
     
    932932        }
    933933        chip->irq = pci->irq;
    934  
     934
    935935        if(snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
    936936                               4 * 1024, &chip->dma_buffer) < 0) {
     
    973973         */
    974974        snd_emu10k1x_ptr_write(chip, SPCS0, 0,
    975                                chip->spdif_bits[0] = 
     975                               chip->spdif_bits[0] =
    976976                               SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
    977977                               SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
     
    979979                               0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
    980980        snd_emu10k1x_ptr_write(chip, SPCS1, 0,
    981                                chip->spdif_bits[1] = 
     981                               chip->spdif_bits[1] =
    982982                               SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
    983983                               SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
     
    985985                               0x00000000 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT);
    986986        snd_emu10k1x_ptr_write(chip, SPCS2, 0,
    987                                chip->spdif_bits[2] = 
     987                               chip->spdif_bits[2] =
    988988                               SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 |
    989989                               SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC |
     
    10061006}
    10071007
    1008 static void snd_emu10k1x_proc_reg_read(struct snd_info_entry *entry, 
     1008static void snd_emu10k1x_proc_reg_read(struct snd_info_entry *entry,
    10091009                                       struct snd_info_buffer *buffer)
    10101010{
     
    10341034}
    10351035
    1036 static void snd_emu10k1x_proc_reg_write(struct snd_info_entry *entry, 
     1036static void snd_emu10k1x_proc_reg_write(struct snd_info_entry *entry,
    10371037                                        struct snd_info_buffer *buffer)
    10381038{
     
    10451045                        continue;
    10461046
    1047                 if (reg < 0x49 && val <= 0xffffffff && channel_id <= 2)
     1047                if (reg < 0x49 && /* val <= 0xffffffff && DAZ */ channel_id <= 2)
    10481048                        snd_emu10k1x_ptr_write(emu, reg, channel_id, val);
    10491049        }
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/emu10k1/memory.c

    r499 r519  
    304304        if (snd_BUG_ON(!emu))
    305305                return NULL;
    306         if (snd_BUG_ON(runtime->dma_bytes <= 0 ||
     306        if (snd_BUG_ON(runtime->dma_bytes == 0 ||
    307307                       runtime->dma_bytes >= MAXPAGES * EMUPAGESIZE))
    308308                return NULL;
     
    370370{
    371371        struct snd_emu10k1_memblk *blk;
    372         struct snd_util_memhdr *hdr = hw->memhdr; 
     372        struct snd_util_memhdr *hdr = hw->memhdr;
    373373
    374374        mutex_lock(&hdr->block_mutex);
     
    396396snd_emu10k1_synth_free(struct snd_emu10k1 *emu, struct snd_util_memblk *memblk)
    397397{
    398         struct snd_util_memhdr *hdr = emu->memhdr; 
     398        struct snd_util_memhdr *hdr = emu->memhdr;
    399399        struct snd_emu10k1_memblk *blk = (struct snd_emu10k1_memblk *)memblk;
    400400        unsigned long flags;
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/hda/hda_intel.c

    r517 r519  
    25582558                gcap &= ~ICH6_GCAP_64OK;
    25592559
     2560#pragma disable_message (135,302)
    25602561        /* allow 64bit DMA address if supported by H/W */
    25612562        if ((gcap & ICH6_GCAP_64OK) && !pci_set_dma_mask(pci, DMA_BIT_MASK(64)))
     
    25652566                pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32));
    25662567        }
     2568#pragma enable_message (135,302)
    25672569
    25682570        /* read number of streams from GCAP register instead of using
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/hda/hda_proc.c

    r499 r519  
    11/*
    22 * Universal Interface for Intel High Definition Audio Codec
    3  * 
     3 *
    44 * Generic proc interface
    55 *
     
    7272        i++;                    /* Update our search position */
    7373    return i;
    74 } 
     74}
    7575#endif
    7676
     77#ifndef TARGET_OS2
    7778static char *bits_names(unsigned int bits, char *names[], int size)
    7879{
     
    8990        return buf;
    9091}
     92#endif
    9193
    9294static const char *get_wid_type_name(unsigned int wid_value)
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/hda/patch_conexant.c

    r499 r519  
    549549                        return err;
    550550                spec->multiout.share_spdif = 1;
    551         } 
     551        }
    552552        if (spec->dig_in_nid) {
    553553                err = snd_hda_create_spdif_in_ctls(codec,spec->dig_in_nid);
     
    790790        spec->hp_present = snd_hda_jack_detect(codec, 0x11);
    791791
    792         bits = (spec->hp_present || !spec->cur_eapd) ? HDA_AMP_MUTE : 0; 
     792        bits = (spec->hp_present || !spec->cur_eapd) ? HDA_AMP_MUTE : 0;
    793793        snd_hda_codec_amp_stereo(codec, 0x10, HDA_OUTPUT, 0,
    794794                                 HDA_AMP_MUTE, bits);
     
    898898        { 0x13, AC_VERB_SET_CONNECT_SEL, 0x0 },
    899899        /* EAPD */
    900         {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */ 
     900        {0x10, AC_VERB_SET_EAPD_BTLENABLE, 0x2 }, /* default on */
    901901        {0} /* end */
    902902};
     
    14551455        {0x18, AC_VERB_SET_DIGI_CONVERT_1, 0},
    14561456
    1457         /* Ensure mic1, mic2, line1 pin widgets take input from the 
     1457        /* Ensure mic1, mic2, line1 pin widgets take input from the
    14581458         * OUT1 sum bus when acting as an output.
    14591459         */
     
    17861786        {0x1c, AC_VERB_SET_CONNECT_SEL, 0x0},
    17871787        /* EAPD */
    1788         {0x1a, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */ 
     1788        {0x1a, AC_VERB_SET_EAPD_BTLENABLE, 0x2}, /* default on */
    17891789        {0x16, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|CONEXANT_HP_EVENT},
    17901790        {0} /* end */
     
    29772977        struct conexant_spec *spec;
    29782978        int board_config;
     2979        int rc;
    29792980
    29802981        spec = kzalloc(sizeof(*spec), GFP_KERNEL);
     
    30533054                spec->dell_vostro = 1;
    30543055                spec->mic_boost = 3; /* default 30dB gain */
    3055                 snd_hda_attach_beep_device(codec, 0x13);
     3056                rc = snd_hda_attach_beep_device(codec, 0x13);
    30563057
    30573058                /* no S/PDIF out */
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/hda/patch_sigmatel.c

    r503 r519  
    47994799
    48004800        if ((codec->subsystem_id >> 16) == PCI_VENDOR_ID_HP) {
    4801                 while ((dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING,
    4802                                                                 NULL, dev))) {
     4801#if dmi_find_device != 0 /* DAZ to stop a compler warning */
     4802                while (dev = dmi_find_device(DMI_DEV_TYPE_OEM_STRING, NULL, dev)) {
    48034803                        if (sscanf(dev->name, "HP_Mute_LED_%d_%d",
    48044804                                  &spec->gpio_led_polarity,
     
    48134813                        }
    48144814                }
     4815#endif
    48154816
    48164817                /*
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/intel8x0.c

    r499 r519  
    24072407        iputdword(chip, ICHREG(GLOB_STA), cnt & status);
    24082408
     2409#ifdef CONFIG_SND_AC97_POWER_SAVE
    24092410        if (snd_intel8x0_ich_chip_can_cold_reset(chip))
    24102411                err = snd_intel8x0_ich_chip_cold_reset(chip);
    24112412        else
     2413#endif
    24122414                err = snd_intel8x0_ich_chip_reset(chip);
    24132415        if (err < 0)
     
    27962798        t *= 1000000;
    27972799        t += (stop_time.tv_nsec - start_time.tv_nsec) / 1000;
    2798         printk(KERN_INFO "%s: measured %lu usecs (%lu samples)\n", __func__, t, pos);
     2800        dprintf(("%s: measured %lu usecs (%lu samples)\n", __func__, t, pos));
    27992801        if (t == 0) {
    28002802                snd_printk(KERN_ERR "intel8x0: ?? calculation error..\n");
     
    28172819                chip->ac97_bus->clock = (chip->ac97_bus->clock * 48000) / pos;
    28182820      __end:
    2819         printk(KERN_INFO "intel8x0: clocking to %d\n", chip->ac97_bus->clock);
     2821        dprintf(("intel8x0: clocking to %d\n", chip->ac97_bus->clock));
    28202822        snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0);
    28212823}
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/pci/trident/trident_memory.c

    r399 r519  
    196196        int idx, page;
    197197
     198#pragma disable_message (136)
    198199        if (snd_BUG_ON(runtime->dma_bytes <= 0 ||
    199200                       runtime->dma_bytes > SNDRV_TRIDENT_MAX_PAGES *
    200201                                        SNDRV_TRIDENT_PAGE_SIZE))
    201202                return NULL;
     203#pragma enable_message (136)
    202204        hdr = trident->tlb.memhdr;
    203205        if (snd_BUG_ON(!hdr))
     
    212214                return NULL;
    213215        }
    214                            
     216                       
    215217        /* set TLB entries */
    216218        idx = 0;
     
    245247        unsigned long ptr;
    246248
     249#pragma disable_message (136)
    247250        if (snd_BUG_ON(runtime->dma_bytes <= 0 ||
    248251                       runtime->dma_bytes > SNDRV_TRIDENT_MAX_PAGES *
    249252                                        SNDRV_TRIDENT_PAGE_SIZE))
    250253                return NULL;
     254#pragma enable_message (136)
    251255        hdr = trident->tlb.memhdr;
    252256        if (snd_BUG_ON(!hdr))
     
    259263                return NULL;
    260264        }
    261                            
     265                       
    262266        /* set TLB entries */
    263267        addr = runtime->dma_addr;
  • GPL/branches/uniaud32-2.1.x/alsa-kernel/synth/emux/soundfont.c

    r499 r519  
    249249                parm.type |= SNDRV_SFNT_PAT_SHARED;
    250250                sf = newsf(sflist, parm.type, NULL);
    251         } else 
     251        } else
    252252                sf = newsf(sflist, parm.type, parm.name);
    253253        if (sf == NULL) {
     
    543543        count -= sizeof(hdr);
    544544
     545#pragma disable_message (136)
    545546        if (hdr.nvoices <= 0 || hdr.nvoices >= 100) {
     547#pragma enable_message (136)
    546548                printk(KERN_ERR "Soundfont error: Illegal voice number %d\n",
    547549                       hdr.nvoices);
     
    10661068                        (patch.env_rate[5], patch.env_offset[4],
    10671069                         patch.env_offset[5]);
    1068                 zone->v.parm.volatkhld = 
     1070                zone->v.parm.volatkhld =
    10691071                        (snd_sf_calc_parm_hold(hold) << 8) |
    10701072                        snd_sf_calc_parm_attack(attack);
  • GPL/branches/uniaud32-2.1.x/drv32/init.c

    r504 r519  
    218218        }
    219219        if (!HeapInit(HEAP_SIZE)) {
    220                 dprintf(("HeapInit failed!"));
     220                rprintf(("HeapInit failed!"));
    221221        }
    222222
  • GPL/branches/uniaud32-2.1.x/drv32/irq.cpp

    r458 r519  
    6767    BYTE   LowIRQ;
    6868    BYTE   HighIRQ;
    69     BYTE   Pin;   
     69    BYTE   Pin;
    7070} sISRHigh[8];     //FIX me to MAX_DEVICES or same
    7171
     
    136136    ULONG       ulIrqNo;
    137137
    138    // enable interrupts that have higher priority we should 
     138   // enable interrupts that have higher priority we should
    139139   // allow higher priority interrupts
    140    sti(); 
     140   sti();
    141141   if( process_interrupt(ulSlotNo, &ulIrqNo) ) {
    142        // We've cleared all service requests. 
    143        // Clear (disable) Interrupts, Send EOI 
     142       // We've cleared all service requests.
     143       // Clear (disable) Interrupts, Send EOI
    144144       // and clear the carry flag (tells OS/2 kernel that Int was handled).
    145        // Note carry flag is handled in setup.asm 
     145       // Note carry flag is handled in setup.asm
    146146       cli();
    147147       DevEOI( (WORD16)ulIrqNo );
  • GPL/branches/uniaud32-2.1.x/drv32/rmhelp.cpp

    r421 r519  
    150150//******************************************************************************
    151151//PS+++ see to irq.cpp
    152 #ifdef ACPI 
     152#ifdef ACPI
    153153#ifdef __cplusplus
    154154extern "C" {
     
    159159    BYTE   LowIRQ;
    160160    BYTE   HighIRQ;
    161     BYTE   Pin;   
     161    BYTE   Pin;
    162162};
    163163extern struct SaveIRQForSlot sISRHigh[];
  • GPL/branches/uniaud32-2.1.x/drv32/strategy.c

    r504 r519  
    2424
    2525#define INCL_NOPMAPI
    26 #define INCL_DOSINFOSEG     // Need Global info seg in rm.cpp algorithms
     26#define INCL_DOSINFOSEG         // Need Global info seg in rm.cpp algorithms
    2727#include <os2.h>
    2828
     
    5151        }
    5252        numOS2Opens++;
    53         return RPDONE;
     53                return RPDONE;
    5454}
    5555//******************************************************************************
     
    6666ULONG StratInit(RP __far* _rp)
    6767{
    68     ULONG rc;
    69 
    70     RPInit __far* rp = (RPInit __far*)_rp;
    71     rc = DiscardableInit(rp);
    72     dprintf(("StratInit End rc=%d", rc));
    73     return rc;
     68        ULONG rc;
     69
     70        RPInit __far* rp = (RPInit __far*)_rp;
     71        rc = DiscardableInit(rp);
     72        dprintf(("StratInit End rc=%d", rc));
     73        return rc;
    7474}
    7575//******************************************************************************
     
    7777#ifdef ACPI
    7878// See desription in irq.cpp
    79 #include "irqos2.h"                 //PS+++
     79#include "irqos2.h"                             //PS+++
    8080#ifdef __cplusplus
    8181extern "C" {
    8282#endif
    83 ULONG InitCompleteWas = 0;          //PS+++ Indication of InitComplete call
     83ULONG InitCompleteWas = 0;                      //PS+++ Indication of InitComplete call
    8484struct SaveIRQForSlot
    8585{
    86     ULONG  ulSlotNo;
    87     BYTE   LowIRQ;
    88     BYTE   HighIRQ;
    89     BYTE   Pin;
     86        ULONG  ulSlotNo;
     87        BYTE   LowIRQ;
     88        BYTE   HighIRQ;
     89        BYTE   Pin;
    9090};
    9191extern struct SaveIRQForSlot sISRHigh[];
    92 extern int  SaveIRQCounter;
     92extern int      SaveIRQCounter;
    9393#ifdef __cplusplus
    9494}
     
    102102#ifdef ACPI
    103103//PS+++ Begin
    104     ULONG  i, rc = 0;
    105 
    106     InitCompleteWas = 1;
    107     for (i = 0; i < SaveIRQCounter; i++)
    108     {
    109         dprintf(("Close IRQ%d - Open IRQ%d",(ULONG)sISRHigh[i].LowIRQ,(ULONG)sISRHigh[i].HighIRQ));
    110         if (sISRHigh[i].HighIRQ)
    111         {
    112             ALSA_FreeIrq(sISRHigh[i].LowIRQ);
    113             if (!ALSA_SetIrq(sISRHigh[i].HighIRQ, sISRHigh[i].ulSlotNo, 1))
    114             {
    115                 return (RPERR_COMMAND | RPDONE);
    116             }
    117         }
    118     }
     104        ULONG  i, rc = 0;
     105
     106        InitCompleteWas = 1;
     107        for (i = 0; i < SaveIRQCounter; i++)
     108        {
     109                dprintf(("Close IRQ%d - Open IRQ%d",(ULONG)sISRHigh[i].LowIRQ,(ULONG)sISRHigh[i].HighIRQ));
     110                if (sISRHigh[i].HighIRQ)
     111                {
     112                        ALSA_FreeIrq(sISRHigh[i].LowIRQ);
     113                        if (!ALSA_SetIrq(sISRHigh[i].HighIRQ, sISRHigh[i].ulSlotNo, 1))
     114                        {
     115                                return (RPERR_COMMAND | RPDONE);
     116                        }
     117                }
     118        }
    119119#endif
    120120//PS++ End
    121 #ifdef DEBUG
    122     dprintf(("StratInitComplete"));
    123 #endif
     121        dprintf(("StratInitComplete"));
    124122  return(RPDONE);
    125123}
     
    130128#pragma on (unreferenced)
    131129{
    132  RPShutdown __far *rp = (RPShutdown __far *)_rp;
    133 
    134 #ifdef DEBUG
    135  dprintf(("StratShutdown %d", rp->Function));
    136 #endif
    137   if(rp->Function == 1) {//end of shutdown
    138         OSS32_Shutdown();
    139   }
     130        RPShutdown __far *rp = (RPShutdown __far *)_rp;
     131
     132        dprintf(("StratShutdown Start %d", rp->Function));
     133        if(rp->Function == 1) {//end of shutdown
     134                OSS32_Shutdown();
     135        }
     136        dprintf(("StratShutdown End"));
    140137  return(RPDONE);
    141138}
     
    155152RPHandler StratDispatch[] =
    156153{
    157   StratInit,                  // 00 (BC): Initialization
    158   StratError,                 // 01 (B ): Media check
    159   StratError,                 // 02 (B ): Build BIOS parameter block
    160   StratError,                 // 03 (  ): Unused
    161   StratRead,                  // 04 (BC): Read
    162   StratError,                 // 05 ( C): Nondestructive read with no wait
    163   StratError,                 // 06 ( C): Input status
    164   StratError,                 // 07 ( C): Input flush
    165   StratWrite,                 // 08 (BC): Write
    166   StratError,                 // 09 (BC): Write verify
    167   StratError,                 // 0A ( C): Output status
    168   StratError,                 // 0B ( C): Output flush
    169   StratError,                 // 0C (  ): Unused
    170   StratOpen,                  // 0D (BC): Open
    171   StratClose,                 // 0E (BC): Close
    172   StratError,                 // 0F (B ): Removable media check
    173   StratIOCtl,                 // 10 (BC): IO Control
    174   StratError,                 // 11 (B ): Reset media
    175   StratError,                 // 12 (B ): Get logical unit
    176   StratError,                 // 13 (B ): Set logical unit
    177   StratError,                 // 14 ( C): Deinstall character device driver
    178   StratError,                 // 15 (  ): Unused
    179   StratError,                 // 16 (B ): Count partitionable fixed disks
    180   StratError,                 // 17 (B ): Get logical unit mapping of fixed disk
    181   StratError,                 // 18 (  ): Unused
    182   StratError,                 // 19 (  ): Unused
    183   StratError,                 // 1A (  ): Unused
    184   StratError,                 // 1B (  ): Unused
    185   StratShutdown,              // 1C (BC): Notify start or end of system shutdown
    186   StratError,                 // 1D (B ): Get driver capabilities
    187   StratError,                 // 1E (  ): Unused
    188   StratInitComplete           // 1F (BC): Notify end of initialization
     154  StratInit,                              // 00 (BC): Initialization
     155  StratError,                             // 01 (B ): Media check
     156  StratError,                             // 02 (B ): Build BIOS parameter block
     157  StratError,                             // 03 (  ): Unused
     158  StratRead,                              // 04 (BC): Read
     159  StratError,                             // 05 ( C): Nondestructive read with no wait
     160  StratError,                             // 06 ( C): Input status
     161  StratError,                             // 07 ( C): Input flush
     162  StratWrite,                             // 08 (BC): Write
     163  StratError,                             // 09 (BC): Write verify
     164  StratError,                             // 0A ( C): Output status
     165  StratError,                             // 0B ( C): Output flush
     166  StratError,                             // 0C (  ): Unused
     167  StratOpen,                              // 0D (BC): Open
     168  StratClose,                             // 0E (BC): Close
     169  StratError,                             // 0F (B ): Removable media check
     170  StratIOCtl,                             // 10 (BC): IO Control
     171  StratError,                             // 11 (B ): Reset media
     172  StratError,                             // 12 (B ): Get logical unit
     173  StratError,                             // 13 (B ): Set logical unit
     174  StratError,                             // 14 ( C): Deinstall character device driver
     175  StratError,                             // 15 (  ): Unused
     176  StratError,                             // 16 (B ): Count partitionable fixed disks
     177  StratError,                             // 17 (B ): Get logical unit mapping of fixed disk
     178  StratError,                             // 18 (  ): Unused
     179  StratError,                             // 19 (  ): Unused
     180  StratError,                             // 1A (  ): Unused
     181  StratError,                             // 1B (  ): Unused
     182  StratShutdown,                          // 1C (BC): Notify start or end of system shutdown
     183  StratError,                             // 1D (B ): Get driver capabilities
     184  StratError,                             // 1E (  ): Unused
     185  StratInitComplete               // 1F (BC): Notify end of initialization
    189186};
    190187//******************************************************************************
     
    199196{
    200197  if (rp->Command < sizeof(StratDispatch)/sizeof(StratDispatch[0]))
    201         return(StratDispatch[rp->Command](rp));
     198                return(StratDispatch[rp->Command](rp));
    202199  else  return(RPERR_COMMAND | RPDONE);
    203200}
  • GPL/branches/uniaud32-2.1.x/include/dbgos2.h

    r504 r519  
    3232extern int wrOffset;
    3333extern char *szprintBuf;
    34 //void _cdecl DPD(int level, char *x, ...) ; /* not debugging: nothing */
    35 void _cdecl DPE(char *x, ...) ; /* not debugging: nothing */
     34//void _cdecl DPE(char *x, ...) ; /* not debugging: nothing */
     35int _cdecl printk(const char * fmt, ...);
    3636#ifdef __cplusplus
    3737}
    3838#endif
    3939
     40
    4041/* rprintf always prints to the log buffer, and to SIO if enabled */
    41 #define rprintf(a) DPE a
     42#define rprintf(a) printk a
    4243
    4344/* the dprintf functions only print if DEBUG is defined */
    4445#ifdef DEBUG
    4546#define DBG_MAX_BUF_SIZE 0x100000
    46 #define dprintf(a)      DPE a
    47 #define dprintf1(a)     if(DebugLevel > 0) DPE a
    48 #define dprintf2(a)     if(DebugLevel > 1) DPE a
    49 #define dprintf3(a)     if(DebugLevel > 2) DPE a
     47#define dprintf(a)      printk a
     48#define dprintf1(a)     if(DebugLevel > 0) printk a
     49#define dprintf2(a)     if(DebugLevel > 1) printk a
     50#define dprintf3(a)     if(DebugLevel > 2) printk a
    5051#define DebugInt3()     ; //_asm int 3
    5152//#define DebInt3()     _asm int 3;
  • GPL/branches/uniaud32-2.1.x/include/linux/kthread.h

    r305 r519  
    77#define kthread_create(fn, data, namefmt, ...) NULL
    88#define kthread_run(fn, data, namefmt, ...) NULL
    9 #define kthread_stop(kt) 0
     9#define kthread_stop(kt)
    1010#define kthread_should_stop() 1
    1111
  • GPL/branches/uniaud32-2.1.x/include/linux/pci.h

    r499 r519  
    702702#undef pci_disable_msi
    703703#define pci_disable_msi(dev)
     704extern int snd_pci_dev_present(const struct pci_device_id *ids);
    704705#define pci_dev_present(x) snd_pci_dev_present(x)
    705706extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
  • GPL/branches/uniaud32-2.1.x/include/linux/workqueue.h

    r499 r519  
    3333int queue_work(struct workqueue_struct *wq, struct work_struct *work);
    3434void flush_workqueue(struct workqueue_struct *wq);
     35int queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *dwork, unsigned long delay);
     36int cancel_delayed_work(struct delayed_work *dwork);
    3537
    3638#define INIT_WORK(_work, _func, _data)                  \
  • GPL/branches/uniaud32-2.1.x/include/proto.h

    r479 r519  
    44extern int _snd_pcm_hw_param_set(struct snd_pcm_hw_params *params, snd_pcm_hw_param_t var, unsigned int val, int dir);
    55extern int in_interrupt(void);
     6extern int in_atomic(void);
    67/*
    78 * Uniaud API support
  • GPL/branches/uniaud32-2.1.x/lib32/debug.c

    r504 r519  
    250250}
    251251
    252 char BuildString[1024];
    253 
    254 #if 0
    255 //------------------------- PrintfOut -
    256 void _cdecl DPD(int level, char *DbgStr, ...)
    257 {
    258    char *BuildPtr=BuildString;
    259    char *pStr=(char *) DbgStr;
    260    char *SubStr;
    261    union {
    262          void   *VoidPtr;
    263          USHORT *WordPtr;
    264          ULONG  *LongPtr;
    265          ULONG  *StringPtr;
    266          } Parm;
    267    USHORT wBuildOption;
    268 
    269    Parm.VoidPtr=(void *) &DbgStr;
    270    Parm.StringPtr++;                            // skip size of string pointer
    271 
    272    while (*pStr)
    273       {
    274       // don't overflow target
    275       if (BuildPtr >= (char *) &BuildString[1024-2])
    276          break;
    277 
    278       switch (*pStr)
    279          {
    280          case '%':
    281             wBuildOption=0;
    282             pStr++;
    283             if (*pStr=='0')
    284                {
    285                wBuildOption|=LEADING_ZEROES;
    286                pStr++;
    287                }
    288             if (*pStr=='u')                                                         // always unsigned
    289                pStr++;
    290             if (*pStr=='#')
    291                pStr++;
    292 
    293             switch(*pStr)
    294                {
    295                case 'x':
    296                case 'X':
    297                case 'p':
    298                case 'P':
    299                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    300                   pStr++;
    301                   continue;
    302 
    303                case 'd':
    304                   BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    305                   pStr++;
    306                   continue;
    307 
    308                case 's':
    309                   SubStr=(char *)*Parm.StringPtr;
    310                   while (*BuildPtr++ = *SubStr++);
    311                   Parm.StringPtr++;
    312                   BuildPtr--;                      // remove the \0
    313                   pStr++;
    314                   continue;
    315 
    316                case 'l':
    317                   pStr++;
    318                   switch (*pStr)
    319                   {
    320                   case 'x':
    321                   case 'X':
    322                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    323                   pStr++;
    324                   continue;
    325 
    326                   case 'd':
    327                      BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    328                      pStr++;
    329                      continue;
    330                   } // end switch
    331                   continue;                        // dunno what he wants
    332 
    333                case 0:
    334                   continue;
    335                } // end switch
    336             break;
    337 
    338       case '\\':
    339          pStr++;
    340          switch (*pStr)
    341             {
    342             case 'n':
    343             *BuildPtr++=LF;
    344             pStr++;
    345             continue;
    346 
    347             case 'r':
    348             *BuildPtr++=CR;
    349             pStr++;
    350             continue;
    351 
    352             case 0:
    353             continue;
    354             break;
    355             } // end switch
    356 
    357          break;
    358          } // end switch
    359 
    360       *BuildPtr++=*pStr++;
    361       } // end while
    362 
    363    *BuildPtr=0;                                 // cauterize the string
    364    StringOut((char *) BuildString);
    365 }
    366 #endif
    367 
    368 void _cdecl DPE(char *DbgStr, ...)
    369 {
    370    char *BuildPtr=BuildString;
    371    char *pStr = (char *) DbgStr;
    372    char *SubStr;
    373    union {
    374          void   *VoidPtr;
    375          USHORT *WordPtr;
    376          ULONG  *LongPtr;
    377          ULONG  *StringPtr;
    378          } Parm;
    379    USHORT wBuildOption;
    380 
    381    Parm.VoidPtr=(void *) &DbgStr;
    382    Parm.StringPtr++;                            // skip size of string pointer
    383 
    384    while (*pStr)
    385       {
    386       // don't overflow target
    387       if (BuildPtr >= (char *) &BuildString[1024-2])
    388          break;
    389 
    390       switch (*pStr)
    391          {
    392          case '%':
    393             wBuildOption=0;
    394             pStr++;
    395             if (*pStr=='0')
    396                {
    397                wBuildOption|=LEADING_ZEROES;
    398                pStr++;
    399                }
    400 //            if (*pStr=='u')                                                         // always unsigned
    401 //               pStr++;
    402 
    403             switch(*pStr)
    404                {
    405                case 'x':
    406                case 'X':
    407                case 'p':
    408                case 'P':
    409                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    410                   pStr++;
    411                   continue;
    412 
    413                case 'd':
    414                case 'u':
    415                   BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    416                   pStr++;
    417                   continue;
    418 
    419                case 's':
    420                   SubStr=(char *)*Parm.StringPtr;
    421                   while (*BuildPtr++ = *SubStr++);
    422                   Parm.StringPtr++;
    423                   BuildPtr--;                      // remove the \0
    424                   pStr++;
    425                   continue;
    426 
    427                case 'c':
    428                   *BuildPtr++ = (char)*Parm.LongPtr;
    429                   Parm.LongPtr++;
    430                   pStr++;
    431                   continue;
    432 
    433                case 'l':
    434                   pStr++;
    435                   switch (*pStr)
    436                   {
    437                   case 'x':
    438                   case 'X':
    439                   BuildPtr=HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    440                   pStr++;
    441                   continue;
    442 
    443                   case 'd':
    444                      BuildPtr=DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
    445                      pStr++;
    446                      continue;
    447                   } // end switch
    448                   continue;                        // dunno what he wants
    449 
    450                case 0:
    451                   continue;
    452                } // end switch
    453             break;
    454 
    455       case '\\':
    456          pStr++;
    457          switch (*pStr)
    458             {
    459             case 'n':
    460             *BuildPtr++=LF;
    461             pStr++;
    462             continue;
    463 
    464             case 'r':
    465             *BuildPtr++=CR;
    466             pStr++;
    467             continue;
    468 
    469             case 0:
    470             continue;
    471             break;
    472             } // end switch
    473 
    474          break;
    475          } // end switch
    476 
    477       *BuildPtr++=*pStr++;
    478       } // end while
    479 
    480    *BuildPtr=0;                                 // cauterize the string
    481    StringOut((char *) BuildString);
    482 }
    483 
    484252struct snd_info_buffer {
    485253        char *buffer;           /* pointer to begin of buffer */
  • GPL/branches/uniaud32-2.1.x/lib32/fminstrload.c

    r305 r519  
    4242#include "instrfm.h"
    4343
    44 #define assert(a)   
     44#define assert(a)
    4545
    4646typedef struct sbi_header
     
    101101{
    102102    midihandle  *pHandle = (midihandle *)streamid;
    103    
     103
    104104    if(pHandle == NULL || pHandle->magic != MAGIC_MIDI_ALSA32) {
    105105        DebugInt3();
     
    119119    //load drums
    120120    load_sb(pHandle, drumsopl3, sizeof(drumsopl3), 128);
    121    
     121
    122122    return OSSERR_SUCCESS;
    123123}
     
    226226 * Parse standard .sb or .o3 file
    227227 */
    228 static void load_sb (midihandle *pHandle, char *pFile, int filesize, int bank) 
     228static void load_sb (midihandle *pHandle, char *pFile, int filesize, int bank)
    229229{
    230230    int len, i, offset = 0;
     
    245245        if (!strncmp (sbi_instr.header.key, "SBI\032", 4) || !strncmp (sbi_instr.header.key, "2OP\032", 4)) {
    246246            fm_instr_type = FM_PATCH_OPL2;
    247         } 
    248         else 
     247        }
     248        else
    249249        if (!strncmp (sbi_instr.header.key, "4OP\032", 4)) {
    250250            fm_instr_type = FM_PATCH_OPL3;
    251         } 
     251        }
    252252        else {
    253253            fm_instr_type = 0;
     
    374374    memset(*ptr, 0, sizeof(snd_instr_header_t) + len);
    375375        (*ptr)->len = len;
    376          
     376
    377377        return 0;
    378378}
  • GPL/branches/uniaud32-2.1.x/lib32/ioctl.c

    r479 r519  
    284284    if(pcminfo == NULL) {
    285285        DebugInt3();
    286         printk("GetUniaudPcmCaps: out of memory\n");
     286        rprintf(("GetUniaudPcmCaps: out of memory"));
    287287        return OSSERR_OUT_OF_MEMORY;
    288288    }
     
    302302            if(ret != OSSERR_SUCCESS)
    303303            {
    304                 printk("GetUniaudPcmCaps: wave open error %i %s at pcm %i\n", ret,
    305                        (j == 0) ?"PLAY":"REC", i);
     304                rprintf(("GetUniaudPcmCaps: wave open error %i %s at pcm %i", ret,
     305                       (j == 0) ?"PLAY":"REC", i));
    306306                continue;
    307307//                goto fail;
     
    309309            pHandle = (soundhandle *)streamid;
    310310            if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) {
    311                 printk("GetUniaudPcmCaps: invalid stream id \n");
     311                rprintf(("GetUniaudPcmCaps: invalid stream id"));
    312312                ret = OSSERR_INVALID_STREAMID;
    313313//                goto fail;
     
    317317            pHandle->file.f_flags = O_NONBLOCK;
    318318
    319             printk("GetUniaudPcmCaps: cp1. phandle %x\n", pHandle);
     319            dprintf(("GetUniaudPcmCaps: cp1. phandle %x", pHandle));
    320320            ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_INFO, (ULONG)pcminfo);
    321321            if(ret != 0) {
    322                 printk("GetUniaudPcmCaps: SNDRV_PCM_IOCTL_INFO error %i\n", ret);
     322                rprintf(("GetUniaudPcmCaps: SNDRV_PCM_IOCTL_INFO error %i", ret));
    323323                ret = UNIXToOSSError(ret);
    324324                continue;
     
    335335            pWaveCaps->nrStreams = pcminfo->subdevices_count;
    336336
    337             printk("GetUniaudPcmCaps: cp2. nr of streams: %i\n", pWaveCaps->nrStreams);
     337            dprintf(("GetUniaudPcmCaps: cp2. nr of streams: %i", pWaveCaps->nrStreams));
    338338            //get all hardware parameters
    339339            _snd_pcm_hw_params_any(params);
    340340            ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)params);
    341341            if(ret != 0) {
    342                 printk("GetUniaudPcmCaps: SNDRV_PCM_IOCTL_HW_REFINE error %i\n", ret);
     342                rprintf(("GetUniaudPcmCaps: SNDRV_PCM_IOCTL_HW_REFINE error %i", ret));
    343343                ret = UNIXToOSSError(ret);
    344344                //goto fail;
    345345                continue;
    346346            }
    347             printk("GetUniaudPcmCaps: cp3\n");
     347            //dprintf("GetUniaudPcmCaps: cp3"));
    348348
    349349            pWaveCaps->ulMinChannels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS)->min;
    350350            pWaveCaps->ulMaxChannels = hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS)->max;
    351             printk("chan: from %i to %i\n", pWaveCaps->ulMinChannels,pWaveCaps->ulMaxChannels);
     351            dprintf(("chan: from %i to %i\n", pWaveCaps->ulMinChannels,pWaveCaps->ulMaxChannels));
    352352            pWaveCaps->ulChanFlags   = 0;
    353353            if(pWaveCaps->ulMinChannels == 1) {
     
    368368
    369369            mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_RATE_MASK);
    370 //            mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
     370                        //mask = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
    371371            pWaveCaps->ulRateFlags   = mask->bits[0];
    372372
     
    403403    pcms = pcm_instances(deviceid);
    404404
    405     printk("pcms = %i\n", pcms); //uncommented
     405    dprintf(("FillCaps: pcms=%i\n", pcms));
    406406    if (!pcmcaps[deviceid])
    407407    {
  • GPL/branches/uniaud32-2.1.x/lib32/irq.c

    r504 r519  
    8787    {
    8888        if(RMRequestIRQ(/*hResMgr,*/ irq , (x0 & SA_SHIRQ) != 0) == FALSE) {
    89             dprintf(("RMRequestIRQ failed for irq %d", irq));
     89            rprintf(("RMRequestIRQ failed for irq %d", irq));
    9090            //  return 0;
    9191        }
     
    113113    }
    114114
    115     dprintf(("request_irq: Unable to register irq handler for irq %d\n", irq & 0xff ));
     115    rprintf(("request_irq: Unable to register irq handler for irq %d\n", irq & 0xff ));
    116116    return 1;
    117117}
  • GPL/branches/uniaud32-2.1.x/lib32/malloc.cpp

    r504 r519  
    415415    for (pmb=pmbFree->pmbNext; pmb; pmb=pmb->pmbNext) {
    416416        if (after(pmb)  == pmbFree) {
    417                         // ddprintf("HEAP: compact found pointer %p (size=%ui) before pmbFree %p\n", (void __far *) pmb, pmb->uSize, (void __far *) pmbFree);
     417                        // dprintf(("HEAP: compact found pointer %p (size=%ui) before pmbFree %p\n", (void __far *) pmb, pmb->uSize, (void __far *) pmbFree));
    418418            pmb->ulSize += HDR_SIZE + pmbFree->ulSize;
    419419            remove(pmbFree);
    420420            if (++sFreed == 2) break;
    421421        } else if (after(pmbFree) == pmb) {
    422                         // ddprintf("HEAP: compact found pointer %p (size=%ui) after pmbFree %p\n", (void __far *) pmb, pmb->uSize, (void __far *) pmbFree);
     422                        // dprintf(("HEAP: compact found pointer %p (size=%ui) after pmbFree %p\n", (void __far *) pmb, pmb->uSize, (void __far *) pmbFree);
    423423            pmbFree->ulSize += HDR_SIZE + pmb->ulSize;
    424424            remove(pmb);
  • GPL/branches/uniaud32-2.1.x/lib32/memory.cpp

    r504 r519  
    264264                    //oops, this didn't work, fail
    265265                    VMFree((LINEAR)addr);
    266                     dprintf(("get_free_dma_pages failed %x size:%x st:%x end:%x, trying wasteful method instead",physaddr,size,startpage,endpage));
     266                    dprintf(("get_free_dma_pages failed %x size:%x st:%x end:%x, trying wasteful method instead", physaddr, size, startpage, endpage));
    267267                    return 0;
    268268                }
     
    279279        //only done to save size of memory block
    280280        AddBaseAddress(addr, addr, size);
    281         dprintf(("get_free_dma_pages %d -> %x (phys %x)", size, (ULONG)addr, virt_to_phys((void *)addr)));
    282281        ulget_free_pagesMemUsed += size;
    283         dprintf(("get_free_dma_pages: total alloc size %d", ulget_free_pagesMemUsed));
     282        dprintf(("get_free_dma_pages: size=%x adr=%x (phys %x) total alloc size=%x",
     283                        size, (ULONG)addr, virt_to_phys((void *)addr), ulget_free_pagesMemUsed));
    284284    }
    285285
     
    354354    }
    355355    if(addr) {
    356         dprintf(("get_free_pages %d (%d) -> %x (phys %x)", allocsize, size, (ULONG)addr, virt_to_phys((void *)addr)));
     356        //dprintf(("get_free_pages %d (%d) -> %x (phys %x)", allocsize, size, (ULONG)addr, virt_to_phys((void *)addr)));
    357357        ulget_free_pagesMemUsed += allocsize;
    358         dprintf(("get_free_pages: total alloc size %d", ulget_free_pagesMemUsed));
     358        //dprintf(("get_free_pages: total alloc size %d", ulget_free_pagesMemUsed));
    359359    }
    360360    return (void *)addr;
     
    373373    }
    374374    else {
    375         dprintf(("free_pages %x size %d", (ULONG)addr, size));
     375        //dprintf(("free_pages %x size %d", (ULONG)addr, size));
    376376        ulget_free_pagesMemUsed -= size;
    377         dprintf(("free_pages: total alloc size %d", ulget_free_pagesMemUsed));
     377        //dprintf(("free_pages: total alloc size %d", ulget_free_pagesMemUsed));
    378378    }
    379379        //dprintf(("free_pages %x", addr));
  • GPL/branches/uniaud32-2.1.x/lib32/misc.c

    r506 r519  
    4040#include <dbgos2.h>
    4141
     42void StringOut(char *DbgStr);
     43
    4244struct new_utsname system_utsname = {0};
    4345struct resource ioport_resource = {NULL, 0, 0, IORESOURCE_IO, NULL, NULL, NULL};
     
    7577    }
    7678
    77     dprintf( (pszLastALSAError) );
     79        StringOut(pszLastALSAError);
     80//    rprintf( (pszLastALSAError) );
    7881    if(++iLastError > 1) {
    7982        iLastError = 0;
  • GPL/branches/uniaud32-2.1.x/lib32/ossidc.cpp

    r517 r519  
    109109
    110110        if(DevSetTimer(TimerHandler16) != 0) {
    111                 dprintf(("DevSetTimer failed!!"));
     111                rprintf(("DevSetTimer failed!!"));
    112112                DebugInt3();
    113113                return OSSERR_INIT_FAILED;
     
    165165                return OSSERR_SUCCESS;
    166166        }
    167         dprintf(("OSS32_Initialize. FAILED"));
     167        rprintf(("OSS32_Initialize. FAILED"));
    168168        return OSSERR_INIT_FAILED;
    169169}
     
    173173OSSRET OSS32_Shutdown()
    174174{
     175        dprintf(("OSS32_Shutdown 1"));
    175176        CallOSS16(IDC16_EXIT, 0, 0);
     177        dprintf(("OSS32_Shutdown 2"));
    176178
    177179        for(int i=0;i<nrCardsDetected;i++) {
     
    179181        }
    180182
     183        dprintf(("OSS32_Shutdown 3"));
    181184        call_module_exit(alsa_mpu401_uart_exit);
     185        dprintf(("OSS32_Shutdown 4"));
    182186        call_module_exit(alsa_opl3_seq_exit);
     187        dprintf(("OSS32_Shutdown 5"));
    183188        call_module_exit(alsa_opl3_exit);
     189        dprintf(("OSS32_Shutdown 6"));
    184190        call_module_exit(alsa_seq_exit);
     191        dprintf(("OSS32_Shutdown 7"));
    185192        call_module_exit(alsa_rawmidi_exit);
     193        dprintf(("OSS32_Shutdown 8"));
    186194        call_module_exit(alsa_timer_exit);
     195        dprintf(("OSS32_Shutdown 9"));
    187196        call_module_exit(alsa_hwdep_exit);
     197        dprintf(("OSS32_Shutdown 10"));
    188198        call_module_exit(alsa_pcm_exit);
     199        dprintf(("OSS32_Shutdown 11"));
    189200        call_module_exit(alsa_sound_exit);
     201        dprintf(("OSS32_Shutdown 12"));
    190202
    191203        return OSSERR_SUCCESS;
  • GPL/branches/uniaud32-2.1.x/lib32/pci.c

    r517 r519  
    477477        u16 pci_command;
    478478
    479         printk("pci_enable_device %x\n", dev);
     479        dprintf(("pci_enable_device %x\n", dev));
    480480
    481481        pci_read_config_word(dev, PCI_COMMAND, &pci_command);
     
    495495
    496496        iNumCards = 0;
    497         ulLast = 0;
    498         pcidev=&pci_devices[0];
     497
     498        /* find an empty slot */
     499        for (iTmp=0; iTmp<MAX_PCI_DEVICES; iTmp++) {
     500                if (pci_devices[iTmp].devfn == 0) break;
     501        }
     502        if (iTmp >= MAX_PCI_DEVICES) return 0;
     503        pcidev = &pci_devices[iTmp];
    499504
    500505        for( iTableIx = 0; driver->id_table[iTableIx].vendor; iTableIx++) {
    501 
    502                 if (pcidev->devfn) { /* find an empty slot */
    503                         for (iTmp=0; iTmp<MAX_PCI_DEVICES; iTmp++) {
    504                                 if (pci_devices[iTmp].devfn == 0) break;
    505                         }
    506                         if (iTmp >= MAX_PCI_DEVICES) break;
    507                         pcidev=&pci_devices[iTmp];
    508                 }
    509 
    510 
     506                ulLast = 0;
    511507                while( (ulLast = pci_query_device(&driver->id_table[iTableIx], pcidev, ulLast)) ) {
     508
     509
    512510                        RMInit();
    513511                        dprintf(("pci_register_driver: found=%x:%x searching for %x:%x\n",
     
    521519                                RMDone((pcidev->device << 16) | pcidev->vendor);
    522520                                iNumCards++;
     521
     522                                /* find another empty slot */
     523                                for (iTmp=0; iTmp<MAX_PCI_DEVICES; iTmp++) {
     524                                        if (pci_devices[iTmp].devfn == 0) break;
     525                                }
     526                                if (iTmp >= MAX_PCI_DEVICES) break;
     527                                pcidev = &pci_devices[iTmp];
    523528                        } else pcidev->devfn = 0;
    524529
     
    612617        int gfp = GFP_ATOMIC;
    613618        int order;
    614 #ifdef DEBUG
    615619        dprintf(("pci_alloc_consistent %d mask %x", size, (hwdev) ? hwdev->dma_mask : 0));
    616 #endif
    617620        if (hwdev == NULL || hwdev->dma_mask != 0xffffffff) {
    618621                //try not to exhaust low memory (< 16mb) so allocate from the high region first
     
    965968        struct pci_driver *driver;
    966969
    967         dprintf(("OSS32_APMSuspend"));
     970        dprintf(("OSS32_APMSuspend 1"));
    968971
    969972        fSuspended = TRUE;
     
    980983        }
    981984
     985        dprintf(("OSS32_APMSuspend 2"));
    982986        return OSSERR_SUCCESS;
    983987}
  • GPL/branches/uniaud32-2.1.x/lib32/sound.c

    r516 r519  
    281281           }
    282282        } else {
    283            printk("HDA audio detected - don't support 5512 - 32000 Hz audio sample rates\n");
     283           dprintf(("HDA audio detected - don't support 5512 - 32000 Hz audio sample rates\n"));
    284284        }
    285285        if(fuRates & SNDRV_PCM_RATE_44100) {
     
    331331        int max_ch;
    332332
    333 #ifdef DEBUG
    334333        dprintf(("OSS32_QueryDevCaps"));
    335 #endif
    336334//        max_ch = GetMaxChannels(deviceid, OSS32_CAPS_WAVE_PLAYBACK);
    337335
     
    340338        if(pcminfo == NULL) {
    341339                DebugInt3();
    342                 printk("OSS32_QueryDevCaps: out of memory\n");
     340                rprintf(("OSS32_QueryDevCaps: out of memory\n"));
    343341                return OSSERR_OUT_OF_MEMORY;
    344342        }
    345343        params = (struct snd_pcm_hw_params *)(pcminfo+1);
    346344
    347         printk("Number of cards: %i",nrCardsDetected);
    348         printk("dev id: %i",deviceid);
     345        dprintf(("Number of cards=%i dev id=%i", nrCardsDetected, deviceid));
    349346        pDevCaps->nrDevices  = 1;//nrCardsDetected;
    350347//        pDevCaps->nrDevices  = nrCardsDetected;
     
    359356                if(ret != OSSERR_SUCCESS)
    360357                {
    361                         printk("OSS32_QueryDevCaps: wave open error %i\n", ret);
     358                        rprintf(("OSS32_QueryDevCaps: wave open error %i\n", ret));
    362359                        DebugInt3();
    363360                        goto fail;
     
    365362                pHandle = (soundhandle *)streamid;
    366363                if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) {
    367                         printk("OSS32_QueryDevCaps: invalid stream id \n");
     364                        rprintf(("OSS32_QueryDevCaps: invalid stream id \n"));
    368365                        ret = OSSERR_INVALID_STREAMID;
    369366                        goto fail;
     
    374371                ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_INFO, (ULONG)pcminfo);
    375372                if(ret != 0) {
    376                         printk("OSS32_QueryDevCaps: SNDRV_PCM_IOCTL_INFO error %i\n", ret);
     373                        rprintf(("OSS32_QueryDevCaps: SNDRV_PCM_IOCTL_INFO error %i\n", ret));
    377374                        ret = UNIXToOSSError(ret);
    378375                        goto fail;
     
    384381                        else strncpy(pDevCaps->szDeviceName, pcminfo->id, sizeof(pDevCaps->szDeviceName));
    385382                }
    386                 printk("Device name: %s", pDevCaps->szDeviceName);
     383                dprintf(("Device name: %s", pDevCaps->szDeviceName));
    387384                pWaveCaps->nrStreams = pcminfo->subdevices_count;
    388385
     
    391388                ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)params);
    392389                if(ret != 0) {
    393                         printk("OSS32_QueryDevCaps: SNDRV_PCM_IOCTL_HW_REFINE error %i\n", ret);
     390                        rprintf(("OSS32_QueryDevCaps: SNDRV_PCM_IOCTL_HW_REFINE error %i\n", ret));
    394391                        ret = UNIXToOSSError(ret);
    395392                        goto fail;
     
    468465        if(OSS32_MixQueryName(deviceid, &pDevCaps->szMixerName, sizeof(pDevCaps->szMixerName)) != OSSERR_SUCCESS) {
    469466                DebugInt3();
    470                 printk("OSS32_QueryDevCaps: OSS32_MixQueryName error\n");
     467                rprintf(("OSS32_QueryDevCaps: OSS32_MixQueryName error\n"));
    471468                goto fail;
    472469        }
    473         printk("OSS32_QueryDevCaps: devname: [%s]\n", pDevCaps->szDeviceName);
     470        dprintf(("OSS32_QueryDevCaps: devname: [%s]\n", pDevCaps->szDeviceName));
    474471        kfree(pcminfo);
    475472        streamid = 0;
     
    479476
    480477fail:
    481         printk("OSS32_QueryDevCaps failed\n");
     478        rprintf(("OSS32_QueryDevCaps failed\n"));
    482479        DebugInt3();
    483480        if(streamid)   OSS32_WaveClose(streamid);
     
    497494        else
    498495        {
    499                 printk("ERROR: invalid stream id pointer passed\n");
     496                rprintf(("ERROR: invalid stream id pointer\n"));
    500497                return OSSERR_OUT_OF_MEMORY;
    501498        }
     
    503500        if(alsa_fops == NULL) {
    504501                DebugInt3();
    505 #ifdef DEBUG
    506                 dprintf(("OSS32_WaveOpen: no devices"));
    507 #endif
    508                 printk("OSS32_WaveOpen: no devices\n");
     502                rprintf(("OSS32_WaveOpen: no devices"));
    509503
    510504                return OSSERR_NO_DEVICE_AVAILABLE;
    511505        }
    512506
    513 //        printk("dev id: %i\n",deviceid);
     507        //dprintf(("dev id: %i\n",deviceid));
    514508
    515509        pHandle = kmalloc(sizeof(soundhandle), GFP_KERNEL);
    516510        if(pHandle == NULL) {
    517511                DebugInt3();
    518                 printk("OSS32_WaveOpen: out of memory\n");
     512                rprintf(("OSS32_WaveOpen: out of memory\n"));
    519513                return OSSERR_OUT_OF_MEMORY;
    520514        }
     
    540534                DebugInt3();
    541535                kfree(pHandle);
    542                 printk("OSS32_WaveOpen: invalid parameter\n");
     536                rprintf(("OSS32_WaveOpen: invalid parameter\n"));
    543537                return OSSERR_INVALID_PARAMETER;
    544538        }
    545539
    546540        ret = alsa_fops->open(&pHandle->inode, &pHandle->file);
    547         printk("OSS32_WaveOpen. ret: %i\n", ret);
     541        //dprintf(("OSS32_WaveOpen. ret: %i\n", ret));
    548542        /* check if PCM already opened (stupid uniaud16.sys doesnt closes it) */
    549543        if (ret == -16)
     
    564558                                                kfree(opened_handles[i].handle);   //free handle data
    565559                                                ret = alsa_fops->open(&pHandle->inode, &pHandle->file);
    566                                                 printk("OSS32_WaveOpen. Reopen ret: %i\n", ret);
     560                                                dprintf(("OSS32_WaveOpen. Reopen ret: %i\n", ret));
    567561                                        }
    568562                                        else
     
    592586                kfree(pHandle);
    593587                DebugInt3();
    594                 printk("OSS32_WaveOpen: open error: %i\n",ret);
     588                rprintf(("OSS32_WaveOpen: open error: %i\n",ret));
    595589                return UNIXToOSSError(ret);
    596590        }
     
    599593                *pStreamId = (ULONG)pHandle;
    600594        // filling opened handles table
    601         printk("OSS32_WaveOpen. streamid %X\n",(ULONG)pHandle);
     595        dprintf(("OSS32_WaveOpen. streamid %X\n",(ULONG)pHandle));
    602596        return OSSERR_SUCCESS;
    603597}
     
    612606        if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) {
    613607                DebugInt3();
    614                 printk("OSS32_WaveClose. invalid streamid %X\n",(ULONG)pHandle);
     608                rprintf(("OSS32_WaveClose. invalid streamid %X\n",(ULONG)pHandle));
    615609                return OSSERR_INVALID_STREAMID;
    616610        }
     
    623617                if (opened_handles[i].handle == pHandle)
    624618                {
    625                         printk("Found phandle for closing: %x reuse flag: %i\n", pHandle, opened_handles[i].reuse);
     619                        dprintf(("Found phandle for closing: %x reuse flag: %i\n", pHandle, opened_handles[i].reuse));
    626620                        if (!opened_handles[i].reuse)
    627621                        {
     
    643637        {
    644638                //all already closed
    645                 printk("phandle %x not found\n", pHandle);
     639                dprintf(("phandle %x not found\n", pHandle));
    646640//                return OSSERR_SUCCESS;
    647641        }
     
    649643
    650644        if(ret) {
    651                 printk("Error closing wave. rc = %i\n", ret);
     645                dprintf(("Error closing wave. rc = %i\n", ret));
    652646                DebugInt3();
    653647                return UNIXToOSSError(ret);
    654648        }
    655         printk("OSS32_WaveClose. streamid %X\n",(ULONG)pHandle);
     649        dprintf(("OSS32_WaveClose. streamid %X\n", (ULONG)pHandle));
    656650        return OSSERR_SUCCESS;
    657651}
     
    663657        int                     ret;
    664658
    665 #ifdef DEBUG
    666659        dprintf(("OSS32_WavePrepare"));
    667 #endif
    668660
    669661        if(pHandle == NULL || pHandle->magic != MAGIC_WAVE_ALSA32) {
    670662                DebugInt3();
    671 //#ifdef DEBUG
    672                 printk("vladest: OSS32_WavePrepare: invalid streamID\n");
    673 //#endif
     663                rprintf(("vladest: OSS32_WavePrepare: invalid streamID\n"));
    674664
    675665                  return OSSERR_INVALID_STREAMID;
     
    680670        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0);
    681671        if (ret)
    682                 printk("Wave prepare ret = %i, streamid %X\n",ret,(ULONG)pHandle);
     672                rprintf(("Wave prepare ret = %i, streamid %X\n",ret,(ULONG)pHandle));
    683673
    684674        return UNIXToOSSError(ret);;
     
    699689        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_START, 0);
    700690        if (ret)
    701                 printk("Wave start ret = %i, streamid %X\n",ret,(ULONG)pHandle);
     691                rprintf(("Wave start ret = %i, streamid %X\n",ret,(ULONG)pHandle));
    702692
    703693        return UNIXToOSSError(ret);;
     
    719709        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_DROP, 0);
    720710        if (ret)
    721                 printk("Wave stop ret = %i. streamid %X\n",ret,(ULONG)pHandle);
     711                rprintf(("Wave stop ret = %i. streamid %X\n",ret,(ULONG)pHandle));
    722712
    723713        return UNIXToOSSError(ret);;
     
    739729        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PAUSE, 0);
    740730        if (ret)
    741                 printk("Wave pause ret = %i, streamid %X\n",ret,(ULONG)pHandle);
     731                rprintf(("Wave pause ret = %i, streamid %X\n",ret,(ULONG)pHandle));
    742732
    743733        return UNIXToOSSError(ret);;
     
    759749        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PAUSE, 1);
    760750        if (ret)
    761                 printk("Wave resume ret = %i, streamid %X\n",ret,(ULONG)pHandle);
     751                rprintf(("Wave resume ret = %i, streamid %X\n",ret,(ULONG)pHandle));
    762752
    763753        return UNIXToOSSError(ret);;
     
    801791        }
    802792        if ((int)pHwParams->ulNumChannels <= 0) {
    803                 printk("OSS32_WaveSetHwParams error. Invalid number of channels: %i\n", pHwParams->ulNumChannels);
     793                rprintf(("OSS32_WaveSetHwParams error. Invalid number of channels: %i\n", pHwParams->ulNumChannels));
    804794                DebugInt3();
    805795                return OSSERR_INVALID_PARAMETER;
     
    840830        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)__Stack32ToFlat(&params));
    841831        if(ret != 0) {
    842                 dprintf(("invalid format %lx\n", OSSToALSADataType[pHwParams->ulDataType]));
     832                rprintf(("invalid format %lx\n", OSSToALSADataType[pHwParams->ulDataType]));
    843833                return UNIXToOSSError(ret);
    844834        }
     
    847837        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)__Stack32ToFlat(&params));
    848838        if(ret != 0) {
    849                 dprintf(("invalid number of sample bits %d\n", pHwParams->ulBitsPerSample));
     839                rprintf(("invalid number of sample bits %d\n", pHwParams->ulBitsPerSample));
    850840                return UNIXToOSSError(ret);
    851841        }
     
    854844        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)__Stack32ToFlat(&params));
    855845        if(ret != 0) {
    856                 dprintf(("invalid number of frame bits %d\n", pHwParams->ulBitsPerSample*pHwParams->ulNumChannels));
     846                rprintf(("invalid number of frame bits %d\n", pHwParams->ulBitsPerSample*pHwParams->ulNumChannels));
    857847                return UNIXToOSSError(ret);
    858848        }
     
    871861        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_HW_REFINE, (ULONG)__Stack32ToFlat(&params));
    872862        if(ret != 0) {
    873                 dprintf(("32_WSetHwPms (first pass) error %d bps:%d fmt: %d ch: %d sr: %d\n",
     863                rprintf(("32_WSetHwPms (first pass) error %d bps:%d fmt: %d ch: %d sr: %d\n",
    874864                                  ret,
    875865                                  pHwParams->ulBitsPerSample,
     
    947937        }
    948938        else {
    949                 dprintf(("32_WSHwPrms error. Invalid periodsize (=0). closing file\n"));
     939                rprintf(("32_WSHwPrms error. Invalid periodsize (=0). closing file\n"));
    950940                DebugInt3();
    951941                return OSSERR_INVALID_PARAMETER;
     
    964954        //so we make sure it's an even number.
    965955        if(nrperiods == 1) {
    966                 dprintf(("32_WSHwPrms error. Invalid Num periods(=1). closing file\n"));
     956                rprintf(("32_WSHwPrms error. Invalid Num periods(=1). closing file\n"));
    967957                DebugInt3();
    968958                return OSSERR_INVALID_PARAMETER;
     
    1006996                ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0);
    1007997                fTryAgain = TRUE;
    1008                 dprintf((" Error -77 from first IOCTL HW Parms"));
     998                rprintf((" Error -77 from first IOCTL HW Parms"));
    1009999                goto tryagain;
    10101000        }
     
    10241014                        }
    10251015                }
    1026                 dprintf(("Error %ld second time.. Bailing", ret));
     1016                rprintf(("Error %ld second time.. Bailing", ret));
    10271017                return UNIXToOSSError(ret);
    10281018        }
     
    10561046                   (status.state != SNDRV_PCM_STATE_RUNNING) &&
    10571047                   (status.state != SNDRV_PCM_STATE_DRAINING))) {
    1058                 dprintf(("Device is not in proper state: %lx. Calling prepare\n", status.state));
     1048                rprintf(("Device is not in proper state: %lx. Calling prepare\n", status.state));
    10591049                ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0);
    10601050        }
     
    11491139                while (ulSize && ulJ && iRet)
    11501140                {
    1151                         for (i=0; i < 1000; i++)
     1141                        for (ulI=0; ulI < 1000; ulI++)
    11521142                        {
    11531143                                iRet1 = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_STATUS, (ULONG)__Stack32ToFlat(&status));
     
    11571147                                        rprintf(("Internal Error: Xrun\n"));
    11581148                                }
    1159                                 if (i > 998) {
     1149                                if (ulI > 998) {
    11601150                                        // printk("timeout stat %x avail:%d hw:%d app:%d\n",status.state,samples_to_bytes(status.avail),samples_to_bytes(status.hw_ptr), samples_to_bytes(status.appl_ptr));
    11611151                                        iRet1 = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_PCM_IOCTL_PREPARE, 0);
  • GPL/branches/uniaud32-2.1.x/lib32/soundmidi.c

    r305 r519  
    108108    ret = alsa_fops->open(&pHandle->inode, &pHandle->file);
    109109    if(ret) {
    110         dprintf(("Midi Open %d failed with error %d", streamtype, ret));
     110        rprintf(("Midi Open %d failed with error %d", streamtype, ret));
    111111        kfree(pHandle);
    112112        return UNIXToOSSError(ret);
     
    116116
    117117    pHandle->state |= MIDISTATE_OPENED;
    118     printk("Opened MIDI %x\n",(ULONG)pHandle);
    119     if(streamtype == OSS32_STREAM_FM_MIDIOUT) 
     118    dprintf(("Opened MIDI %x\n",(ULONG)pHandle));
     119    if(streamtype == OSS32_STREAM_FM_MIDIOUT)
    120120    {
    121121        //get the client id
    122122        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_CLIENT_ID, (ULONG)&pHandle->clientid);
    123123        if(ret) {
    124             dprintf(("Get client id failed with error %d", ret));
     124            rprintf(("Get client id failed with error %d", ret));
    125125            kfree(pHandle);
    126126            return UNIXToOSSError(ret);
    127127        }
    128    
     128
    129129        //find the FM device
    130         for(i=64;i<64+((deviceid+1)<<3);i++) 
     130        for(i=64;i<64+((deviceid+1)<<3);i++)
    131131        {
    132132            memset((PVOID)__Stack32ToFlat(&clientinfo), 0, sizeof(clientinfo));
     
    143143        }
    144144        if(i == 64+((deviceid+1)<<3)) {
    145             dprintf(("Couldn't find OPL3 device"));
     145            rprintf(("Couldn't find OPL3 device"));
    146146            ret = pHandle->file.f_op->release(&pHandle->inode, &pHandle->file);
    147147            kfree(pHandle);
     
    159159        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_CREATE_PORT, (ULONG)__Stack32ToFlat(&portinfo));
    160160        if(ret) {
    161             dprintf(("subscribe error %d", ret));
     161            rprintf(("subscribe error %d", ret));
    162162            kfree(pHandle);
    163163            return UNIXToOSSError(ret);
     
    165165        pHandle->clientport = portinfo.addr.port;
    166166        pHandle->state     |= MIDISTATE_PORTCREATED;
    167        
     167
    168168        //subscribe to FM device port
    169169        memset(&subs, 0, sizeof(subs));
     
    174174        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT, (ULONG)__Stack32ToFlat(&subs));
    175175        if(ret) {
    176             dprintf(("subscribe error %d", ret));
     176            rprintf(("subscribe error %d", ret));
    177177            kfree(pHandle);
    178178            return UNIXToOSSError(ret);
    179179        }
    180180        pHandle->state |= MIDISTATE_SUBSCRIBED;
    181        
     181
    182182#if 0
    183183        //Load FM instruments (only done once)
     
    200200        return OSSERR_INVALID_STREAMID;
    201201    }
    202     printk("Closing MIDI %x\n",(ULONG)streamid);
     202    dprintf(("Closing MIDI %x\n",(ULONG)streamid));
    203203
    204204    //set operation to non-blocking
     
    214214        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT, (ULONG)__Stack32ToFlat(&subs));
    215215        if(ret) {
    216             dprintf(("unsubscribe error %d", ret));
     216            rprintf(("unsubscribe error %d", ret));
    217217            DebugInt3();
    218218        }
    219219    }
    220    
     220
    221221    //delete port
    222222    if(pHandle->state & MIDISTATE_SUBSCRIBED) {
    223223        struct snd_seq_port_info       portinfo;
    224        
     224
    225225        memset(&portinfo, 0, sizeof(portinfo));
    226226        strcpy(portinfo.name, "Unamed port");
     
    248248OSSRET OSS32_MidiWrite(OSSSTREAMID streamid, ULONG midiByte)
    249249{
    250     printk("MIDI write %x\n",(ULONG)streamid);
     250    dprintf(("MIDI write %x\n",(ULONG)streamid));
    251251    return OSSERR_INVALID_STREAMID;
    252252}
     
    269269    if (ret > 0)
    270270    {
    271         printk("MIDI read %i bytes from %x. first byte is: %x\n",ret, (ULONG)streamid, (char*)buffer[0]);
     271        dprintf(("MIDI read %i bytes from %x. first byte is: %x\n",ret, (ULONG)streamid, (char*)buffer[0]));
    272272        *pTransferred = ret;
    273273        return OSSERR_SUCCESS;
     
    279279OSSRET OSS32_MidiQueryCaps(OSSSTREAMID streamid, POSS32_MIDICAPS pCaps)
    280280{
    281     printk("MIDI query caps %x\n",(ULONG)streamid);
     281    dprintf(("MIDI query caps %x\n",(ULONG)streamid));
    282282    return OSSERR_INVALID_STREAMID;
    283283}
     
    295295        return OSSERR_INVALID_STREAMID;
    296296    }
    297     printk("MIDI command %x\n",(ULONG)streamid);
     297    dprintf(("MIDI command %x\n",(ULONG)streamid));
    298298
    299299    //set operation to non-blocking
     
    334334
    335335    if(transferred < 0) {
    336         dprintf(("OSS32_MidiNoteOn failed!!"));
     336        rprintf(("OSS32_MidiNoteOn failed!!"));
    337337        DebugInt3();
    338338        return UNIXToOSSError(transferred);
  • GPL/branches/uniaud32-2.1.x/lib32/soundmixer.c

    r506 r519  
    474474    }
    475475    if(idx == -1) {
    476         dprintf(("Unknown control %d", line));
     476        rprintf(("Unknown control %d", line));
    477477        ret = OSSERR_INVALID_PARAMETER;
    478478        goto fail;
     
    512512    }
    513513
    514         printk("OSS32_MixSetVolume of %s streamid %X to (%d,%d)(%d,%d) caps %d\n",
     514        dprintf(("OSS32_MixSetVolume of %s streamid %X to (%d,%d)(%d,%d) caps %d",
    515515                pHandle->pids[idx].name, (ULONG)pHandle,
    516                 GET_VOLUME_L(volume), GET_VOLUME_R(volume), lVol, rVol, pElemInfo->value.integer.max);
     516                GET_VOLUME_L(volume), GET_VOLUME_R(volume), lVol, rVol, pElemInfo->value.integer.max));
    517517
    518518#if 1
     
    525525            cnt++;
    526526
    527         printk("OSS32_MixSetVolume old cnt=%X line=%x lVol=%x rVol=%x\n", cnt, line, lVol, rVol);
     527        dprintf(("OSS32_MixSetVolume old cnt=%X line=%x lVol=%x rVol=%x", cnt, line, lVol, rVol));
    528528    //    if (((cnt == 1 && (lVol==0 && rVol==0)) || (lVol>0 && rVol>0)) ||
    529529    if (cnt == 1 || line != OSS32_MIX_VOLUME_PCM)
    530530    {
    531                 printk("OSS32_MixSetVolume Ioctl\n");
     531                dprintf(("OSS32_MixSetVolume Ioctl"));
    532532        ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_CTL_IOCTL_ELEM_WRITE, (ULONG)pElem);
    533533
     
    539539            pElem->value.integer.value[0] = FALSE;  //switch, not mute control (inversed)
    540540            pElem->value.integer.value[1] = FALSE;
    541                         printk("OSS32_MixSetVolume Ioctl mute\n");
     541                        dprintf(("OSS32_MixSetVolume Ioctl mute"));
    542542            ret = pHandle->file.f_op->ioctl(&pHandle->inode, &pHandle->file, SNDRV_CTL_IOCTL_ELEM_WRITE, (ULONG)pElem);
    543543        }
     
    548548    pElem = NULL;
    549549    if(ret) {
    550         printk("ret = %i\n", ret);
     550        rprintf(("OSS32_MixSetVolume ret=%x", ret));
    551551        DebugInt3();
    552552        return UNIXToOSSError(ret);
  • GPL/branches/uniaud32-2.1.x/uniaud.inc

    r517 r519  
    1313# ex RC3  GA  FIXPACK2 beta_47
    1414# Comment out to avoid a fixpack line in bldlevel
    15 FIXPACK = BETA SVNr517
     15FIXPACK = BETA SVNr519
    1616
    1717# ALSA BUILD VERSION
Note: See TracChangeset for help on using the changeset viewer.