Changeset 485 for GPL/trunk/alsa-kernel


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/alsa-kernel/pci
Files:
2 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        },
Note: See TracChangeset for help on using the changeset viewer.