From: Geert U. <ge...@li...> - 2000-10-06 17:41:46
|
On Fri, 6 Oct 2000, Michel [iso-8859-1] Dänzer wrote: > Frank Petzold wrote: > > On Thu, Oct 05, 2000 at 05:27:22PM +0200, Geert Uytterhoeven wrote: > > > There's one disadvantage of this method: in the rare occasion you have a > > > modular amifb and rmmod amifb, you cannot get the high quality sound back. > > > With the original idea, you could (rmmod and) insmod dmasound_paula. > > Why even the need to reinitialize the sound module? Isn't it possible to set > the mode each time the sound device is opened or similar? Good idea! > > > What do you prefer? > > > > You should not rely on the order of initialization of things anywhere. > > True. Which is difficult if different functionalities depend on common hardware settings. New try. Now the code is in AmiInit(). Perhaps we should replace the {request,release}_mem_region() stuff with some simpler access method, but that requires changes to amifb as well. For now I'd like to know whether the custom chip programming below works, if amifb is not compiled in or disabled (video=amifb:off). Thanks for testing! --- linux-2.4.0-test9/drivers/sound/dmasound/dmasound_paula.c Tue Jul 18 13:54:40 2000 +++ geert-31kHz-2.4.0-test9/drivers/sound/dmasound/dmasound_paula.c Fri Oct 6 17:12:01 2000 @@ -27,8 +27,6 @@ /* * The minimum period for audio depends on htotal (for OCS/ECS/AGA) * (Imported from arch/m68k/amiga/amisound.c) - * - * FIXME: if amifb is not used, there should be a method to change htotal */ extern volatile u_short amiga_audio_min_period; @@ -366,6 +364,21 @@ int period, i; AmiSilence(); + + if ((amiga_chipset == CS_ECS || amiga_chipset == CS_AGA) && + amiga_audio_min_period > 57 && + request_mem_region(CUSTOM_PHYSADDR+0xe0, 0x120, "31 kHz hack")) { + /* program Denise/Lisa for a higher maximum play rate */ + /* (may be overridden by amifb) */ + custom.htotal = 113; /* 31 kHz */ + custom.vtotal = 223; /* 70 Hz */ + custom.beamcon0 = 0x4390; /* HARDDIS, VAR{BEAM,VSY,HSY,CSY}EN */ + /* suspend the monitor */ + custom.hsstrt = custom.hsstop = 116; + custom.vsstrt = custom.vsstop = 226; + amiga_audio_min_period = 57; + release_mem_region(CUSTOM_PHYSADDR+0xe0, 0x120); + } if (dmasound.soft.speed) period = amiga_colorclock/dmasound.soft.speed-1; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@li... In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds |