Changeset 85


Ignore:
Timestamp:
Oct 24, 2006, 8:25:27 PM (19 years ago)
Author:
vladest
Message:

Added VIA 8251 support

Location:
GPL/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/include/sound/driver.h

    r76 r85  
    186186#define PCI_D3hot  3
    187187#define PCI_D3cold 4
     188#define pci_choose_state(pci,state)     ((state) ? PCI_D3hot : PCI_D0)
    188189#endif
    189190
  • GPL/trunk/alsa-kernel/pci/via82xx.c

    r77 r85  
    6060#include <sound/pcm_params.h>
    6161#include <sound/info.h>
     62#include <sound/tlv.h>
    6263#include <sound/ac97_codec.h>
    6364#include <sound/mpu401.h>
     
    128129#define VIA_REV_8235            0x50    /* 2 rec, 4 pb, 1 multi-pb, spdif */
    129130#define VIA_REV_8237            0x60
     131#define VIA_REV_8251            0x70
    130132
    131133/*
     
    616618 *  Used for 686 and 8233A
    617619 */
    618 static irqreturn_t snd_via686_interrupt(int irq, void *dev_id, struct pt_regs *regs)
     620static irqreturn_t snd_via686_interrupt(int irq, void *dev_id)
    619621{
    620622        struct via82xx *chip = dev_id;
     
    625627        if (! (status & chip->intr_mask)) {
    626628                if (chip->rmidi)
    627                         /* check mpu401 interrupt */
    628                         return snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data, regs);
     629                    /* check mpu401 interrupt */
     630                    //return snd_mpu401_uart_interrupt(irq, chip->rmidi->private_data);
    629631                return IRQ_NONE;
    630632        }
     
    662664 *  Interrupt handler
    663665 */
    664 static irqreturn_t snd_via8233_interrupt(int irq, void *dev_id, struct pt_regs *regs)
     666static irqreturn_t snd_via8233_interrupt(int irq, void *dev_id)
    665667{
    666668        struct via82xx *chip = dev_id;
     
    867869                status = inb(VIADEV_REG(viadev, OFFSET_STATUS));
    868870
     871        /* An apparent bug in the 8251 is worked around by sending a
     872         * REG_CTRL_START. */
     873        if (chip->revision == VIA_REV_8251 && (status & VIA_REG_STAT_EOL))
     874                snd_via82xx_pcm_trigger(substream, SNDRV_PCM_TRIGGER_START);
     875
    869876        if (!(status & VIA_REG_STAT_ACTIVE)) {
    870877                res = 0;
     
    16971704        return change;
    16981705}
     1706static DECLARE_TLV_DB_SCALE(db_scale_dxs, -9450, 150, 1);
    16991707
    17001708static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata = {
    17011709        .name = "PCM Playback Volume",
    17021710        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
     1711        .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
     1712                   SNDRV_CTL_ELEM_ACCESS_TLV_READ),
    17031713        .info = snd_via8233_dxs_volume_info,
    17041714        .get = snd_via8233_pcmdxs_volume_get,
    1705         .put = snd_via8233_pcmdxs_volume_put,
     1715        .put = snd_via8233_pcmdxs_volume_put,
     1716        .tlv = { .p = db_scale_dxs }
    17061717};
    17071718
     
    17091720        .name = "VIA DXS Playback Volume",
    17101721        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
     1722        .access = (SNDRV_CTL_ELEM_ACCESS_READWRITE |
     1723                   SNDRV_CTL_ELEM_ACCESS_TLV_READ),
    17111724        .count = 4,
    17121725        .info = snd_via8233_dxs_volume_info,
    17131726        .get = snd_via8233_dxs_volume_get,
    1714         .put = snd_via8233_dxs_volume_put,
     1727        .put = snd_via8233_dxs_volume_put,
     1728        .tlv = { .p = db_scale_dxs }
    17151729};
    17161730
     
    21762190        }
    21772191
    2178         pci_set_power_state(pci, PCI_D3hot);
    21792192        pci_disable_device(pci);
    2180         pci_save_state(pci);
     2193        pci_save_state(pci);
     2194        pci_set_power_state(pci, pci_choose_state(pci, state));
    21812195        return 0;
    21822196}
     
    21882202        int i;
    21892203
     2204        pci_set_power_state(pci, PCI_D0);
    21902205        pci_restore_state(pci);
    2191         pci_enable_device(pci);
    2192         pci_set_power_state(pci, PCI_D0);
     2206        if (pci_enable_device(pci) < 0) {
     2207                printk(KERN_ERR "via82xx: pci_enable_device failed, "
     2208                       "disabling device\n");
     2209                snd_card_disconnect(card);
     2210                return -EIO;
     2211        }
     2212        pci_set_master(pci);
    21932213
    21942214        snd_via82xx_chip_init(chip);
     
    23352355        { VIA_REV_8233A, "VIA 8233A", TYPE_VIA8233A },
    23362356        { VIA_REV_8235, "VIA 8235", TYPE_VIA8233 },
    2337         { VIA_REV_8237, "VIA 8237", TYPE_VIA8233 },
     2357        { VIA_REV_8237, "VIA 8237", TYPE_VIA8233 },
     2358        { VIA_REV_8251, "VIA 8251", TYPE_VIA8233 },
    23382359};
    23392360
     
    23552376                { .subvendor = 0x1019, .subdevice = 0x0a81, .action = VIA_DXS_NO_VRA }, /* ECS K7VTA3 v8.0 */
    23562377                { .subvendor = 0x1019, .subdevice = 0x0a85, .action = VIA_DXS_NO_VRA }, /* ECS L7VMM2 */
    2357                 { .subvendor = 0x1019, .subdevice = 0xa101, .action = VIA_DXS_SRC },
     2378                { .subvendor = 0x1019, .subdevice = 0xa101, .action = VIA_DXS_SRC },
     2379                { .subvendor = 0x1019, .subdevice = 0xaa01, .action = VIA_DXS_SRC }, /* ECS K8T890-A */
    23582380                { .subvendor = 0x1025, .subdevice = 0x0033, .action = VIA_DXS_NO_VRA }, /* Acer Inspire 1353LM */
    23592381                { .subvendor = 0x1025, .subdevice = 0x0046, .action = VIA_DXS_SRC }, /* Acer Aspire 1524 WLMi */
     
    23642386                { .subvendor = 0x1043, .subdevice = 0x812a, .action = VIA_DXS_SRC    }, /* ASUS A8V Deluxe */
    23652387                { .subvendor = 0x1043, .subdevice = 0x8174, .action = VIA_DXS_SRC    }, /* ASUS */
     2388                { .subvendor = 0x1043, .subdevice = 0x81b9, .action = VIA_DXS_SRC    }, /* ASUS A8V-MX */
    23662389                { .subvendor = 0x1071, .subdevice = 0x8375, .action = VIA_DXS_NO_VRA }, /* Vobis/Yakumo/Mitac notebook */
    23672390                { .subvendor = 0x1071, .subdevice = 0x8399, .action = VIA_DXS_NO_VRA }, /* Umax AB 595T (VIA K8N800A - VT8237) */
     
    24012424                { .subvendor = 0x1734, .subdevice = 0x1078, .action = VIA_DXS_SRC }, /* FSC Amilo L7300 */
    24022425                { .subvendor = 0x1734, .subdevice = 0x1093, .action = VIA_DXS_SRC }, /* FSC */
    2403                 { .subvendor = 0x1849, .subdevice = 0x3059, .action = VIA_DXS_NO_VRA }, /* ASRock K7VM2 */                { .subvendor = 0x1849, .subdevice = 0x9739, .action = VIA_DXS_SRC }, /* ASRock mobo(?) */
     2426                { .subvendor = 0x1734, .subdevice = 0x10ab, .action = VIA_DXS_SRC }, /* FSC */
     2427                { .subvendor = 0x1849, .subdevice = 0x3059, .action = VIA_DXS_NO_VRA }, /* ASRock K7VM2 */
     2428                { .subvendor = 0x1849, .subdevice = 0x9739, .action = VIA_DXS_SRC }, /* ASRock mobo(?) */
    24042429                { .subvendor = 0x1849, .subdevice = 0x9761, .action = VIA_DXS_SRC }, /* ASRock mobo(?) */
    24052430                { .subvendor = 0x1919, .subdevice = 0x200a, .action = VIA_DXS_NO_VRA }, /* Soltek SL-K8Tpro-939 */
    24062431                { .subvendor = 0x4005, .subdevice = 0x4710, .action = VIA_DXS_SRC },    /* MSI K7T266 Pro2 (MS-6380 V2.0) BIOS 3.7 */
    24072432                {0} /* terminator */
    2408         };
    2409         struct dxs_whitelist *w;
     2433        };
     2434        const struct dxs_whitelist *w;
    24102435        unsigned short subsystem_vendor;
    24112436        unsigned short subsystem_device;
  • GPL/trunk/include/version.mak

    r84 r85  
    1111BLDLVL_REVISION = 1.1
    1212BLDLVL_FILEVER = 4
    13 BLDLVL_DATETIME = 23.10.2006 23:58:13
     13BLDLVL_DATETIME = 24.10.2006 21:24:02
    1414BLDLVL_MACHINE = VLAD
  • GPL/trunk/lib32/sound.c

    r84 r85  
    532532    }
    533533
    534     printk("OSS32_WaveOpen: cp1\n");
    535534    ret = alsa_fops->open(&pHandle->inode, &pHandle->file);
    536     printk("OSS32_WaveOpen. ret: %i\n", ret);
     535    //printk("OSS32_WaveOpen. ret: %i\n", ret);
    537536    /* check if PCM already opened (stupid uniaud16.sys doesnt closes it) */
    538537    if (ret == -16)
     
    556555        }
    557556    }
    558     printk("OSS32_WaveOpen: cp3\n");
    559557
    560558    if(ret) {
     
    565563    }
    566564    pHandle->magic = MAGIC_WAVE_ALSA32;
    567     printk("OSS32_WaveOpen: cp4\n");
    568 
    569565    if (pStreamId)
    570566        *pStreamId = (ULONG)pHandle;
Note: See TracChangeset for help on using the changeset viewer.