Subversion Repositories Kolibri OS

Rev

Rev 5057 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
874 serge 1
Nable 21.05.2008.
2
This driver is my contribution (or donation) to KolibriOS. This is provided
3
AS IS in hope it'll be useful, but WITHOUT ANY WARRANTY! No responcibility
4
for any hardware damage or data loss. Use at your own risk!
5
 
6
;-------------------------------------------------------------------------------
7
;Changelog:
8
;-------------------------------------------------------------------------------
9
v0.2 - DEV_SET(GET)_MASTERVOL functions are unlocked and implemented.
10
 
11
v0.1 - first release.
12
 
13
;-------------------------------------------------------------------------------
14
;Tiny FAQ for sound driver by Nable for SB16 sound card.
15
;-------------------------------------------------------------------------------
16
 
17
;What is it?--------------------------------------------------------------------
18
  As you may know there is a sound subsystem ('INFINITY') in KolibriOS.
19
This subsystem includes mixer and separate interface for soundplayer
20
program and driver, so player application don't need to know what soundcard
21
is installed and how to cope with it, all work with card do the driver.
22
Before this time there were drivers only for AC97 integrated sound, but I
23
don't have such at home and if I would upgrade my computer with a newest
24
hardware, with 100% probability integrated sound will be HD Codec, nowadays
25
AC97 is not actual (2008 year is at calendar). But I'm not planning to upgrade
26
my computer so much now (and in next 5-6 years), writing the driver for my PCI
27
ESS Maestro1 card is difficult for me (may be some time later), so I decided
28
to write a driver for SB16. At first it is easy, there are many working
29
examples for DOS, there are heaps of good documentation and as an ISA device
30
SB16 can be programmed through I/O ports (about 5 ports are used), that is
31
more easy than PCI access. Now, enough lirics, lets go to physics :-)
32
  If you still don't understand what stuff is it, I'll tell this in brief:
33
with this driver you can play MP3 and WAV music (using AC97SND player) and
34
sounds (some games and DOSBOX can produce sound output through sound
35
subsystem) in KolibriOS.
36
 
37
;Yeah! I need sound in Kolibri and I have SB16 card. Whats then?----------------
38
  At first copy my SOUND.OBJ to /sys/drivers at your Kolibri system. Note,
39
that if you have AC97 card and it's driver started - then new driver won't
40
run until reboot. Then run BOARD and go to 'user' tab. Then try to run
41
AC97SND player. At BOARD you will see the following (if you had a proper
42
card):
43
|----------------------------|
44
|detecting hardware...	     | <- detector startup message
45
|DSP found at port 220h      | <- if you have a proper card, it'll be
46
|DSP version 4.13 - SB16     |	  autodetected. Numbers may be different.
47
|failed to attach IRQ5	     | <- don't mention. Old kernels reserve IRQ5
48
|owner's handler: 0x80D74284 |    see below how to fix it.
49
|----------------------------|
50
  At first, note that DSP version must be 4.xx or higher. Older cards are not
51
supported in this first release, maybe some time later. If nothing detected
52
but PNP/BIOS or some other OS detects your card - I'm sorry, it's perverted
53
PNP card like OPTi16, that is like HD Codec - until you init it through
54
PCI->ISA bridge (HD Codec of course through PCI->PCI bridge), map it, etc,
55
you can't use it in any way. I'd rather write a PCI device driver, than
56
for this extreme perversion. If your card detected and has a proper version
57
but you see 'failed to attach IRQ' - delete stroke 'mov [irq_owner+4*5],1' from the
58
file kernel.asm of your kernel source, save it, rebuild kernel, copy new
59
kernel to /sys/ (did you rename 'kernel' to 'kernel.mnt'? You should do it),
60
restart kernel (Ctrl+Alt+F12, Home). THE EASIER WAY IS TO USE A NEWER KERNEL,
61
since SVN802 it's fixed.
62
Now everything should be OK.
63
 
64
;It works for a part of the second and then stops, but system doesn't hang------
65
Go to 'config.inc' of my driver and change 'sb_irq_num' value from 5 to 7.
66
Then save, rebuild driver (compile 'sound.asm'), put 'sound' to /sys/drivers/
9425 leency 67
(you need to rename file 'sound' to 'sound.sys'), restart kernel and try again
874 serge 68
to produce sound.
69
 
70
;-------------------------------------------------------------------------------
71
Ask your questions at KolibriOS forum: board.kolibrios.org
72
I'll try to answer you if possible.