add: dd->emu10k1_initialized = TRUE;
context: intAHIsub_AllocAudio( REG( a1, struct TagItem* tagList ),		      REG( a2, struct AHIAudioCtrlDrv* AudioCtrl ) ){  int              card_num;  UWORD            command_word;  int              ret;  card_num = ( GetTagData( AHIDB_AudioID, 0, tagList) & 0x0000f000 ) >> 12;    dd = AllocVec( sizeof( *dd ), MEMF_PUBLIC | MEMF_CLEAR );  if( dd == NULL )  {    KPrintF( DRIVER_NAME ": Unable to allocate driver structure.\n" );  }  else  {    dd->interrupt.is_Node.ln_Type = NT_INTERRUPT;    dd->interrupt.is_Node.ln_Pri  = 0;    dd->interrupt.is_Node.ln_Name = (STRPTR) LibName;    dd->interrupt.is_Code         = (void(*)(void)) EMU10kx_interrupt;    dd->interrupt.is_Data         = (APTR) AudioCtrl;        dd->software_interrupt.is_Node.ln_Type = NT_INTERRUPT;    dd->software_interrupt.is_Node.ln_Pri  = 0;    dd->software_interrupt.is_Node.ln_Name = (STRPTR) LibName;    dd->software_interrupt.is_Code         = (void(*)(void)) Mixer_interrupt;    dd->software_interrupt.is_Data         = (APTR) AudioCtrl;        dd->card.pci_dev = 0;    do    {      dd->card.pci_dev = pci_find_device( PCI_VENDOR_ID_CREATIVE,						   PCI_DEVICE_ID_CREATIVE_EMU10K1,						   dd->card.pci_dev );    } while( dd->card.pci_dev != 0 && card_num-- != 0 );    if( dd->card.pci_dev == NULL )    {      KPrintF( DRIVER_NAME ": Unable to find EMU10k subsystem.\n" );      return AHISF_ERROR;    }//  if( pci_set_dma_mask(dd->card.pci_dev, EMU10K1_DMA_MASK) )//  {//    printf( "Unable to set DMA mask for card\n." );//    goto error;//  }    if( pci_request( dd->card.pci_dev, (STRPTR) LibName, NULL ) )    {      KPrintF( DRIVER_NAME ": Unable to claim I/O resources.\n" );      return AHISF_ERROR;    }    if( pci_enable( dd->card.pci_dev ) )    {      KPrintF( DRIVER_NAME ": Unable to enable card.\n" );      return AHISF_ERROR;    }    command_word = pci_read_conf_word( dd->card.pci_dev, PCI_COMMAND );    command_word |= PCI_CMD_IO_MASK | PCI_CMD_MEMORY_MASK | PCI_CMD_MASTER_MASK;    pci_write_conf_word( dd->card.pci_dev, PCI_COMMAND, command_word );    // FIXME: How about latency/pcibios_set_master()??        dd->card.iobase  = (ULONG) pci_get_base_start( dd->card.pci_dev, 0 );    dd->card.length  = ( (ULONG) pci_get_base_end( dd->card.pci_dev, 0 ) -			 (ULONG) dd->card.iobase ) + 1;    dd->card.irq     = pci_ask_irq( dd->card.pci_dev ) >> 8;        dd->card.chiprev = pci_read_conf_byte( dd->card.pci_dev, PCI_REVISION_ID );    dd->card.model   = pci_read_conf_word( dd->card.pci_dev, PCI_SUBSYSTEM_ID );    dd->card.isaps   = ( pci_read_conf_long( dd->card.pci_dev,					     PCI_SUBSYSTEM_VENDOR_ID )			 == EMU_APS_SUBID );    pci_add_irq( dd->card.pci_dev, &dd->interrupt );    dd->interrupt_added = TRUE;        /* Initialize mixer */    emu10k1_writeac97( &dd->card, AC97_RESET, 0L);	    Delay( 1 );    if (emu10k1_readac97( &dd->card, AC97_RESET ) & 0x8000) {      KPrintF( DRIVER_NAME ": ac97 codec not present.\n");      return AHISF_ERROR;    }    else    {      emu10k1_writeac97( &dd->card, AC97_MASTER_VOL_STEREO, 0x0000 );      emu10k1_writeac97( &dd->card, AC97_PCMOUT_VOL,        0x0000 );      emu10k1_writeac97( &dd->card, AC97_PCBEEP_VOL,        0x000a );      emu10k1_writeac97( &dd->card, AC97_LINEIN_VOL,        0x0a0a );      emu10k1_writeac97( &dd->card, AC97_MIC_VOL,           AC97_MUTE );      emu10k1_writeac97( &dd->card, AC97_CD_VOL,            0x0a0a );      emu10k1_writeac97( &dd->card, AC97_RECORD_GAIN,       0x0a0a );      emu10k1_writeac97( &dd->card, AC97_AUX_VOL,           0x0a0a );      emu10k1_writeac97( &dd->card, AC97_PHONE_VOL,         0x000a );      emu10k1_writeac97( &dd->card, AC97_MASTER_VOL_MONO,   0x000a );      emu10k1_writeac97( &dd->card, AC97_VIDEO_VOL,         0x0a0a );      if (emu10k1_readac97( &dd->card, AC97_EXTENDED_ID ) & 0x0080 )      {	sblive_writeptr( &dd->card, AC97SLOT, 0, AC97SLOT_CNTR | AC97SLOT_LFE);	emu10k1_writeac97( &dd->card, AC97_SURROUND_MASTER, 0x0 );      }    }    /* Initialize chip */    if( emu10k1_init( &dd->card ) < 0 )    {      KPrintF( DRIVER_NAME ": Unable to initialize EMU10kx subsystem.\n");      return AHISF_ERROR;    }    /* Since the EMU10kx chips can play a voice at any sample rate, we       do not have to examine/modify AudioCtrl->ahiac_MixFreq here.       Had this not been the case, AudioCtrl->ahiac_MixFreq should be       set to the frequency we will use.  */  }  return AHISF_KNOWHIFI | AHISF_KNOWSTEREO | AHISF_MIXING | AHISF_TIMING;}