* synched license terms with current
* minor space cleanup * support for revert enable amp for known models git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25420 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -33,8 +33,6 @@
|
|||||||
#include <MediaDefs.h>
|
#include <MediaDefs.h>
|
||||||
#include "ac97.h"
|
#include "ac97.h"
|
||||||
|
|
||||||
#define REVERSE_EAMP_POLARITY 0
|
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
|
|
||||||
@@ -277,12 +275,20 @@ void ad1981b_init(device_config *config)
|
|||||||
|
|
||||||
void default_amp_enable(device_config *config, bool yesno)
|
void default_amp_enable(device_config *config, bool yesno)
|
||||||
{
|
{
|
||||||
|
uint32 id;
|
||||||
LOG(("default_amp_enable\n"));
|
LOG(("default_amp_enable\n"));
|
||||||
LOG(("powerdown register was = %#04x\n",auich_codec_read(config, AC97_POWERDOWN)));
|
LOG(("powerdown register was = %#04x\n",auich_codec_read(config, AC97_POWERDOWN)));
|
||||||
#if REVERSE_EAMP_POLARITY
|
id = (config->subvendor_id << 16) | config->subsystem_id;
|
||||||
|
if (id == 0x161f202f
|
||||||
|
|| id == 0x161f203a
|
||||||
|
|| id == 0x161f204c
|
||||||
|
|| id == 0x104d8144
|
||||||
|
|| id == 0x104d8197
|
||||||
|
|| id == 0x104d81c0
|
||||||
|
|| id == 0x104d81c5) {
|
||||||
yesno = !yesno;
|
yesno = !yesno;
|
||||||
LOG(("using reverse eamp polarity\n"));
|
LOG(("using reverse eamp polarity\n"));
|
||||||
#endif
|
}
|
||||||
if (yesno)
|
if (yesno)
|
||||||
auich_codec_write(config, AC97_POWERDOWN, auich_codec_read(config, AC97_POWERDOWN) & ~0x8000); /* switch on (low active) */
|
auich_codec_write(config, AC97_POWERDOWN, auich_codec_read(config, AC97_POWERDOWN) & ~0x8000); /* switch on (low active) */
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -11,13 +11,6 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by the NetBSD
|
|
||||||
* Foundation, Inc. and its contributors.
|
|
||||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
@@ -411,7 +404,7 @@ auich_int(void *arg)
|
|||||||
// TRACE(("auich_int(%p)\n", card));
|
// TRACE(("auich_int(%p)\n", card));
|
||||||
|
|
||||||
sta = auich_reg_read_16(&card->config, AUICH_REG_GLOB_STA);
|
sta = auich_reg_read_16(&card->config, AUICH_REG_GLOB_STA);
|
||||||
if(sta & card->interrupt_mask) {
|
if (sta & card->interrupt_mask) {
|
||||||
|
|
||||||
if (sta & (STA_S0RI | STA_S1RI | STA_S2RI)) {
|
if (sta & (STA_S0RI | STA_S1RI | STA_S2RI)) {
|
||||||
// ignore and clear resume interrupt(s)
|
// ignore and clear resume interrupt(s)
|
||||||
@@ -455,7 +448,7 @@ auich_int(void *arg)
|
|||||||
TRACE(("sta %x\n", sta));
|
TRACE(("sta %x\n", sta));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(gotone)
|
if (gotone)
|
||||||
return B_INVOKE_SCHEDULER;
|
return B_INVOKE_SCHEDULER;
|
||||||
|
|
||||||
TRACE(("Got unhandled interrupt\n"));
|
TRACE(("Got unhandled interrupt\n"));
|
||||||
|
|||||||
@@ -11,13 +11,6 @@
|
|||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by the NetBSD
|
|
||||||
* Foundation, Inc. and its contributors.
|
|
||||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
||||||
* contributors may be used to endorse or promote products derived
|
|
||||||
* from this software without specific prior written permission.
|
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
|
|||||||
Reference in New Issue
Block a user