Ignore:
Timestamp:
Apr 9, 2006, 12:09:39 PM (19 years ago)
Author:
vladest
Message:

Latest ALSA patches
HDA patches
Patch for Intel from Rudy's
Fixes locks on NM256 chipsets
Fixes PM on Maestro3 chipsets

File:
1 edited

Legend:

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

    r34 r76  
    10921092        change = 1;
    10931093    }
    1094     if (ucontrol->value.integer.value[0] != volL) {
     1094    if (ucontrol->value.integer.value[0] != volR) {
    10951095        volR = CS_VOL_MASK - (ucontrol->value.integer.value[1] & CS_VOL_MASK);
    10961096        snd_cs4281_pokeBA0(chip, regR, volR);
     
    14621462{
    14631463    unsigned int tmp;
    1464     int timeout;
     1464    unsigned long end_time;
    14651465    int retry_count = 2;
    14661466
     
    15411541     * Wait for the DLL ready signal from the clock logic.
    15421542     */
    1543 #ifdef TARGET_OS2
    1544     //  end_time = (jiffies + 1000) + 1;
    1545 #else
    1546     //  end_time = (jiffies + HZ / 4) + 1;
    1547 #endif
    1548     timeout = HZ;
     1543    end_time = jiffies + HZ;
    15491544    do {
    15501545        /*
     
    15541549        if (snd_cs4281_peekBA0(chip, BA0_CLKCR1) & BA0_CLKCR1_DLLRDY)
    15551550            goto __ok0;
    1556         snd_cs4281_delay_long();
    1557     } while (timeout-- > 0);
     1551        schedule_timeout_uninterruptible(1);
     1552    } while (time_after_eq(end_time, jiffies));
    15581553
    15591554    snd_printk(KERN_ERR "DLLRDY not seen\n");
     
    15721567     * Wait for the codec ready signal from the AC97 codec.
    15731568     */
    1574 #ifdef TARGET_OS2
    1575     //  end_time = (jiffies + 1000) + 1;
    1576 #else
    1577     //  end_time = (jiffies + (3 * HZ) / 4) + 1;
    1578 #endif
    1579     timeout = HZ;
     1569    end_time = jiffies + HZ;
    15801570    do {
    15811571        /*
     
    15851575        if (snd_cs4281_peekBA0(chip, BA0_ACSTS) & BA0_ACSTS_CRDY)
    15861576            goto __ok1;
    1587         snd_cs4281_delay_long();
    1588     } while (timeout-- > 0);
     1577        schedule_timeout_uninterruptible(1);
     1578    } while (time_after_eq(end_time, jiffies));
    15891579
    15901580    snd_printk(KERN_ERR "never read codec ready from AC'97 (0x%x)\n", snd_cs4281_peekBA0(chip, BA0_ACSTS));
     
    15931583__ok1:
    15941584    if (chip->dual_codec) {
    1595         timeout = HZ;
     1585        end_time = jiffies + HZ;
    15961586        do {
    15971587            if (snd_cs4281_peekBA0(chip, BA0_ACSTS2) & BA0_ACSTS_CRDY)
    15981588                goto __codec2_ok;
    1599             snd_cs4281_delay_long();
    1600         } while (timeout-- > 0);
     1589            schedule_timeout_uninterruptible(1);
     1590        } while (time_after_eq(end_time, jiffies));
    16011591        snd_printk(KERN_INFO "secondary codec doesn't respond. disable it...\n");
    16021592        chip->dual_codec = 0;
     
    16151605     *  the codec is pumping ADC data across the AC-link.
    16161606     */
    1617 
    1618 #ifdef TARGET_OS2
    1619     //  end_time = (jiffies + 5000);
    1620 #else
    1621     //  end_time = (jiffies + (5 * HZ) / 4) + 1;
    1622 #endif
    1623     timeout = HZ;
     1607    end_time = jiffies + HZ;
    16241608    do {
    16251609        /*
     
    16291613        if ((snd_cs4281_peekBA0(chip, BA0_ACISV) & (BA0_ACISV_SLV(3) | BA0_ACISV_SLV(4))) == (BA0_ACISV_SLV(3) | BA0_ACISV_SLV(4)))
    16301614            goto __ok2;
    1631         snd_cs4281_delay_long();
    1632     } while (timeout-- > 0);
     1615        schedule_timeout_uninterruptible(1);
     1616    } while (time_after_eq(end_time, jiffies));
    16331617
    16341618    if (--retry_count > 0)
Note: See TracChangeset for help on using the changeset viewer.