This solve some problems where the driver seemed to work, but you couldn't
hear any sound. Looks like certain chipsets use the optional aux output, instead of line out git-svn-id: file:///srv/svn/repos/haiku/trunk/current@887 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
df6ee31838
commit
32ffa52615
@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
//#define DEBUG 1
|
//#define DEBUG 1
|
||||||
|
|
||||||
|
#define REVERSE_EAMP_POLARITY 0
|
||||||
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
|
|
||||||
@ -124,6 +126,10 @@ ac97_amp_enable(bool yesno)
|
|||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
LOG(("powerdown register was = %#04x\n",ich_codec_read(config->codecoffset + AC97_POWERDOWN)));
|
LOG(("powerdown register was = %#04x\n",ich_codec_read(config->codecoffset + AC97_POWERDOWN)));
|
||||||
|
#if REVERSE_EAMP_POLARITY
|
||||||
|
yesno = !yesno;
|
||||||
|
LOG(("using reverse eamp polarity\n"));
|
||||||
|
#endif
|
||||||
if (yesno)
|
if (yesno)
|
||||||
ich_codec_write(config->codecoffset + AC97_POWERDOWN, ich_codec_read(AC97_POWERDOWN) & ~0x8000); /* switch on (low active) */
|
ich_codec_write(config->codecoffset + AC97_POWERDOWN, ich_codec_read(AC97_POWERDOWN) & ~0x8000); /* switch on (low active) */
|
||||||
else
|
else
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
* DEBUG == 2, TRACE & LOG, PRINT with snooze()
|
* DEBUG == 2, TRACE & LOG, PRINT with snooze()
|
||||||
*/
|
*/
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
#define DEBUG 0
|
#define DEBUG 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef PRINT
|
#undef PRINT
|
||||||
|
@ -547,11 +547,26 @@ init_driver(void)
|
|||||||
resume_thread(int_thread_id);
|
resume_thread(int_thread_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG(("codec master output = %#04x\n",ich_codec_read(config->codecoffset + 0x02)));
|
||||||
|
LOG(("codec aux output = %#04x\n",ich_codec_read(config->codecoffset + 0x04)));
|
||||||
|
LOG(("codec mono output = %#04x\n",ich_codec_read(config->codecoffset + 0x06)));
|
||||||
|
LOG(("codec pcm output = %#04x\n",ich_codec_read(config->codecoffset + 0x18)));
|
||||||
|
|
||||||
|
LOG(("writing codec registers\n"));
|
||||||
/* enable master output */
|
/* enable master output */
|
||||||
ich_codec_write(config->codecoffset + 0x02, 0x0000);
|
ich_codec_write(config->codecoffset + 0x02, 0x0000);
|
||||||
|
/* enable aux output */
|
||||||
|
ich_codec_write(config->codecoffset + 0x04, 0x0000);
|
||||||
|
/* enable mono output */
|
||||||
|
ich_codec_write(config->codecoffset + 0x06, 0x0000);
|
||||||
/* enable pcm output */
|
/* enable pcm output */
|
||||||
ich_codec_write(config->codecoffset + 0x18, 0x0404);
|
ich_codec_write(config->codecoffset + 0x18, 0x0404);
|
||||||
|
|
||||||
|
LOG(("codec master output = %#04x\n",ich_codec_read(config->codecoffset + 0x02)));
|
||||||
|
LOG(("codec aux output = %#04x\n",ich_codec_read(config->codecoffset + 0x04)));
|
||||||
|
LOG(("codec mono output = %#04x\n",ich_codec_read(config->codecoffset + 0x06)));
|
||||||
|
LOG(("codec pcm output = %#04x\n",ich_codec_read(config->codecoffset + 0x18)));
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* enable pcm input */
|
/* enable pcm input */
|
||||||
ich_codec_write(config->codecoffset + 0x10, 0x0000);
|
ich_codec_write(config->codecoffset + 0x10, 0x0000);
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#include "hardware.h"
|
#include "hardware.h"
|
||||||
|
|
||||||
#define VERSION "Version 1.4, Copyright (c) 2002 Marcus Overhagen, compiled on " ## __DATE__ ## " " ## __TIME__
|
#define VERSION "Version 1.5, Copyright (c) 2002 Marcus Overhagen, compiled on " ## __DATE__ ## " " ## __TIME__
|
||||||
#define DRIVER_NAME "ich_ac97"
|
#define DRIVER_NAME "ich_ac97"
|
||||||
|
|
||||||
#define BUFFER_SIZE 2048
|
#define BUFFER_SIZE 2048
|
||||||
|
Loading…
Reference in New Issue
Block a user