2 #include <aros/debug.h>
6 #include "DriverData.h"
8 #include "alsa-bridge/alsa.h"
10 /******************************************************************************
11 ** Custom driver init *********************************************************
12 ******************************************************************************/
15 DriverInit( struct DriverBase
* AHIsubBase
)
17 struct AlsaBase
* AlsaBase
= (struct AlsaBase
*) AHIsubBase
;
19 D(bug("[Alsa]: DriverInit()\n"));
21 AlsaBase
->dosbase
= (struct DosLibrary
*)OpenLibrary( DOSNAME
, 37 );
23 if( AlsaBase
->dosbase
== NULL
)
25 Req( "Unable to open 'dos.library' version 37.\n" );
33 ALSA_MixerInit(&AlsaBase
->al_MixerHandle
, &AlsaBase
->al_MixerElem
,
34 &AlsaBase
->al_MinVolume
, &AlsaBase
->al_MaxVolume
);
36 D(bug("[Alsa]: DriverInit() completed\n"));
42 /******************************************************************************
43 ** Custom driver clean-up *****************************************************
44 ******************************************************************************/
47 DriverCleanup( struct DriverBase
* AHIsubBase
)
49 struct AlsaBase
* AlsaBase
= (struct AlsaBase
*) AHIsubBase
;
53 if (AlsaBase
->al_MixerHandle
)
54 ALSA_MixerCleanup(AlsaBase
->al_MixerHandle
);
56 CloseLibrary( (struct Library
*) DOSBase
);