Ignore:
Timestamp:
Nov 8, 2007, 4:47:51 AM (18 years ago)
Author:
Brendan Oakley
Message:

Fix HDA buffering in Uniaud32, from Pavel

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/pci/hda/hda_intel.c

    r130 r267  
    256256
    257257struct azx_dev {
    258         u32 *bdl;                       /* virtual address of the BDL */
     258#ifdef TARGET_OS2
     259        volatile u32 *bdl;                      /* virtual address of the BDL */
    259260        dma_addr_t bdl_addr;            /* physical address of the BDL */
    260         u32 *posbuf;                    /* position buffer pointer */
     261        volatile u32 *posbuf;                   /* position buffer pointer */
     262#else /* !TARGET_OS2 */
     263        u32 *bdl;               /* virtual address of the BDL */
     264        dma_addr_t bdl_addr;    /* physical address of the BDL */
     265        u32 *posbuf;            /* position buffer pointer */
     266#endif /* !TARGET_OS2 */
    261267
    262268        unsigned int bufsize;           /* size of the play buffer in bytes */
     
    265271        unsigned int fifo_size;         /* FIFO size */
    266272
    267         void __iomem *sd_addr;          /* stream descriptor pointer */
     273#ifdef TARGET_OS2
     274        volatile void __iomem *sd_addr;         /* stream descriptor pointer */
     275#else /* !TARGET_OS2 */
     276        void __iomem *sd_addr;  /* stream descriptor pointer */
     277#endif /* !TARGET_OS2 */
    268278
    269279        u32 sd_int_sta_mask;            /* stream int status mask */
     
    283293/* CORB/RIRB */
    284294struct azx_rb {
     295#ifdef TARGET_OS2
     296        volatile u32 *buf;              /* CORB/RIRB buffer
     297#else /* !TARGET_OS2 */
    285298        u32 *buf;               /* CORB/RIRB buffer
     299#endif /* !TARGET_OS2 */
    286300                                 * Each CORB entry is 4byte, RIRB is 8byte
    287301                                 */
     
    307321        /* pci resources */
    308322        unsigned long addr;
     323#ifdef TARGET_OS2
     324        volatile void __iomem *remap_addr;
     325#else /* !TARGET_OS2 */
    309326        void __iomem *remap_addr;
     327#endif /* !TARGET_OS2 */
    310328        int irq;
    311329
     
    880898static void azx_setup_periods(struct azx_dev *azx_dev)
    881899{
     900#ifdef TARGET_OS2
     901        volatile u32 *bdl = azx_dev->bdl;
     902#else /* !TARGET_OS2 */
    882903        u32 *bdl = azx_dev->bdl;
     904#endif /* !TARGET_OS2 */
    883905        dma_addr_t dma_addr = azx_dev->substream->runtime->dma_addr;
    884906        int idx;
     
    11961218            cmd == SNDRV_PCM_TRIGGER_SUSPEND ||
    11971219            cmd == SNDRV_PCM_TRIGGER_STOP) {
     1220#ifndef TARGET_OS2
    11981221                int timeout = 5000;
     1222#else /* TARGET_OS2 */
     1223                int timeout = 100000;
     1224#endif /* TARGET_OS2 */
    11991225                while (azx_sd_readb(azx_dev, SD_CTL) & SD_CTL_DMA_START && --timeout)
    12001226                        ;
     
    14821508                pci_disable_msi(chip->pci);
    14831509        if (chip->remap_addr)
     1510#ifdef TARGET_OS2
     1511                iounmap((void *)chip->remap_addr);
     1512#else /* !TARGET_OS2 */
    14841513                iounmap(chip->remap_addr);
     1514#endif /* !TARGET_OS2 */
    14851515
    14861516        if (chip->bdl.area)
Note: See TracChangeset for help on using the changeset viewer.