Changeset 485


Ignore:
Timestamp:
May 23, 2010, 10:17:06 PM (15 years ago)
Author:
David Azarewicz
Message:

Added quirk for Gateway 2000 ICH2/AD1885

Location:
GPL/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/pci/ac97/ac97_codec.c

    r426 r485  
    153153{ 0x49434511, 0xffffffff, "ICE1232",            NULL,           NULL }, // alias VIA VT1611A?
    154154{ 0x49434514, 0xffffffff, "ICE1232A",           NULL,           NULL },
    155 { 0x49434551, 0xffffffff, "VT1616",             patch_vt1616,   NULL }, 
     155{ 0x49434551, 0xffffffff, "VT1616",             patch_vt1616,   NULL },
    156156{ 0x49434552, 0xffffffff, "VT1616i",            patch_vt1616,   NULL }, // VT1616 compatible (chipset integrated)
    157157{ 0x49544520, 0xffffffff, "IT2226E",            NULL,           NULL },
     
    159159{ 0x4e534300, 0xffffffff, "LM4540,43,45,46,48", NULL,           NULL }, // only guess --jk
    160160{ 0x4e534331, 0xffffffff, "LM4549",             NULL,           NULL },
    161 { 0x4e534350, 0xffffffff, "LM4550",             patch_lm4550,   NULL }, // volume wrap fix 
     161{ 0x4e534350, 0xffffffff, "LM4550",             patch_lm4550,   NULL }, // volume wrap fix
    162162{ 0x50534304, 0xffffffff, "UCB1400",            patch_ucb1400,  NULL },
    163163{ 0x53494c20, 0xffffffe0, "Si3036,8",           mpatch_si3036,  mpatch_si3036, AC97_MODEM_PATCH },
     
    276276/**
    277277 * snd_ac97_read - read a value from the given register
    278  * 
     278 *
    279279 * @ac97: the ac97 instance
    280280 * @reg: the register to read
     
    624624};
    625625
    626 static const struct snd_kcontrol_new snd_ac97_control_capture_src = 
    627 AC97_ENUM("Capture Source", std_enum[0]); 
     626static const struct snd_kcontrol_new snd_ac97_control_capture_src =
     627AC97_ENUM("Capture Source", std_enum[0]);
    628628
    629629static const struct snd_kcontrol_new snd_ac97_control_capture_vol =
     
    692692        return 0;
    693693}
    694                        
     694
    695695static int snd_ac97_spdif_cmask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
    696696{
     
    704704        return 0;
    705705}
    706                        
     706
    707707static int snd_ac97_spdif_pmask_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
    708708{
     
    727727        return 0;
    728728}
    729                        
     729
    730730static int snd_ac97_spdif_default_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
    731731{
     
    779779                v = new & (IEC958_AES0_CON_EMPHASIS_5015|IEC958_AES0_CON_NOT_COPYRIGHT) ? 0 : AC97_CXR_COPYRGT;
    780780                v |= new & IEC958_AES0_NONAUDIO ? AC97_CXR_SPDIF_AC3 : AC97_CXR_SPDIF_PCM;
    781                 change |= snd_ac97_update_bits_nolock(ac97, AC97_CXR_AUDIO_MISC, 
     781                change |= snd_ac97_update_bits_nolock(ac97, AC97_CXR_AUDIO_MISC,
    782782                                                      AC97_CXR_SPDIF_MASK | AC97_CXR_COPYRGT,
    783783                                                      v);
     
    13651365
    13661366        /* build center controls */
    1367         if ((snd_ac97_try_volume_mix(ac97, AC97_CENTER_LFE_MASTER)) 
     1367        if ((snd_ac97_try_volume_mix(ac97, AC97_CENTER_LFE_MASTER))
    13681368                && !(ac97->flags & AC97_AD_MULTI)) {
    13691369                if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_center[0], ac97))) < 0)
     
    13931393
    13941394        /* build surround controls */
    1395         if ((snd_ac97_try_volume_mix(ac97, AC97_SURROUND_MASTER)) 
     1395        if ((snd_ac97_try_volume_mix(ac97, AC97_SURROUND_MASTER))
    13961396                && !(ac97->flags & AC97_AD_MULTI)) {
    13971397                /* Surround Master (0x38) is with stereo mutes */
     
    14331433       
    14341434        /* build PC Speaker controls */
    1435         if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) && 
     1435        if (!(ac97->flags & AC97_HAS_NO_PC_BEEP) &&
    14361436                ((ac97->flags & AC97_HAS_PC_BEEP) ||
    14371437            snd_ac97_try_volume_mix(ac97, AC97_PC_BEEP))) {
     
    18271827                    (! modem && ! (pid->flags & AC97_MODEM_PATCH)))
    18281828                        pid->patch(ac97);
    1829         } 
     1829        }
    18301830
    18311831        pid = look_for_codec_id(snd_ac97_codec_ids, id);
     
    19151915 * The ops table must include valid callbacks (at least read and
    19161916 * write).  The other callbacks, wait and reset, are not mandatory.
    1917  * 
     1917 *
    19181918 * The clock is set to 48000.  If another clock is needed, set
    19191919 * (*rbus)->clock manually.
     
    20192019 * The template must include the codec number (num) and address (addr),
    20202020 * and the private data (private_data).
    2021  * 
     2021 *
    20222022 * The ac97 instance is registered as a low-level device, so you don't
    20232023 * have to release it manually.
     
    27472747}
    27482748
    2749 static const struct snd_kcontrol_new snd_ac97_alc_jack_detect = 
     2749static const struct snd_kcontrol_new snd_ac97_alc_jack_detect =
    27502750AC97_SINGLE("Jack Detect", AC97_ALC650_CLOCK, 5, 1, 0);
    27512751
     
    29042904        int result;
    29052905
     2906        snd_printdd("ac97_tune_hardware quirk=%lx override=%s pci=(%04x:%04x %04x:%04x) ac97=(%04x:%04x)\n",
     2907                quirk, override,
     2908                ac97->pci->vendor, ac97->pci->device, ac97->pci->subsystem_vendor, ac97->pci->subsystem_device,         
     2909                ac97->subsystem_vendor, ac97->subsystem_device);
    29062910        /* quirk overriden? */
    29072911        if (override && strcmp(override, "-1") && strcmp(override, "default")) {
     2912                snd_printdd("ac97 quirk for %s (%04x:%04x)\n", override, ac97->subsystem_vendor, ac97->subsystem_device);
    29082913                result = apply_quirk_str(ac97, override);
    29092914                if (result < 0)
     
    29162921
    29172922        for (; quirk->subvendor; quirk++) {
    2918                 if (quirk->subvendor != ac97->subsystem_vendor)
    2919                         continue;
    2920                 if ((! quirk->mask && quirk->subdevice == ac97->subsystem_device) ||
    2921                     quirk->subdevice == (quirk->mask & ac97->subsystem_device)) {
    2922                         if (quirk->codec_id && quirk->codec_id != ac97->id)
    2923                                 continue;
    2924                         snd_printdd("ac97 quirk for %s (%04x:%04x)\n", quirk->name, ac97->subsystem_vendor, ac97->subsystem_device);
    2925                         result = apply_quirk(ac97, quirk->type);
    2926                         if (result < 0)
    2927                                 snd_printk(KERN_ERR "applying quirk type %d for %s failed (%d)\n", quirk->type, quirk->name, result);
    2928                         return result;
    2929                 }
     2923                if (quirk->subvendor != ac97->subsystem_vendor) continue;
     2924                /* DAZ - the comments in ac97_codec.h say that if mask=0 then 'accept all' but it appears not to be the way the code works.
     2925                 * it really is: if mask=0 then 'accept exact match only'
     2926                 * functionality not changed, I just made the code easier to read
     2927                 * if ((! quirk->mask && quirk->subdevice == ac97->subsystem_device) || quirk->subdevice == (quirk->mask & ac97->subsystem_device)) {
     2928                 */
     2929                if (quirk->mask) {
     2930                        if ( quirk->subdevice != (quirk->mask & ac97->subsystem_device) ) continue;
     2931                } else {
     2932                        if (quirk->subdevice != ac97->subsystem_device) continue;
     2933                }
     2934                if ( quirk->codec_id && (quirk->codec_id != ac97->id) ) continue;
     2935                snd_printdd("ac97 quirk for %s (%04x:%04x)\n", quirk->name, ac97->subsystem_vendor, ac97->subsystem_device);
     2936                result = apply_quirk(ac97, quirk->type);
     2937                if (result < 0) snd_printk(KERN_ERR "applying quirk type %d for %s failed (%d)\n", quirk->type, quirk->name, result);
     2938                return result;
    29302939        }
    29312940        return 0;
  • GPL/trunk/alsa-kernel/pci/intel8x0.c

    r464 r485  
    2525
    2626 *
    27  */     
     27 */
    2828
    2929#include <asm/io.h>
     
    269269
    270270/* interrupts for the whole chip by interrupt status register finish */
    271  
     271
    272272#define ALI_INT_MICIN2          (1<<26)
    273273#define ALI_INT_PCMIN2          (1<<25)
     
    313313
    314314/*
    315  * 
     315 *
    316316 */
    317317
     
    544544        return -EBUSY;
    545545}
    546  
     546
    547547static void snd_intel8x0_codec_write(struct snd_ac97 *ac97,
    548548                                     unsigned short reg,
     
    662662 * DMA I/O
    663663 */
    664 static void snd_intel8x0_setup_periods(struct intel8x0 *chip, struct ichdev *ichdev) 
     664static void snd_intel8x0_setup_periods(struct intel8x0 *chip, struct ichdev *ichdev)
    665665{
    666666        int idx;
     
    886886                        /* clear FIFO for synchronization of channels */
    887887                        fifo = igetdword(chip, fiforeg[ichdev->ali_slot / 4]);
    888                         fifo &= ~(0xff << (ichdev->ali_slot % 4)); 
    889                         fifo |= 0x83 << (ichdev->ali_slot % 4); 
     888                        fifo &= ~(0xff << (ichdev->ali_slot % 4));
     889                        fifo |= 0x83 << (ichdev->ali_slot % 4);
    890890                        iputdword(chip, fiforeg[ichdev->ali_slot / 4], fifo);
    891891                }
     
    17531753
    17541754static struct ac97_quirk ac97_quirks[] __devinitdata = {
    1755         {
     1755    {
    17561756                .subvendor = 0x0e11,
    17571757                .subdevice = 0x000e,
    17581758                .name = "Compaq Deskpro EN",    /* AD1885 */
    17591759                .type = AC97_TUNE_HP_ONLY
    1760         },
     1760    },
    17611761        {
    17621762                .subvendor = 0x0e11,
     
    17711771                .type = AC97_TUNE_HP_ONLY
    17721772        },
    1773         {
     1773    {
    17741774                .subvendor = 0x0e11,
    17751775                .subdevice = 0x0860,
    17761776                .name = "HP/Compaq nx7010",
    17771777                .type = AC97_TUNE_MUTE_LED
    1778         },
     1778    },
    17791779        {
    17801780                .subvendor = 0x1014,
     
    20512051                .subdevice = 0x0088,
    20522052                .name = "Fujitsu-Siemens D1522",        /* AD1981 */
     2053                .type = AC97_TUNE_HP_ONLY
     2054        },
     2055        {
     2056                .subvendor = 0x107B,
     2057                .subdevice = 0x0111,
     2058                .name = "Gateway 2000 ICH2/AD1885",
    20532059                .type = AC97_TUNE_HP_ONLY
    20542060        },
  • GPL/trunk/drv32/dispatch.c

    r484 r485  
    103103
    104104#ifdef DEBUG
    105     printk("StratIOCtl 0x%x\n", rp->Function);
     105    //printk("StratIOCtl 0x%x\n", rp->Function);
    106106#endif
    107107//    printk("cmd: %x, len: %i, pack: %x\n",rp->Function, rp->ParmLength, rp->ParmPacket);
  • GPL/trunk/include/ossidc.h

    r456 r485  
    245245#define OSS32_MIX_VOLUME_CAPTURE        13      //Recording volume
    246246#define OSS32_MIX_VOLUME_SPEAKER        14      //Speaker volume
    247 #define OSS32_MIX_VOLUME_MAX            OSS32_MIX_VOLUME_CAPTURE
     247//DAZ not used #define OSS32_MIX_VOLUME_MAX            OSS32_MIX_VOLUME_SPEAKER
    248248
    249249#define OSS32_MIX_FIRST_PROPERTY        20
  • GPL/trunk/lib32/memory.cpp

    r445 r485  
    106106    pCur = pBaseAddrHead;
    107107
    108     if(pCur->retaddr == addr) 
     108    if(pCur->retaddr == addr)
    109109    {
    110110        addr = pCur->base;
     
    160160    APIRET rc = 0;
    161161    ULONG addr = 0;
    162    
     162
    163163#ifdef KEE
    164164    SHORT sel;
     
    176176extern "C" int fStrategyInit;
    177177//******************************************************************************
    178 APIRET VMAlloc(ULONG size, ULONG flags, LINEAR *pAddr) 
     178APIRET VMAlloc(ULONG size, ULONG flags, LINEAR *pAddr)
    179179{
    180180    APIRET rc;
     
    211211//******************************************************************************
    212212//******************************************************************************
    213 APIRET VMFree(LINEAR addr) 
     213APIRET VMFree(LINEAR addr)
    214214{
    215215    APIRET rc;
     
    302302    size = order * PAGE_SIZE;
    303303
    304     if(gfp_mask & (GFP_DMA|GFP_DMAHIGHMEM)) 
     304    if(gfp_mask & (GFP_DMA|GFP_DMAHIGHMEM))
    305305    {//below 16 mb for legacy DMA?
    306306        if(gfp_mask & GFP_DMA)
     
    326326    }
    327327    else allocsize = size;
    328    
     328
    329329    if(VMAlloc(allocsize, flags, (LINEAR *)&addr)) {
    330330                DebugInt3();
    331331                return 0;
    332332        }
    333 ////    dprintf(("__get_free_pages %d returned %x", order*PAGE_SIZE, addr));   
    334     if(gfp_mask & (GFP_DMA|GFP_DMAHIGHMEM)) 
     333////    dprintf(("__get_free_pages %d returned %x", order*PAGE_SIZE, addr));
     334    if(gfp_mask & (GFP_DMA|GFP_DMAHIGHMEM))
    335335    {//must be aligned at 64kb boundary
    336336        ULONG physaddr = virt_to_phys((void *)addr);
     
    377377    //check if it really is the base of the allocation (see above)
    378378    addr = GetBaseAddress(addr, (ULONG NEAR *)__Stack32ToFlat(&size));
    379    
     379
    380380    if(VMFree((LINEAR)addr)) {
    381381        DebugInt3();
     
    410410    if(addr) {
    411411#ifdef DEBUG
    412         dprintf(("vmalloc %d -> %x (phys %x)", size, addr, virt_to_phys((void *)addr)));
     412        //dprintf(("vmalloc %d -> %x (phys %x)", size, addr, virt_to_phys((void *)addr)));
    413413#endif
    414414        //only done to save size of memory block
     
    416416        ulget_free_pagesMemUsed += size;
    417417#ifdef DEBUG
    418         dprintf(("vmalloc: total alloc size %d", ulget_free_pagesMemUsed));
     418        //dprintf(("vmalloc: total alloc size %d", ulget_free_pagesMemUsed));
    419419#endif
    420420    }
     
    429429
    430430    GetBaseAddress((ULONG)ptr, (ULONG NEAR *)__Stack32ToFlat(&size));
    431    
     431
    432432    if(VMFree((LINEAR)ptr)) {
    433433        DebugInt3();
     
    435435    else {
    436436#ifdef DEBUG
    437         dprintf(("vfree %x size %d", (ULONG)ptr, size));
     437        //dprintf(("vfree %x size %d", (ULONG)ptr, size));
    438438#endif
    439439        ulget_free_pagesMemUsed -= size;
    440440#ifdef DEBUG
    441         dprintf(("vfree: total alloc size %d", ulget_free_pagesMemUsed));
     441        //dprintf(("vfree: total alloc size %d", ulget_free_pagesMemUsed));
    442442#endif
    443443    }
     
    635635    }
    636636////  dprintf(("kfree %x", addr));
    637     if(IsHeapAddr(addr)) { 
     637    if(IsHeapAddr(addr)) {
    638638#ifdef DEBUGHEAP
    639         free((void *)addr, filename, lineno); 
    640 #else
    641             free((void *)addr); 
     639        free((void *)addr, filename, lineno);
     640#else
     641            free((void *)addr);
    642642#endif
    643643    }
  • GPL/trunk/lib32/soundmixer.c

    r484 r485  
    7171        /* OSS_MIXER_MONITOR  */ { "Monitor", 0 , -1},
    7272        /* OSS_MIXER_3DDEPTH  */ { "3D Control - Depth", 0 , -1},
    73         /* OSS_MIXER_3DCENTER */ { "3D Control - Center", 0 , -1},
    74         /* OSS_MIXER_FRONT    */ { "Front", 0 , -1},
    75         /* OSS_MIXER_SPEAKER  */ { "Speaker", 0 , -1},
    76         /* OSS_MIXER_HEADPHONE */ { "Headphone", 0 , -1},
     73    /* OSS_MIXER_3DCENTER */ { "3D Control - Center", 0 , -1},
     74        /* OSS_MIXER_FRONT    */ { "Front", 0 , -1},
     75        /* OSS_MIXER_SPEAKER  */ { "Speaker", 0 , -1},
     76        /* OSS_MIXER_HEADPHONE */ { "Headphone", 0 , -1},
    7777};
    7878char *szRecSources[OSS32_MIX_RECSRC_MAX] = {
  • GPL/trunk/uniaud.inc

    r484 r485  
    1313# ex RC3  GA  FIXPACK2 beta_47
    1414# Comment out to avoid a fixpack line in bldlevel
    15 FIXPACK = SVN r484
     15FIXPACK = SVN r485
    1616
    1717# ALSA BUILD VERSION
Note: See TracChangeset for help on using the changeset viewer.