Ignore:
Timestamp:
May 9, 2009, 11:45:26 AM (16 years ago)
Author:
Paul Smedley
Message:

Update alsa-kernel to ALSA 1.0.20 level

File:
1 edited

Legend:

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

    r305 r426  
    169169 
    170170        if (epcm) {
    171                 //snd_printk("epcm free: %p\n", epcm);
     171                /* snd_printk(KERN_DEBUG "epcm free: %p\n", epcm); */
    172172                kfree(epcm);
    173173        }
     
    184184
    185185        epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
    186         //snd_printk("epcm kcalloc: %p\n", epcm);
     186        /* snd_printk(KERN_DEBUG "epcm kcalloc: %p\n", epcm); */
    187187
    188188        if (epcm == NULL)
     
    190190        epcm->emu = emu;
    191191        epcm->substream = substream;
    192         //snd_printk("epcm device=%d, channel_id=%d\n", substream->pcm->device, channel_id);
    193  
     192        /*
     193        snd_printk(KERN_DEBUG "epcm device=%d, channel_id=%d\n",
     194                   substream->pcm->device, channel_id);
     195        */
    194196        runtime->private_data = epcm;
    195197        runtime->private_free = snd_p16v_pcm_free_substream;
     
    201203
    202204        channel->use=1;
    203         //snd_printk("p16v: open channel_id=%d, channel=%p, use=0x%x\n", channel_id, channel, channel->use);
    204         //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel);
    205         //channel->interrupt = snd_p16v_pcm_channel_interrupt;
    206         channel->epcm=epcm;
     205#if 0 /* debug */
     206        snd_printk(KERN_DEBUG
     207                   "p16v: open channel_id=%d, channel=%p, use=0x%x\n",
     208                   channel_id, channel, channel->use);
     209        printk(KERN_DEBUG "open:channel_id=%d, chip=%p, channel=%p\n",
     210               channel_id, chip, channel);
     211#endif /* debug */
     212        /* channel->interrupt = snd_p16v_pcm_channel_interrupt; */
     213        channel->epcm = epcm;
    207214        if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
    208215                return err;
     
    225232
    226233        epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
    227         //snd_printk("epcm kcalloc: %p\n", epcm);
     234        /* snd_printk(KERN_DEBUG "epcm kcalloc: %p\n", epcm); */
    228235
    229236        if (epcm == NULL)
     
    231238        epcm->emu = emu;
    232239        epcm->substream = substream;
    233         //snd_printk("epcm device=%d, channel_id=%d\n", substream->pcm->device, channel_id);
    234 
     240        /*
     241        snd_printk(KERN_DEBUG "epcm device=%d, channel_id=%d\n",
     242                   substream->pcm->device, channel_id);
     243        */
    235244        runtime->private_data = epcm;
    236245        runtime->private_free = snd_p16v_pcm_free_substream;
     
    242251
    243252        channel->use=1;
    244         //snd_printk("p16v: open channel_id=%d, channel=%p, use=0x%x\n", channel_id, channel, channel->use);
    245         //printk("open:channel_id=%d, chip=%p, channel=%p\n",channel_id, chip, channel);
    246         //channel->interrupt = snd_p16v_pcm_channel_interrupt;
    247         channel->epcm=epcm;
     253#if 0 /* debug */
     254        snd_printk(KERN_DEBUG
     255                   "p16v: open channel_id=%d, channel=%p, use=0x%x\n",
     256                   channel_id, channel, channel->use);
     257        printk(KERN_DEBUG "open:channel_id=%d, chip=%p, channel=%p\n",
     258               channel_id, chip, channel);
     259#endif /* debug */
     260        /* channel->interrupt = snd_p16v_pcm_channel_interrupt; */
     261        channel->epcm = epcm;
    248262        if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
    249263                return err;
     
    335349        u32 tmp;
    336350       
    337         //snd_printk("prepare:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, periods=%u, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size, runtime->periods, frames_to_bytes(runtime, 1));
    338         //snd_printk("dma_addr=%x, dma_area=%p, table_base=%p\n",runtime->dma_addr, runtime->dma_area, table_base);
    339         //snd_printk("dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n",emu->p16v_buffer.addr, emu->p16v_buffer.area, emu->p16v_buffer.bytes);
     351#if 0 /* debug */
     352        snd_printk(KERN_DEBUG "prepare:channel_number=%d, rate=%d, "
     353                   "format=0x%x, channels=%d, buffer_size=%ld, "
     354                   "period_size=%ld, periods=%u, frames_to_bytes=%d\n",
     355                   channel, runtime->rate, runtime->format, runtime->channels,
     356                   runtime->buffer_size, runtime->period_size,
     357                   runtime->periods, frames_to_bytes(runtime, 1));
     358        snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, table_base=%p\n",
     359                   runtime->dma_addr, runtime->dma_area, table_base);
     360        snd_printk(KERN_DEBUG "dma_addr=%x, dma_area=%p, dma_bytes(size)=%x\n",
     361                   emu->p16v_buffer.addr, emu->p16v_buffer.area,
     362                   emu->p16v_buffer.bytes);
     363#endif /* debug */
    340364        tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, channel);
    341365        switch (runtime->rate) {
     
    380404        int channel = substream->pcm->device - emu->p16v_device_offset;
    381405        u32 tmp;
    382         //printk("prepare capture:channel_number=%d, rate=%d, format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, frames_to_bytes=%d\n",channel, runtime->rate, runtime->format, runtime->channels, runtime->buffer_size, runtime->period_size,  frames_to_bytes(runtime, 1));
     406
     407        /*
     408        printk(KERN_DEBUG "prepare capture:channel_number=%d, rate=%d, "
     409               "format=0x%x, channels=%d, buffer_size=%ld, period_size=%ld, "
     410               "frames_to_bytes=%d\n",
     411               channel, runtime->rate, runtime->format, runtime->channels,
     412               runtime->buffer_size, runtime->period_size,
     413               frames_to_bytes(runtime, 1));
     414        */
    383415        tmp = snd_emu10k1_ptr_read(emu, A_SPDIF_SAMPLERATE, channel);
    384416        switch (runtime->rate) {
     
    460492                epcm = runtime->private_data;
    461493                channel = substream->pcm->device-emu->p16v_device_offset;
    462                 //snd_printk("p16v channel=%d\n",channel);
     494                /* snd_printk(KERN_DEBUG "p16v channel=%d\n", channel); */
    463495                epcm->running = running;
    464496                basic |= (0x1<<channel);
     
    466498                snd_pcm_trigger_done(s, substream);
    467499        }
    468         //snd_printk("basic=0x%x, inte=0x%x\n",basic, inte);
     500        /* snd_printk(KERN_DEBUG "basic=0x%x, inte=0x%x\n", basic, inte); */
    469501
    470502        switch (cmd) {
     
    559591                printk(KERN_WARNING "buffer capture limited!\n");
    560592        }
    561         //printk("ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n", ptr1, ptr2, ptr, (int)runtime->buffer_size, (int)runtime->period_size, (int)runtime->frame_bits, (int)runtime->rate);
    562 
     593        /*
     594        printk(KERN_DEBUG "ptr1 = 0x%lx, ptr2=0x%lx, ptr=0x%lx, "
     595               "buffer_size = 0x%x, period_size = 0x%x, bits=%d, rate=%d\n",
     596               ptr1, ptr2, ptr, (int)runtime->buffer_size,
     597               (int)runtime->period_size, (int)runtime->frame_bits,
     598               (int)runtime->rate);
     599        */
    563600        return ptr;
    564601}
     
    593630        if (chip->p16v_buffer.area) {
    594631                snd_dma_free_pages(&chip->p16v_buffer);
    595                 //snd_printk("period lables free: %p\n", &chip->p16v_buffer);
     632                /*
     633                snd_printk(KERN_DEBUG "period lables free: %p\n",
     634                           &chip->p16v_buffer);
     635                */
    596636        }
    597637        return 0;
     
    605645        int capture=1;
    606646 
    607         //snd_printk("snd_p16v_pcm called. device=%d\n", device);
     647        /* snd_printk("KERN_DEBUG snd_p16v_pcm called. device=%d\n", device); */
    608648        emu->p16v_device_offset = device;
    609649        if (rpcm)
     
    632672                                                         ((65536 - 64) * 8), ((65536 - 64) * 8))) < 0)
    633673                        return err;
    634                 //snd_printk("preallocate playback substream: err=%d\n", err);
     674                /*
     675                snd_printk(KERN_DEBUG
     676                           "preallocate playback substream: err=%d\n", err);
     677                */
    635678        }
    636679
     
    643686                                                   65536 - 64, 65536 - 64)) < 0)
    644687                        return err;
    645                 //snd_printk("preallocate capture substream: err=%d\n", err);
     688                /*
     689                snd_printk(KERN_DEBUG
     690                           "preallocate capture substream: err=%d\n", err);
     691                */
    646692        }
    647693 
Note: See TracChangeset for help on using the changeset viewer.