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 REVERSE_EAMP_POLARITY 0
|
||||
|
||||
#include "debug.h"
|
||||
#include "io.h"
|
||||
|
||||
@ -124,6 +126,10 @@ ac97_amp_enable(bool yesno)
|
||||
default:
|
||||
{
|
||||
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)
|
||||
ich_codec_write(config->codecoffset + AC97_POWERDOWN, ich_codec_read(AC97_POWERDOWN) & ~0x8000); /* switch on (low active) */
|
||||
else
|
||||
|
@ -39,7 +39,7 @@
|
||||
* DEBUG == 2, TRACE & LOG, PRINT with snooze()
|
||||
*/
|
||||
#ifndef DEBUG
|
||||
#define DEBUG 0
|
||||
#define DEBUG 1
|
||||
#endif
|
||||
|
||||
#undef PRINT
|
||||
|
@ -519,8 +519,8 @@ init_driver(void)
|
||||
ac97_init();
|
||||
ac97_amp_enable(true);
|
||||
|
||||
LOG(("codec vendor id = %#08x\n",ac97_get_vendor_id()));
|
||||
LOG(("codec descripton = %s\n",ac97_get_vendor_id_description()));
|
||||
LOG(("codec vendor id = %#08x\n",ac97_get_vendor_id()));
|
||||
LOG(("codec descripton = %s\n",ac97_get_vendor_id_description()));
|
||||
LOG(("codec 3d enhancement = %s\n",ac97_get_3d_stereo_enhancement()));
|
||||
|
||||
/* reset all channels */
|
||||
@ -546,12 +546,27 @@ init_driver(void)
|
||||
int_thread_id = spawn_kernel_thread(int_thread, "ich_ac97 interrupt poller", B_REAL_TIME_PRIORITY, 0);
|
||||
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 */
|
||||
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 */
|
||||
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
|
||||
/* enable pcm input */
|
||||
ich_codec_write(config->codecoffset + 0x10, 0x0000);
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#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 BUFFER_SIZE 2048
|
||||
|
Loading…
Reference in New Issue
Block a user