Changeset 262 for GPL/branches


Ignore:
Timestamp:
Oct 18, 2007, 6:38:12 AM (18 years ago)
Author:
Brendan Oakley
Message:

Merged to ALSA 0.9.6

Location:
GPL/branches/alsa-resync1/alsa-kernel
Files:
40 edited

Legend:

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

    r250 r262  
    4949static int snd_ctl_open(struct inode *inode, struct file *file)
    5050{
    51         int cardnum = SNDRV_MINOR_CARD(minor(inode->i_rdev));
     51        int cardnum = SNDRV_MINOR_CARD(iminor(inode));
    5252        unsigned long flags;
    5353        struct snd_card *card;
  • GPL/branches/alsa-resync1/alsa-kernel/core/hwdep.c

    r224 r262  
    7474static int snd_hwdep_open(struct inode *inode, struct file * file)
    7575{
    76         int major = major(inode->i_rdev);
     76        int major = imajor(inode);
    7777    int cardnum;
    7878    int device;
     
    8383    switch (major) {
    8484    case CONFIG_SND_MAJOR:
    85                 cardnum = SNDRV_MINOR_CARD(minor(inode->i_rdev));
    86                 device = SNDRV_MINOR_DEVICE(minor(inode->i_rdev)) - SNDRV_MINOR_HWDEP;
     85                cardnum = SNDRV_MINOR_CARD(iminor(inode));
     86                device = SNDRV_MINOR_DEVICE(iminor(inode)) - SNDRV_MINOR_HWDEP;
    8787        break;
    8888#ifdef CONFIG_SND_OSSEMUL
    8989    case SOUND_MAJOR:
    90                 cardnum = SNDRV_MINOR_OSS_CARD(minor(inode->i_rdev));
     90                cardnum = SNDRV_MINOR_OSS_CARD(iminor(inode));
    9191        device = 0;
    9292        break;
  • GPL/branches/alsa-resync1/alsa-kernel/core/pcm_native.c

    r250 r262  
    2121
    2222#include <sound/driver.h>
    23 #include <linux/version.h>
    2423#include <linux/mm.h>
    2524#include <linux/file.h>
     
    15681567    inode = file->f_dentry->d_inode;
    15691568    if (!S_ISCHR(inode->i_mode) ||
    1570             major(inode->i_rdev) != snd_major) {
     1569            imajor(inode) != snd_major) {
    15711570        fput(file);
    15721571        return 0;
    15731572    }
    1574         minor = minor(inode->i_rdev);
     1573        minor = iminor(inode);
    15751574        if (minor >= 256 ||
    15761575        minor % SNDRV_MINOR_DEVICES < SNDRV_MINOR_PCM_PLAYBACK) {
     
    21052104int snd_pcm_open(struct inode *inode, struct file *file)
    21062105{
    2107         int cardnum = SNDRV_MINOR_CARD(minor(inode->i_rdev));
    2108         int device = SNDRV_MINOR_DEVICE(minor(inode->i_rdev));
     2106        int cardnum = SNDRV_MINOR_CARD(iminor(inode));
     2107        int device = SNDRV_MINOR_DEVICE(iminor(inode));
    21092108    int err;
    21102109    snd_pcm_t *pcm;
  • GPL/branches/alsa-resync1/alsa-kernel/core/rawmidi.c

    r250 r262  
    358358static int snd_rawmidi_open(struct inode *inode, struct file *file)
    359359{
    360         int maj = major(inode->i_rdev);
     360        int maj = imajor(inode);
    361361    int cardnum;
    362362    snd_card_t *card;
  • GPL/branches/alsa-resync1/alsa-kernel/core/sound.c

    r250 r262  
    2121
    2222#include <sound/driver.h>
    23 #include <linux/version.h>
    2423#include <linux/init.h>
    2524#include <linux/slab.h>
     
    128127static int snd_open(struct inode *inode, struct file *file)
    129128{
    130         int minor = minor(inode->i_rdev);
     129        int minor = iminor(inode);
    131130    int card = SNDRV_MINOR_CARD(minor);
    132131    int dev = SNDRV_MINOR_DEVICE(minor);
  • GPL/branches/alsa-resync1/alsa-kernel/drivers/dummy.c

    r260 r262  
    2020
    2121#include <sound/driver.h>
    22 #include <linux/version.h>
    2322#include <linux/init.h>
    2423#ifndef TARGET_OS2 //TODO: Implement linux/jiffies.h
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/adriver.h

    r250 r262  
    116116#define minor(x) MINOR(x)
    117117#endif
     118#ifndef imajor
     119#define imajor(x) major((x)->i_rdev)
     120#endif
     121#ifndef iminor
     122#define iminor(x) minor((x)->i_rdev)
     123#endif
    118124#ifndef mk_kdev
    119125#define mk_kdev(maj, min) MKDEV(maj, min)
     
    128134#define need_resched() (current->need_resched)
    129135#endif
    130 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 4) && !defined TARGET_OS2
     136#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 4) && !defined(WE_ARE_WOLK) && !defined TARGET_OS2
    131137#include <linux/fs.h>
    132138static inline struct proc_dir_entry *PDE(const struct inode *inode)
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/compat_22.h

    r250 r262  
    280280};
    281281
    282 #ifndef PCI_OLD_SUSPEND
    283 #define PCI_OLD_SUSPEND
    284 #endif
    285 
    286282struct pci_driver {
    287283        struct list_head node;
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/hdsp.h

    r250 r262  
    6969
    7070struct _snd_hdsp_firmware {
    71         unsigned long firmware_data[24413];
     71        unsigned long *firmware_data;   /* 24413 long words */
    7272};
    7373
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/pcm_oss.h

    r260 r262  
    5252        size_t period_bytes;                    /* requested period size */
    5353        unsigned int periods;
    54         size_t buffer_bytes;                    /* requested period size */
     54        size_t buffer_bytes;                    /* requested buffer size */
    5555        size_t bytes;                           /* total # bytes processed */
    5656        size_t mmap_bytes;
    5757        char *buffer;                           /* vmallocated period */
    58         size_t buffer_used;                     /* used length from buffer */
     58        size_t buffer_used;                     /* used length from period buffer */
    5959        snd_pcm_plugin_t *plugin_first;
    6060        snd_pcm_plugin_t *plugin_last;
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/sscape_ioctl.h

    r212 r262  
    1111struct sscape_microcode
    1212{
    13   unsigned char code[65536];
     13  unsigned char *code;  /* 65536 chars */
    1414};
    1515
    1616#define SND_SSCAPE_LOAD_BOOTB  _IOWR('P', 100, struct sscape_bootblock)
    17 #define SND_SSCAPE_LOAD_MCODE  _IOW('P', 101, struct sscape_microcode)
     17#define SND_SSCAPE_LOAD_MCODE  _IOW ('P', 101, struct sscape_microcode)
    1818
    1919#endif
  • GPL/branches/alsa-resync1/alsa-kernel/include/sound/version.h

    r260 r262  
    1 /* include/version.h.  Generated by configure.  */
    2 #define CONFIG_SND_VERSION "0.9.6"
     1/* include/version.h.  Generated automatically by configure.  */
     2#define CONFIG_SND_VERSION "0.9.7"
    33#define CONFIG_SND_DATE ""
  • GPL/branches/alsa-resync1/alsa-kernel/isa/ad1816a/ad1816a.c

    r246 r262  
    9494};
    9595
    96 static struct pnp_card_device_id snd_ad1816a_pnpids[] __devinitdata = {
     96static struct pnp_card_device_id snd_ad1816a_pnpids[] = {
    9797        /* Analog Devices AD1815 */
    9898        { .id = "ADS7150", .devs = { { .id = "ADS7150" }, { .id = "ADS7151" } } },
  • GPL/branches/alsa-resync1/alsa-kernel/isa/als100.c

    r246 r262  
    9999};
    100100
    101 static struct pnp_card_device_id snd_als100_pnpids[] __devinitdata = {
     101static struct pnp_card_device_id snd_als100_pnpids[] = {
    102102        /* ALS100 - PRO16PNP */
    103103        { .id = "ALS0001", .devs = { { "@@@0001" }, { "@X@0001" }, { "@H@0001" } } },
  • GPL/branches/alsa-resync1/alsa-kernel/isa/azt2320.c

    r250 r262  
    110110};
    111111
    112 static struct pnp_card_device_id snd_azt2320_pnpids[] __devinitdata = {
     112static struct pnp_card_device_id snd_azt2320_pnpids[] = {
    113113        /* PRO16V */
    114114        { .id = "AZT1008", .devs = { { "AZT1008" }, { "AZT2001" }, } },
  • GPL/branches/alsa-resync1/alsa-kernel/isa/cmi8330.c

    r260 r262  
    177177#ifdef CONFIG_PNP
    178178
    179 static struct pnp_card_device_id snd_cmi8330_pnpids[] __devinitdata = {
     179static struct pnp_card_device_id snd_cmi8330_pnpids[] = {
    180180        { .id = "CMI0001", .devs = { { "@@@0001" }, { "@X@0001" } } },
    181181        { .id = "" }
  • GPL/branches/alsa-resync1/alsa-kernel/isa/cs423x/cs4236.c

    r250 r262  
    202202
    203203#ifdef CS4232
    204 static struct pnp_card_device_id snd_cs423x_pnpids[] __devinitdata = {
     204static struct pnp_card_device_id snd_cs423x_pnpids[] = {
    205205        /* Philips PCA70PS */
    206206        { .id = "CSC0d32", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } },
     
    221221};
    222222#else /* CS4236 */
    223 static struct pnp_card_device_id snd_cs423x_pnpids[] __devinitdata = {
     223static struct pnp_card_device_id snd_cs423x_pnpids[] = {
    224224        /* Intel Marlin Spike Motherboard - CS4235 */
    225225        { .id = "CSC0225", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
     
    553553                irq[dev],
    554554                dma1[dev]);
    555         if (dma1[dev] >= 0)
     555        if (dma2[dev] >= 0)
    556556                sprintf(card->longname + strlen(card->longname), "&%d", dma2[dev]);
    557557        if ((err = snd_card_register(card)) < 0) {
  • GPL/branches/alsa-resync1/alsa-kernel/isa/dt019x.c

    r250 r262  
    8989};
    9090
    91 static struct pnp_card_device_id snd_dt019x_pnpids[] __devinitdata = {
     91static struct pnp_card_device_id snd_dt019x_pnpids[] = {
    9292        /* DT197A30 */
    9393        { .id = "RWB1688", .devs = { { "@@@0001" }, { "@X@0001" }, { "@H@0001" }, } },
  • GPL/branches/alsa-resync1/alsa-kernel/isa/es18xx.c

    r260 r262  
    19481948#ifdef CONFIG_PNP
    19491949
    1950 static struct pnp_card_device_id snd_audiodrive_pnpids[] __devinitdata = {
     1950static struct pnp_card_device_id snd_audiodrive_pnpids[] = {
    19511951        /* ESS 1868 (integrated on Compaq dual P-Pro motherboard and Genius 18PnP 3D) */
    19521952        { .id = "ESS1868", .devs = { { "ESS1868" }, { "ESS0000" } } },
  • GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusclassic.c

    r212 r262  
    197197        }
    198198        if (gus->max_flag || gus->ess_flag) {
    199                 snd_card_free(card);
    200199                snd_printdd("GUS Classic or ACE soundcard was not detected at 0x%lx\n", gus->gf1.port);
     200                snd_card_free(card);
    201201                return -ENODEV;
    202202        }
  • GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusextreme.c

    r212 r262  
    297297        }
    298298        if (!gus->ess_flag) {
    299                 snd_card_free(card);
    300299                snd_printdd("GUS Extreme soundcard was not detected at 0x%lx\n", gus->gf1.port);
     300                snd_card_free(card);
    301301                return -ENODEV;
    302302        }
  • GPL/branches/alsa-resync1/alsa-kernel/isa/gus/gusmax.c

    r246 r262  
    301301        }
    302302        if (!gus->max_flag) {
    303                 snd_card_free(card);
    304303                printk(KERN_ERR "GUS MAX soundcard was not detected at 0x%lx\n", gus->gf1.port);
     304                snd_card_free(card);
    305305                return -ENODEV;
    306306        }
  • GPL/branches/alsa-resync1/alsa-kernel/isa/gus/interwave.c

    r250 r262  
    151151#ifdef CONFIG_PNP
    152152
    153 static struct pnp_card_device_id snd_interwave_pnpids[] __devinitdata = {
     153static struct pnp_card_device_id snd_interwave_pnpids[] = {
    154154#ifndef SNDRV_STB
    155155        /* Gravis UltraSound Plug & Play */
  • GPL/branches/alsa-resync1/alsa-kernel/isa/opl3sa2.c

    r256 r262  
    170170#ifdef CONFIG_PNP
    171171
    172 static struct pnp_card_device_id snd_opl3sa2_pnpids[] __devinitdata = {
     172static struct pnp_card_device_id snd_opl3sa2_pnpids[] = {
    173173        /* Yamaha YMF719E-S (Genius Sound Maker 3DX) */
    174174        { .id = "YMH0020", .devs = { { "YMH0021" } } },
     
    721721                goto __error;
    722722        }
     723        spin_lock_init(&chip->reg_lock);
    723724        chip->irq = -1;
    724725        if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0)
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sb/emu8000.c

    r250 r262  
    660660        soundfont_chorus_fx_t rec;
    661661        if (mode < SNDRV_EMU8000_CHORUS_PREDEFINED || mode >= SNDRV_EMU8000_CHORUS_NUMBERS) {
    662                 snd_printk(KERN_WARNING "illegal chorus mode %d for uploading\n", mode);
     662                snd_printk(KERN_WARNING "invalid chorus mode %d for uploading\n", mode);
    663663                return -EINVAL;
    664664        }
     
    788788
    789789        if (mode < SNDRV_EMU8000_REVERB_PREDEFINED || mode >= SNDRV_EMU8000_REVERB_NUMBERS) {
    790                 snd_printk(KERN_WARNING "illegal reverb mode %d for uploading\n", mode);
     790                snd_printk(KERN_WARNING "invalid reverb mode %d for uploading\n", mode);
    791791                return -EINVAL;
    792792        }
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sb/es968.c

    r250 r262  
    7070};
    7171
    72 static struct pnp_card_device_id snd_es968_pnpids[] __devinitdata = {
     72static struct pnp_card_device_id snd_es968_pnpids[] = {
    7373        { .id = "ESS0968", .devs = { { "@@@0968" }, } },
    7474        { .id = "", } /* end */
  • GPL/branches/alsa-resync1/alsa-kernel/isa/sb/sb16.c

    r260 r262  
    176176static snd_card_t *snd_sb16_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
    177177
    178 static struct pnp_card_device_id snd_sb16_pnpids[] __devinitdata = {
     178static struct pnp_card_device_id snd_sb16_pnpids[] = {
    179179#ifndef SNDRV_SBAWE
    180180    /* Sound Blaster 16 PnP */
  • GPL/branches/alsa-resync1/alsa-kernel/isa/wavefront/wavefront.c

    r250 r262  
    103103#ifdef CONFIG_PNP
    104104
    105 static struct pnp_card_device_id snd_wavefront_pnpids[] __devinitdata = {
     105static struct pnp_card_device_id snd_wavefront_pnpids[] = {
    106106        /* Tropez */
    107107        { .id = "CSC7532", .devs = { { "CSC0000" }, { "CSC0010" }, { "PnPb006" }, { "CSC0004" } } },
  • GPL/branches/alsa-resync1/alsa-kernel/pci/cmipci.c

    r210 r262  
    26452645}
    26462646
    2647 static struct pci_device_id snd_cmipci_ids[] __devinitdata = {
     2647static struct pci_device_id snd_cmipci_ids[] = {
    26482648    {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
    26492649    {PCI_VENDOR_ID_CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338B, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
  • GPL/branches/alsa-resync1/alsa-kernel/pci/es1968.c

    r250 r262  
    15981598    esschan_t *es;
    15991599    int apu1;
     1600        unsigned long flags;
    16001601
    16011602    /* search 2 APUs */
     
    16171618    es->substream = substream;
    16181619    es->mode = ESM_MODE_PLAY;
    1619         INIT_LIST_HEAD(&es->list);
    16201620
    16211621    runtime->private_data = es;
     
    16401640    esschan_t *es;
    16411641    int apu1, apu2;
     1642        unsigned long flags;
    16421643
    16431644    apu1 = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_CAPTURE);
     
    16691670    es->substream = substream;
    16701671    es->mode = ESM_MODE_CAPTURE;
    1671         INIT_LIST_HEAD(&es->list);
    16721672
    16731673    /* get mixbuffer */
     
    16991699    es1968_t *chip = snd_pcm_substream_chip(substream);
    17001700    esschan_t *es;
     1701        unsigned long flags;
    17011702
    17021703    if (substream->runtime->private_data == NULL)
     
    17161717    es1968_t *chip = snd_pcm_substream_chip(substream);
    17171718    esschan_t *es;
     1719        unsigned long flags;
    17181720
    17191721    if (substream->runtime->private_data == NULL)
     
    20162018
    20172019    if (event & ESM_SOUND_IRQ) {
    2018                 struct list_head *p, *n;
     2020                struct list_head *p;
    20192021        spin_lock(&chip->substream_lock);
    2020                 /* we need to use list_for_each_safe here since the substream
    2021                  * can be deleted in period_elapsed().
    2022                  */
    2023                 list_for_each_safe(p, n, &chip->substream_list) {
     2022                list_for_each(p, &chip->substream_list) {
    20242023            esschan_t *es = list_entry(p, esschan_t, list);
    20252024            if (es->running)
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/aureon.c

    r250 r262  
    458458        0x80,   /* ACLINK: I2S */
    459459        0xf8,   /* I2S: vol, 96k, 24bit, 192k */
    460         0xc2,   /* SPDIF: out-en, out-int, spdif-in */
     460        0xc3,   /* SPDIF: out-en, out-int, spdif-in */
    461461        0xff,   /* GPIO_DIR */
    462462        0xff,   /* GPIO_DIR1 */
     
    474474        0x80,   /* ACLINK: I2S */
    475475        0xf8,   /* I2S: vol, 96k, 24bit, 192k */
    476         0xc2,   /* SPDIF: out-en, out-int, spdif-in */
     476        0xc3,   /* SPDIF: out-en, out-int, spdif-in */
    477477        0xff,   /* GPIO_DIR */
    478478        0xff,   /* GPIO_DIR1 */
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1712.c

    r250 r262  
    104104#endif
    105105
    106 static struct pci_device_id snd_ice1712_ids[] __devinitdata = {
     106static struct pci_device_id snd_ice1712_ids[] = {
    107107        { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_ICE_1712, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },   /* ICE1712 */
    108108        { 0, }
     
    114114static int snd_ice1712_build_controls(ice1712_t *ice);
    115115
    116 static int PRO_RATE_LOCKED = 0;
     116static int PRO_RATE_LOCKED;
    117117static int PRO_RATE_RESET = 1;
    118118static unsigned int PRO_RATE_DEFAULT = 44100;
     
    23882388
    23892389        if ((ice->res_port = request_region(ice->port, 32, "ICE1712 - Controller")) == NULL) {
     2390                snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1);
    23902391                snd_ice1712_free(ice);
    2391                 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1);
    23922392                return -EIO;
    23932393        }
    23942394        if ((ice->res_ddma_port = request_region(ice->ddma_port, 16, "ICE1712 - DDMA")) == NULL) {
     2395                snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->ddma_port, ice->ddma_port + 16 - 1);
    23952396                snd_ice1712_free(ice);
    2396                 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->ddma_port, ice->ddma_port + 16 - 1);
    23972397                return -EIO;
    23982398        }
    23992399        if ((ice->res_dmapath_port = request_region(ice->dmapath_port, 16, "ICE1712 - DMA path")) == NULL) {
     2400                snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->dmapath_port, ice->dmapath_port + 16 - 1);
    24002401                snd_ice1712_free(ice);
    2401                 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->dmapath_port, ice->dmapath_port + 16 - 1);
    24022402                return -EIO;
    24032403        }
    24042404        if ((ice->res_profi_port = request_region(ice->profi_port, 64, "ICE1712 - Professional")) == NULL) {
     2405                snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1);
    24052406                snd_ice1712_free(ice);
    2406                 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1);
    24072407                return -EIO;
    24082408        }
    24092409        if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1712", (void *) ice)) {
     2410                snd_printk("unable to grab IRQ %d\n", pci->irq);
    24102411                snd_ice1712_free(ice);
    2411                 snd_printk("unable to grab IRQ %d\n", pci->irq);
    24122412                return -EIO;
    24132413        }
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/ice1724.c

    r260 r262  
    7878#endif
    7979
    80 static struct pci_device_id snd_vt1724_ids[] __devinitdata = {
     80static struct pci_device_id snd_vt1724_ids[] = {
    8181        { PCI_VENDOR_ID_ICE, PCI_DEVICE_ID_VT1724, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
    8282        { 0, }
     
    8686
    8787
    88 static int PRO_RATE_LOCKED = 0;
     88static int PRO_RATE_LOCKED;
    8989static int PRO_RATE_RESET = 1;
    9090static unsigned int PRO_RATE_DEFAULT = 44100;
     
    383383        }
    384384
    385         if (rate == ice->cur_rate) {
    386                 spin_unlock_irqrestore(&ice->reg_lock, flags);
    387                 return;
    388         }
    389 
    390385        switch (rate) {
    391386        case 8000: val = 6; break;
     
    410405        }
    411406        outb(val, ICEMT1724(ice, RATE));
     407        if (rate == ice->cur_rate) {
     408                spin_unlock_irqrestore(&ice->reg_lock, flags);
     409                return;
     410        }
     411
    412412        ice->cur_rate = rate;
    413413
     
    483483}
    484484
    485 #define CHECK_INVALID_PTR
    486 
    487485static snd_pcm_uframes_t snd_vt1724_playback_pro_pointer(snd_pcm_substream_t * substream)
    488486{
     
    492490        if (!(inl(ICEMT1724(ice, DMA_CONTROL)) & VT1724_PDMA0_START))
    493491                return 0;
     492#if 0 /* read PLAYBACK_ADDR */
    494493        ptr = inl(ICEMT1724(ice, PLAYBACK_ADDR));
    495 #ifdef CHECK_INVALID_PTR
    496494        if (ptr < substream->runtime->dma_addr) {
    497495                snd_printd("ice1724: invalid negative ptr\n");
    498496                return 0;
    499497        }
    500 #endif
    501498        ptr -= substream->runtime->dma_addr;
    502499        ptr = bytes_to_frames(substream->runtime, ptr);
    503 #ifdef CHECK_INVALID_PTR
    504500        if (ptr >= substream->runtime->buffer_size) {
    505501                snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->period_size);
    506502                return 0;
     503        }
     504#else /* read PLAYBACK_SIZE */
     505        ptr = inl(ICEMT1724(ice, PLAYBACK_SIZE)) & 0xffffff;
     506        ptr = (ptr + 1) << 2;
     507        ptr = bytes_to_frames(substream->runtime, ptr);
     508        if (ptr <= substream->runtime->buffer_size)
     509                ptr = substream->runtime->buffer_size - ptr;
     510        else {
     511                snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->buffer_size);
     512                ptr = 0;
    507513        }
    508514#endif
     
    537543        if (!(inl(ICEMT1724(ice, DMA_CONTROL)) & reg->start))
    538544                return 0;
     545#if 0 /* use ADDR register */
    539546        ptr = inl(ice->profi_port + reg->addr);
    540547        ptr -= substream->runtime->dma_addr;
    541548        return bytes_to_frames(substream->runtime, ptr);
     549#else /* use SIZE register */
     550        ptr = inw(ice->profi_port + reg->size);
     551        ptr = (ptr + 1) << 2;
     552        ptr = bytes_to_frames(substream->runtime, ptr);
     553        if (ptr <= substream->runtime->buffer_size)
     554                ptr = substream->runtime->buffer_size - ptr;
     555        else {
     556                snd_printd("ice1724: invalid ptr %d (size=%d)\n", (int)ptr, (int)substream->runtime->buffer_size);
     557                ptr = 0;
     558        }
     559        return ptr;
     560#endif
    542561}
    543562
     
    567586                                 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START),
    568587        .formats =              SNDRV_PCM_FMTBIT_S32_LE,
    569         .rates =                SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000,
     588        .rates =                SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_192000,
    570589        .rate_min =             4000,
    571590        .rate_max =             192000,
     
    586605                                 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START),
    587606        .formats =              SNDRV_PCM_FMTBIT_S32_LE,
    588         .rates =                SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000,
     607        .rates =                SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_192000,
    589608        .rate_min =             4000,
    590609        .rate_max =             192000,
     
    721740                                 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_SYNC_START),
    722741        .formats =              SNDRV_PCM_FMTBIT_S32_LE,
    723         .rates =                SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_96000,
     742        .rates =                SNDRV_PCM_RATE_KNOT | SNDRV_PCM_RATE_8000_192000,
    724743        .rate_min =             4000,
    725744        .rate_max =             192000,
     
    779798        snd_pcm_hw_constraint_msbits(runtime, 0, 32, 24);
    780799
    781         snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_96);
     800        snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates_192);
    782801        return 0;
    783802}
     
    17971816
    17981817        if ((ice->res_port = request_region(ice->port, 32, "ICE1724 - Controller")) == NULL) {
     1818                snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1);
    17991819                snd_vt1724_free(ice);
    1800                 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->port, ice->port + 32 - 1);
    18011820                return -EIO;
    18021821        }
    18031822
    18041823        if ((ice->res_profi_port = request_region(ice->profi_port, 128, "ICE1724 - Professional")) == NULL) {
     1824                snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1);
    18051825                snd_vt1724_free(ice);
    1806                 snd_printk("unable to grab ports 0x%lx-0x%lx\n", ice->profi_port, ice->profi_port + 16 - 1);
    18071826                return -EIO;
    18081827        }
    18091828               
    18101829        if (request_irq(pci->irq, snd_vt1724_interrupt, SA_INTERRUPT|SA_SHIRQ, "ICE1724", (void *) ice)) {
     1830                snd_printk("unable to grab IRQ %d\n", pci->irq);
    18111831                snd_vt1724_free(ice);
    1812                 snd_printk("unable to grab IRQ %d\n", pci->irq);
    18131832                return -EIO;
    18141833        }
  • GPL/branches/alsa-resync1/alsa-kernel/pci/ice1712/revo.c

    r250 r262  
    7070        tmp &= ~(0x03 << shift);
    7171        tmp |= dfs << shift;
    72         snd_akm4xxx_write(ak, 0, reg, tmp);
     72        // snd_akm4xxx_write(ak, 0, reg, tmp);
     73        snd_akm4xxx_set(ak, 0, reg, tmp); /* the value is written in reset(0) */
    7374        snd_akm4xxx_reset(ak, 0);
    7475}
     
    135136
    136137        /* second stage of initialization, analog parts and others */
    137         ak = ice->akm = kmalloc(sizeof(akm4xxx_t) * 2, GFP_KERNEL);
     138        ak = ice->akm = snd_kcalloc(sizeof(akm4xxx_t) * 2, GFP_KERNEL);
    138139        if (! ak)
    139140                return -ENOMEM;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/korg1212/korg1212.c

    r260 r262  
    424424MODULE_AUTHOR("Haroldo Gamal <gamal@alternex.com.br>");
    425425
    426 static struct pci_device_id snd_korg1212_ids[] __devinitdata = {
     426static struct pci_device_id snd_korg1212_ids[] = {
    427427        {
    428428                .vendor    = 0x10b5,
  • GPL/branches/alsa-resync1/alsa-kernel/pci/rme96.c

    r250 r262  
    261261} rme96_t;
    262262
    263 static struct pci_device_id snd_rme96_ids[] __devinitdata = {
     263static struct pci_device_id snd_rme96_ids[] = {
    264264        { PCI_VENDOR_ID_XILINX, PCI_DEVICE_ID_DIGI96,
    265265          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
  • GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/hdsp.c

    r260 r262  
    475475#endif
    476476
    477 static struct pci_device_id snd_hdsp_ids[] __devinitdata = {
     477static struct pci_device_id snd_hdsp_ids[] = {
    478478        {
    479479                .vendor = PCI_VENDOR_ID_XILINX,
     
    37923792{
    37933793        hdsp_t *hdsp = (hdsp_t *)hw->private_data;     
    3794         hdsp_peak_rms_t *peak_rms;
    3795         hdsp_firmware_t *firmware;
    3796         hdsp_mixer_t    *mixer;
    3797         hdsp_config_info_t info;
    3798         hdsp_version_t hdsp_version;
    3799         int i;
    3800         int err;
    3801         unsigned long flags;
    38023794       
    38033795        switch (cmd) {
    3804         case SNDRV_HDSP_IOCTL_GET_PEAK_RMS:
     3796        case SNDRV_HDSP_IOCTL_GET_PEAK_RMS: {
     3797                hdsp_peak_rms_t *peak_rms;
     3798
    38053799                if (hdsp->io_type == H9652) {
    38063800                    snd_printk("hardware metering isn't supported yet for hdsp9652 cards\n");
     
    38283822                }
    38293823                break;
    3830         case SNDRV_HDSP_IOCTL_GET_CONFIG_INFO:
     3824        }
     3825        case SNDRV_HDSP_IOCTL_GET_CONFIG_INFO: {
     3826                hdsp_config_info_t info;
     3827                unsigned long flags;
     3828                int i;
     3829
    38313830                if (!(hdsp->state & HDSP_FirmwareLoaded)) {
    38323831                        snd_printk("Firmware needs to be uploaded to the card.\n");     
     
    38583857                        return -EFAULT;
    38593858                break;
    3860         case SNDRV_HDSP_IOCTL_GET_VERSION:
     3859        }
     3860        case SNDRV_HDSP_IOCTL_GET_VERSION: {
     3861                hdsp_version_t hdsp_version;
     3862                int err;
     3863
    38613864                if (hdsp->io_type == H9652) return -EINVAL;
    38623865                if (hdsp->io_type == Undefined) {
     
    38713874                }
    38723875                break;
    3873         case SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE:
     3876        }
     3877        case SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE: {
     3878                hdsp_firmware_t *firmware;
     3879                unsigned long *firmware_data;
     3880                int err;
     3881
    38743882                if (hdsp->io_type == H9652) return -EINVAL;
    38753883                /* SNDRV_HDSP_IOCTL_GET_VERSION must have been called */
     
    38783886                snd_printk("initializing firmware upload\n");
    38793887                firmware = (hdsp_firmware_t *)arg;
     3888                if (get_user(firmware_data, &firmware->firmware_data)) {
     3889                        return -EFAULT;
     3890                }
    38803891
    38813892                if (hdsp_check_for_iobox (hdsp)) {
     
    38833894                }
    38843895
    3885                 if (copy_from_user(hdsp->firmware_cache, firmware->firmware_data, sizeof(unsigned long)*24413) != 0) {
     3896                if (copy_from_user(hdsp->firmware_cache, firmware_data, sizeof(unsigned long)*24413) != 0) {
    38863897                        return -EFAULT;
    38873898                }
     
    39053916                }
    39063917                break;
    3907         case SNDRV_HDSP_IOCTL_GET_MIXER:
     3918        }
     3919        case SNDRV_HDSP_IOCTL_GET_MIXER: {
     3920                hdsp_mixer_t    *mixer;
     3921
    39083922                mixer = (hdsp_mixer_t *)arg;
    39093923                if (copy_to_user(mixer->matrix, hdsp->mixer_matrix, sizeof(unsigned short)*HDSP_MATRIX_MIXER_SIZE))
    39103924                        return -EFAULT;
    39113925                break;
     3926        }
    39123927        default:
    39133928                return -EINVAL;
     
    41294144        case 0xa:
    41304145        case 0xb:
     4146        case 0x32:
    41314147                hdsp->card_name = "RME Hammerfall DSP";
    41324148                break;
  • GPL/branches/alsa-resync1/alsa-kernel/pci/rme9652/rme9652.c

    r250 r262  
    345345#endif
    346346
    347 
    348 static struct pci_device_id snd_rme9652_ids[] __devinitdata = {
     347static struct pci_device_id snd_rme9652_ids[] = {
    349348        {
    350349                .vendor    = 0x10ee,
  • GPL/branches/alsa-resync1/alsa-kernel/pci/sonicvibes.c

    r250 r262  
    265265};
    266266
    267 static struct pci_device_id snd_sonic_ids[] __devinitdata = {
     267static struct pci_device_id snd_sonic_ids[] = {
    268268        { 0x5333, 0xca00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
    269269        { 0, }
     
    12691269        sonic->sb_port = pci_resource_start(pci, 0);
    12701270        if ((sonic->res_sb_port = request_region(sonic->sb_port, 0x10, "S3 SonicVibes SB")) == NULL) {
     1271                snd_printk("unable to grab SB port at 0x%lx-0x%lx\n", sonic->sb_port, sonic->sb_port + 0x10 - 1);
    12711272                snd_sonicvibes_free(sonic);
    1272                 snd_printk("unable to grab SB port at 0x%lx-0x%lx\n", sonic->sb_port, sonic->sb_port + 0x10 - 1);
    12731273                return -EBUSY;
    12741274        }
    12751275        sonic->enh_port = pci_resource_start(pci, 1);
    12761276        if ((sonic->res_enh_port = request_region(sonic->enh_port, 0x10, "S3 SonicVibes Enhanced")) == NULL) {
     1277                snd_printk("unable to grab PCM port at 0x%lx-0x%lx\n", sonic->enh_port, sonic->enh_port + 0x10 - 1);
    12771278                snd_sonicvibes_free(sonic);
    1278                 snd_printk("unable to grab PCM port at 0x%lx-0x%lx\n", sonic->enh_port, sonic->enh_port + 0x10 - 1);
    12791279                return -EBUSY;
    12801280        }
    12811281        sonic->synth_port = pci_resource_start(pci, 2);
    12821282        if ((sonic->res_synth_port = request_region(sonic->synth_port, 4, "S3 SonicVibes Synth")) == NULL) {
     1283                snd_printk("unable to grab synth port at 0x%lx-0x%lx\n", sonic->synth_port, sonic->synth_port + 4 - 1);
    12831284                snd_sonicvibes_free(sonic);
    1284                 snd_printk("unable to grab synth port at 0x%lx-0x%lx\n", sonic->synth_port, sonic->synth_port + 4 - 1);
    12851285                return -EBUSY;
    12861286        }
    12871287        sonic->midi_port = pci_resource_start(pci, 3);
    12881288        if ((sonic->res_midi_port = request_region(sonic->midi_port, 4, "S3 SonicVibes Midi")) == NULL) {
     1289                snd_printk("unable to grab MIDI port at 0x%lx-0x%lx\n", sonic->midi_port, sonic->midi_port + 4 - 1);
    12891290                snd_sonicvibes_free(sonic);
    1290                 snd_printk("unable to grab MIDI port at 0x%lx-0x%lx\n", sonic->midi_port, sonic->midi_port + 4 - 1);
    12911291                return -EBUSY;
    12921292        }
    12931293        sonic->game_port = pci_resource_start(pci, 4);
    12941294        if (request_irq(pci->irq, snd_sonicvibes_interrupt, SA_INTERRUPT|SA_SHIRQ, "S3 SonicVibes", (void *)sonic)) {
    1295                 snd_magic_kfree(sonic);
    12961295                snd_printk("unable to grab IRQ %d\n", pci->irq);
     1296                snd_sonicvibes_free(sonic);
    12971297                return -EBUSY;
    12981298        }
  • GPL/branches/alsa-resync1/alsa-kernel/pci/trident/trident.c

    r212 r262  
    7070MODULE_PARM_SYNTAX(wavetable_size, SNDRV_ENABLED ",default:8192,skill:advanced");
    7171
    72 
    73 static struct pci_device_id snd_trident_ids[] __devinitdata = {
     72static struct pci_device_id snd_trident_ids[] = {
    7473        { 0x1023, 0x2000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* Trident 4DWave DX PCI Audio */
    7574        { 0x1023, 0x2001, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },   /* Trident 4DWave NX PCI Audio */
Note: See TracChangeset for help on using the changeset viewer.