PLEASE, PLEASE, PLEASE!!!!!!!
DO NOT COMMIT NEW VOXWARE VERSIONS BLINDLY, TAKE CARE TO RESTORE PAS16D FIXES, I AM REALLY TIRED TO DO IT WITH EACH NEW RELEASE!!!
This commit is contained in:
parent
84428d8465
commit
21a3970b05
@ -128,6 +128,7 @@
|
||||
#define F_F_PCM_RATE_COUNTER 0x40 /* R W PCM 1=enable, 0=disable sample rate counter */
|
||||
#define F_F_PCM_BUFFER_COUNTER 0x80 /* R W PCM 1=enable, 0=disable sample buffer counter */
|
||||
|
||||
#define CHIP_REV 0xFF88 /* R Control 0=PAS, 1=PAS+, 2=CDPC, 3=PAS16C, 4=PAS16D */
|
||||
#define PAS_NONE 0
|
||||
#define PAS_PLUS 1
|
||||
#define PAS_CDPC 2
|
||||
|
@ -70,6 +70,23 @@ pas_write (unsigned char data, int ioaddr)
|
||||
OUTB (data, ioaddr ^ translat_code);
|
||||
}
|
||||
|
||||
/*
|
||||
* The Revision D cards have a problem with their MVA508 interface. The
|
||||
* kludge-o-rama fix is to make a 16-bit quantity with identical LSB and
|
||||
* MSBs out of the output byte and to do a 16-bit out to the mixer port -
|
||||
* 1. We need to do this because there was access problems, not timing
|
||||
* problems.
|
||||
*/
|
||||
void
|
||||
mix_write (unsigned char data, int ioaddr)
|
||||
{
|
||||
if (pas_model == PAS_16D) {
|
||||
outw ((ioaddr ^ translat_code) - 1, data | (data << 8));
|
||||
outb (0, 0x80);
|
||||
} else
|
||||
OUTB (data, ioaddr ^ translat_code);
|
||||
}
|
||||
|
||||
void
|
||||
pas2_msg (char *foo)
|
||||
{
|
||||
@ -253,8 +270,8 @@ config_pas_hw (struct address_info *hw_config)
|
||||
else
|
||||
pas_write (0, PRESCALE_DIVIDER);
|
||||
|
||||
pas_write (P_M_MV508_ADDRESS | 5, PARALLEL_MIXER);
|
||||
pas_write (5, PARALLEL_MIXER);
|
||||
mix_write (P_M_MV508_ADDRESS | 5, PARALLEL_MIXER);
|
||||
mix_write (5, PARALLEL_MIXER);
|
||||
|
||||
#if !defined(EXCLUDE_SB_EMULATION) || !defined(EXCLUDE_SB)
|
||||
|
||||
@ -348,7 +365,7 @@ detect_pas_hw (struct address_info *hw_config)
|
||||
*/
|
||||
return 0;
|
||||
|
||||
pas_model = O_M_1_to_card[pas_read (OPERATION_MODE_1) & 0x0f];
|
||||
pas_model = pas_read (CHIP_REV);
|
||||
|
||||
return pas_model;
|
||||
}
|
||||
@ -361,7 +378,7 @@ attach_pas_card (long mem_start, struct address_info *hw_config)
|
||||
if (detect_pas_hw (hw_config))
|
||||
{
|
||||
|
||||
if ((pas_model = O_M_1_to_card[pas_read (OPERATION_MODE_1) & 0x0f]))
|
||||
if (pas_model = pas_read (CHIP_REV))
|
||||
{
|
||||
printk (" <%s rev %d>", pas_model_names[(int) pas_model], pas_read (BOARD_REV_ID));
|
||||
}
|
||||
|
@ -106,14 +106,6 @@ mixer_output (int right_vol, int left_vol, int div, int bits,
|
||||
int left = left_vol * div / 100;
|
||||
int right = right_vol * div / 100;
|
||||
|
||||
/*
|
||||
* The Revision D cards have a problem with their MVA508 interface. The
|
||||
* kludge-o-rama fix is to make a 16-bit quantity with identical LSB and
|
||||
* MSBs out of the output byte and to do a 16-bit out to the mixer port -
|
||||
* 1. We don't need to do this because the call to pas_write more than
|
||||
* compensates for the timing problems.
|
||||
*/
|
||||
|
||||
if (bits & P_M_MV508_MIXER)
|
||||
{ /*
|
||||
* Select input or output mixer
|
||||
@ -126,16 +118,16 @@ mixer_output (int right_vol, int left_vol, int div, int bits,
|
||||
{ /*
|
||||
* Bass and treble are mono devices
|
||||
*/
|
||||
pas_write (P_M_MV508_ADDRESS | bits, PARALLEL_MIXER);
|
||||
pas_write (left, PARALLEL_MIXER);
|
||||
mix_write (P_M_MV508_ADDRESS | bits, PARALLEL_MIXER);
|
||||
mix_write (left, PARALLEL_MIXER);
|
||||
right_vol = left_vol;
|
||||
}
|
||||
else
|
||||
{
|
||||
pas_write (P_M_MV508_ADDRESS | P_M_MV508_LEFT | bits, PARALLEL_MIXER);
|
||||
pas_write (left, PARALLEL_MIXER);
|
||||
pas_write (P_M_MV508_ADDRESS | P_M_MV508_RIGHT | bits, PARALLEL_MIXER);
|
||||
pas_write (right, PARALLEL_MIXER);
|
||||
mix_write (P_M_MV508_ADDRESS | P_M_MV508_LEFT | bits, PARALLEL_MIXER);
|
||||
mix_write (left, PARALLEL_MIXER);
|
||||
mix_write (P_M_MV508_ADDRESS | P_M_MV508_RIGHT | bits, PARALLEL_MIXER);
|
||||
mix_write (right, PARALLEL_MIXER);
|
||||
}
|
||||
|
||||
return (left_vol | (right_vol << 8));
|
||||
@ -144,8 +136,8 @@ mixer_output (int right_vol, int left_vol, int div, int bits,
|
||||
void
|
||||
set_mode (int new_mode)
|
||||
{
|
||||
pas_write (P_M_MV508_ADDRESS | P_M_MV508_MODE, PARALLEL_MIXER);
|
||||
pas_write (new_mode, PARALLEL_MIXER);
|
||||
mix_write (P_M_MV508_ADDRESS | P_M_MV508_MODE, PARALLEL_MIXER);
|
||||
mix_write (new_mode, PARALLEL_MIXER);
|
||||
|
||||
mode_control = new_mode;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user