Ignore:
Timestamp:
Jul 22, 2010, 7:20:45 PM (15 years ago)
Author:
David Azarewicz
Message:

flush_workqueue hack, compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/pci/emu10k1/emu10k1x.c

    r464 r522  
    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 chanel
    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) && (reg >= 0) && (val <= 0xffffffff)
    1048                     && (channel_id >= 0) && (channel_id <= 2) )
     1047                if ((reg < 0x49) /* && (reg >= 0) && (val <= 0xffffffff) && (channel_id >= 0) DAZ */ && (channel_id <= 2) )
    10491048                        snd_emu10k1x_ptr_write(emu, reg, channel_id, val);
    10501049        }
Note: See TracChangeset for help on using the changeset viewer.