Changeset 25420
- Timestamp:
- 05/10/08 08:44:38 (6 days ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/ac97.c
r22285 r25420 33 33 #include <MediaDefs.h> 34 34 #include "ac97.h" 35 36 #define REVERSE_EAMP_POLARITY 037 35 38 36 #include "debug.h" … … 278 276 void default_amp_enable(device_config *config, bool yesno) 279 277 { 278 uint32 id; 280 279 LOG(("default_amp_enable\n")); 281 280 LOG(("powerdown register was = %#04x\n",auich_codec_read(config, AC97_POWERDOWN))); 282 #if REVERSE_EAMP_POLARITY 281 id = (config->subvendor_id << 16) | config->subsystem_id; 282 if (id == 0x161f202f 283 || id == 0x161f203a 284 || id == 0x161f204c 285 || id == 0x104d8144 286 || id == 0x104d8197 287 || id == 0x104d81c0 288 || id == 0x104d81c5) { 283 289 yesno = !yesno; 284 290 LOG(("using reverse eamp polarity\n")); 285 #endif291 } 286 292 if (yesno) 287 293 auich_codec_write(config, AC97_POWERDOWN, auich_codec_read(config, AC97_POWERDOWN) & ~0x8000); /* switch on (low active) */ haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/auich.c
r25418 r25420 12 12 * notice, this list of conditions and the following disclaimer in the 13 13 * documentation and/or other materials provided with the distribution. 14 * 3. All advertising materials mentioning features or use of this software15 * must display the following acknowledgement:16 * This product includes software developed by the NetBSD17 * Foundation, Inc. and its contributors.18 * 4. Neither the name of The NetBSD Foundation nor the names of its19 * contributors may be used to endorse or promote products derived20 * from this software without specific prior written permission.21 14 * 22 15 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS … … 412 405 413 406 sta = auich_reg_read_16(&card->config, AUICH_REG_GLOB_STA); 414 if (sta & card->interrupt_mask) {407 if (sta & card->interrupt_mask) { 415 408 416 409 if (sta & (STA_S0RI | STA_S1RI | STA_S2RI)) { … … 423 416 //TRACE(("interrupt !! %x\n", sta)); 424 417 425 LIST_FOREACH(stream, &card->streams, next) 418 LIST_FOREACH(stream, &card->streams, next) 426 419 if (sta & stream->sta) { 427 sr = auich_reg_read_16(&card->config, 420 sr = auich_reg_read_16(&card->config, 428 421 stream->base + GET_REG_SR(&stream->card->config)); 429 422 sr &= SR_MASK; … … 437 430 curblk = auich_stream_curaddr(stream); 438 431 439 auich_reg_write_8(&card->config, stream->base + AUICH_REG_X_LVI, 432 auich_reg_write_8(&card->config, stream->base + AUICH_REG_X_LVI, 440 433 (curblk + 2) % AUICH_DMALIST_MAX); 441 434 … … 449 442 450 443 auich_reg_write_16(&card->config, 451 stream->base + GET_REG_SR(&stream->card->config), sr); 444 stream->base + GET_REG_SR(&stream->card->config), sr); 452 445 } 453 446 } else { … … 456 449 } 457 450 458 if (gotone)451 if (gotone) 459 452 return B_INVOKE_SCHEDULER; 460 453 haiku/trunk/src/add-ons/kernel/drivers/audio/ac97/auich/auich.h
r25418 r25420 12 12 * notice, this list of conditions and the following disclaimer in the 13 13 * documentation and/or other materials provided with the distribution. 14 * 3. All advertising materials mentioning features or use of this software15 * must display the following acknowledgement:16 * This product includes software developed by the NetBSD17 * Foundation, Inc. and its contributors.18 * 4. Neither the name of The NetBSD Foundation nor the names of its19 * contributors may be used to endorse or promote products derived20 * from this software without specific prior written permission.21 14 * 22 15 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
