added debug output for accessed codec registers in case of timeout
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25978 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -104,6 +104,9 @@ auich_reg_write_32(device_config *config, uint8 regno, uint32 value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* codec */
|
/* codec */
|
||||||
|
static uint8 sCodecLastReadRegister = 0;
|
||||||
|
static uint8 sCodecLastWrittenRegister = 0;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
auich_codec_wait(device_config *config)
|
auich_codec_wait(device_config *config)
|
||||||
{
|
{
|
||||||
@@ -119,6 +122,7 @@ auich_codec_wait(device_config *config)
|
|||||||
* reset the semaphore. So even if you don't get the semaphore, still
|
* reset the semaphore. So even if you don't get the semaphore, still
|
||||||
* continue the access. We don't really need the semaphore anyway. */
|
* continue the access. We don't really need the semaphore anyway. */
|
||||||
PRINT(("codec semaphore timed out!\n"));
|
PRINT(("codec semaphore timed out!\n"));
|
||||||
|
PRINT(("last read/write registers: %x/%x\n", sCodecLastReadRegister, sCodecLastWrittenRegister));
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
@@ -126,6 +130,7 @@ auich_codec_wait(device_config *config)
|
|||||||
uint16
|
uint16
|
||||||
auich_codec_read(device_config *config, uint8 regno)
|
auich_codec_read(device_config *config, uint8 regno)
|
||||||
{
|
{
|
||||||
|
sCodecLastReadRegister = regno;
|
||||||
ASSERT(regno >= 0);
|
ASSERT(regno >= 0);
|
||||||
ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 511) || regno <= 255);
|
ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 511) || regno <= 255);
|
||||||
if (auich_codec_wait(config)!=B_OK) {
|
if (auich_codec_wait(config)!=B_OK) {
|
||||||
@@ -142,6 +147,7 @@ auich_codec_read(device_config *config, uint8 regno)
|
|||||||
void
|
void
|
||||||
auich_codec_write(device_config *config, uint8 regno, uint16 value)
|
auich_codec_write(device_config *config, uint8 regno, uint16 value)
|
||||||
{
|
{
|
||||||
|
sCodecLastWrittenRegister = regno;
|
||||||
ASSERT(regno >= 0);
|
ASSERT(regno >= 0);
|
||||||
ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 511) || regno <= 255);
|
ASSERT(((config->type & TYPE_ICH4) != 0 && regno <= 511) || regno <= 255);
|
||||||
if (auich_codec_wait(config)!=B_OK) {
|
if (auich_codec_wait(config)!=B_OK) {
|
||||||
|
|||||||
Reference in New Issue
Block a user