Fix ugly bug with PAS16 Rev D mixer: output level was too low
This commit is contained in:
parent
854d8165f3
commit
4f3268d32c
@ -65,6 +65,20 @@ 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.
|
||||
*/
|
||||
|
||||
void
|
||||
mix_write (unsigned char data, int ioaddr)
|
||||
{
|
||||
outw ((ioaddr ^ translat_code) - 1, data | (data << 8));
|
||||
outb (0, 0x80);
|
||||
}
|
||||
|
||||
void
|
||||
pas2_msg (char *foo)
|
||||
{
|
||||
@ -223,8 +237,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)
|
||||
|
||||
|
@ -72,14 +72,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 */
|
||||
left |= mixer;
|
||||
@ -88,16 +80,16 @@ mixer_output (int right_vol, int left_vol, int div, int bits,
|
||||
|
||||
if (bits == P_M_MV508_BASS || bits == P_M_MV508_TREBLE)
|
||||
{ /* Bass and trebble 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));
|
||||
@ -106,8 +98,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…
Reference in New Issue
Block a user