Changeset 25978

Show
Ignore:
Timestamp:
06/16/08 18:05:53 (5 months ago)
Author:
korli
Message:

added debug output for accessed codec registers in case of timeout

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/io.c

    r25852 r25978  
    105105 
    106106/* codec */ 
     107static uint8 sCodecLastReadRegister = 0; 
     108static uint8 sCodecLastWrittenRegister = 0; 
     109 
    107110static int 
    108111auich_codec_wait(device_config *config) 
     
    120123         * continue the access. We don't really need the semaphore anyway. */  
    121124        PRINT(("codec semaphore timed out!\n")); 
     125        PRINT(("last read/write registers: %x/%x\n", sCodecLastReadRegister, sCodecLastWrittenRegister)); 
    122126 
    123127        return B_OK; 
     
    127131auich_codec_read(device_config *config, uint8 regno) 
    128132{ 
     133        sCodecLastReadRegister = regno; 
    129134        ASSERT(regno >= 0); 
    130135        ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 511) || regno <= 255); 
     
    143148auich_codec_write(device_config *config, uint8 regno, uint16 value) 
    144149{ 
     150        sCodecLastWrittenRegister = regno; 
    145151        ASSERT(regno >= 0); 
    146152        ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 511) || regno <= 255);