Bug fixes

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3086 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2003-04-21 00:10:24 +00:00
parent 6d6c8c465a
commit 4395e32018
4 changed files with 22 additions and 5 deletions

View File

@ -1906,6 +1906,7 @@ int32 emuxki_int(void *arg)
}
}
}
#if MIDI
if (ipr & (/*EMU_IPR_MIDITRANSBUFE | */EMU_IPR_MIDIRECVBUFE)) {
midi_interrupt(card);
}
@ -1915,6 +1916,7 @@ int32 emuxki_int(void *arg)
TRACE(("EMU_INTE_MIDITXENABLE disabled\n"));
}
}
#endif
if (ipr & (EMU_IPR_ADCBUFHALFFULL | EMU_IPR_ADCBUFFULL
| EMU_IPR_MICBUFHALFFULL | EMU_IPR_MICBUFFULL
| EMU_IPR_EFXBUFHALFFULL | EMU_IPR_EFXBUFFULL)) {
@ -2018,9 +2020,10 @@ make_device_names(
{
/*char * name = card->name;
sprintf(name, "emuxki/%ld", card-cards+1);*/
#if MIDI
sprintf(card->midi.name, "midi/emuxki/%ld", card-cards+1);
names[num_names++] = card->midi.name;
#endif
sprintf(card->name, "audio/multi/emuxki/%ld", card-cards+1);
names[num_names++] = card->name;
@ -2063,12 +2066,14 @@ emuxki_setup(emuxki_dev * card)
dump_hardware_regs(&card->config);
#if MIDI
if ((err = (*mpu401->create_device)(card->config.nabmbar + IS_AUDIGY(&card->config) ? EMU_A_MUDATA1 : EMU_MUDATA,
&card->midi.driver, 0, midi_interrupt_op, &card->midi)) < B_OK)
return (err);
card->midi.card = card;
#endif
/* reset the codec */
PRINT(("codec reset\n"));
emuxki_codec_write(&card->config, 0x00, 0x0000);
@ -2373,7 +2378,7 @@ emuxki_initfx(emuxki_dev * card)
EMU_A_DSP_GPR(EMU_DSP_TMPGPR_DSP_IN_L),
EMU_A_DSP_CST(0),
EMU_A_DSP_GPR(EMU_DSP_TMPGPR_DSP_IN_L), EMU_A_DSP_CST(4));
emuxki_dsp_addop(&card->config, &pc, EMU_DSP_OP_MACS,
emuxki_dsp_addop(&card->config, &pc, EMU_DSP_OP_MACINTS,
EMU_A_DSP_GPR(EMU_DSP_TMPGPR_DSP_IN_R),
EMU_A_DSP_CST(0),
EMU_A_DSP_GPR(EMU_DSP_TMPGPR_DSP_IN_R), EMU_A_DSP_CST(4));
@ -2571,6 +2576,10 @@ emuxki_init(emuxki_dev * card)
emuxki_chan_write(&card->config, 0, EMU_FXBA, 0);
emuxki_chan_write(&card->config, 0, EMU_ADCBS, EMU_RECBS_BUFSIZE_NONE);
emuxki_chan_write(&card->config, 0, EMU_ADCBA, 0);
if(IS_AUDIGY(&card->config)) {
emuxki_chan_write(&card->config, 0, EMU_SPBYPASS, EMU_SPBYPASS_24_BITS);
}
/* Initialize all channels to stopped and no effects */
for (i = 0; i < EMU_NUMCHAN; i++) {
@ -2676,6 +2685,9 @@ emuxki_init(emuxki_dev * card)
/* Init streams list */
LIST_INIT(&(card->streams));
/* Init mems list */
LIST_INIT(&(card->mem));
/* Timer is stopped */
card->timerstate &= ~EMU_TIMER_STATE_ENABLED;
@ -2848,9 +2860,11 @@ find_device(const char * name)
PRINT(("emuxki: find_device(%s)\n", name));
for (ix=0; ix<num_cards; ix++) {
#if MIDI
if (!strcmp(cards[ix].midi.name, name)) {
return &midi_hooks;
}
#endif
if (!strcmp(cards[ix].name, name)) {
return &multi_hooks;
}

View File

@ -54,9 +54,10 @@
#define CREATIVELABS_SBLIVE_DEVICE_ID 0x0002 /* Creative Labs SoundBlaster Live */
#define CREATIVELABS_AUDIGY_DEVICE_ID 0x0004 /* Creative Labs Audigy and Audigy 2 */
#define AUDIGY 1 // Audigy is not tested for now, but Audigy 2 is
#define AUDIGY 1 // Audigy seems to work
#define MIDI 0 // Midi is not supported for now
#define VERSION "Version alpha 4, Copyright (c) 2002 Jérôme Duval, compiled on " ## __DATE__ ## " " ## __TIME__
#define VERSION "Version alpha 7, Copyright (c) 2002,2003 Jérôme Duval, compiled on " ## __DATE__ ## " " ## __TIME__
#define DRIVER_NAME "emuxki"
#define FRIENDLY_NAME "Emuxki"
#define FRIENDLY_NAME_LIVE FRIENDLY_NAME" SB Live"

View File

@ -506,6 +506,7 @@
#define EMU_SPBYPASS 0x5e
#define EMU_SPBYPASS_ENABLE 0x00000001
#define EMU_SPBYPASS_24_BITS 0x00000f00
#define EMU_AC97SLOT 0x5f
#define EMU_AC97SLOT_CENTER 0x00000010

View File

@ -1210,6 +1210,7 @@ emuxki_open(const char *name, uint32 flags, void** cookie)
emuxki_stream_set_audioparms(card->rstream, true, 2, true, 48000);
emuxki_stream_set_audioparms(card->rstream2, true, 2, true, 48000);
recparams.efx_voices[0] = 3; // channels 1,2
recparams.efx_voices[1] = 0;
//emuxki_voice_set_recparms(card->rvoice, EMU_RECSRC_FX, &recparams);
emuxki_stream_set_recparms(card->rstream, EMU_RECSRC_ADC, NULL);
emuxki_stream_set_recparms(card->rstream2, EMU_RECSRC_FX, &recparams);