In general I would be interested to know how easy, or possible, it is to translate drivers from other Operating Systems (eg: linux, BeOS) to use them in Kolibri?
Specifically, I have a laptop where the sound drivers from linux work fine, but sound is not supported in Kolibri. Since linux is open source, the code for the sound drivers is available. A quick look seems to indicate there are several 'layers' of sound driver... including ALSA and others - I counted 15 kernel modules starting with "snd_" (!), although a few were for things like MIDI support.
It is likely the linux drivers are written in C, and recoding to assember is just not an option for me! I know they will be bigger and slower, but can I use drivers written in C? Then if there was demand, they could be recoded some time in the future.
I am very new to this stuff, and I don't even know which files are the core drivers, and which are layered interfaces to the core. I would need a lot of help!
Cheers,
MM
Cirrus Logic CS4610 / CS4239
First of all, we need to know which audio card your laptop has. Please start the application BOARD, then start AC97SND and try to play an MP3 file. Then start the application PCIDEV, press S to save the list of your PCI Devices to disk /rd/1. Then copy the files boardlog.txt and pcidev.txt from /rd/1 to another disk (like USB flash disk), and post them here in the forum.
Results from BOARD and PCIDEV below...
Additionally (if of any interest), Linux reports the Audio Adapter as "CS46xx - Sound Fusion CS46xx", and I believe the 'core' audio driver loaded into the kernel is "snd_cs46xx - Cirrus Logic Sound Fusion CS46XX".
ASTRA (a DOS program for looking at hardware) reports... "Vendor (1013h) : Cirrus Logic", "Device (6003h) : Crystal CS4610/14/22/24/30 SoundFusion PCI Audio Accelerator".
The reason I asked about translating other drivers is because the Thinkpad T20 is no longer very common (getting quite long in the tooth), and it is not even the computer I have in mind for my final project! Hence, I don't wish to make a big song and dance about this particular audio chip.
So anyway, the stuff you requested...
Cheers,
MM
Additionally (if of any interest), Linux reports the Audio Adapter as "CS46xx - Sound Fusion CS46xx", and I believe the 'core' audio driver loaded into the kernel is "snd_cs46xx - Cirrus Logic Sound Fusion CS46XX".
ASTRA (a DOS program for looking at hardware) reports... "Vendor (1013h) : Cirrus Logic", "Device (6003h) : Crystal CS4610/14/22/24/30 SoundFusion PCI Audio Accelerator".
The reason I asked about translating other drivers is because the Thinkpad T20 is no longer very common (getting quite long in the tooth), and it is not even the computer I have in mind for my final project! Hence, I don't wish to make a big song and dance about this particular audio chip.
So anyway, the stuff you requested...
Code: Select all
K : Attach Interrupt 6 Handler 8003224D
K : Set IDE IRQ6 return code 8005F280
K : Channel 1 Disk 0
K : Dev: IBM-DJSA-220
K : PIO mode 00000003
K : Multiword DMA mode 00000007
K : Ultra DMA mode 0000041F
K : Channel 1 Disk 1
K : Channel 2 Disk 0
K : Dev: HITACHI DVD-ROM GD-S200
K : PIO mode 00000003
K : Multiword DMA mode 00000007
K : Ultra DMA mode 00000407
K : Channel 2 Disk 1
K : UHCI controller at 00:3A with 2 ports initialized
K : Attach Interrupt 11 Handler 8002EB6D
K : [39] UHCI 80B9182C connect status changed, 009B/0091
K : Attach Interrupt 1 Handler 80034460
K : IRQ1 error code 8005F2A8
K : Attach Interrupt 12 Handler 80B9F2E4
K : kernel SVN r4391
K : 1 CPU detected
K : BAR0 01F0
K : BAR1 03F4
K : BAR2 0170
K : BAR3 0374
K : BAR4 1C00
K : IDEContrProgrammingInterface 0180
K : IDE_Interrupt 0000
K : Primary Bus Master IDE Status Register 00000020
K : Secondary Bus Master IDE Status Register 00000020
K : Attach Interrupt 14 Handler 8003332C
K : Set IDE IRQ14 return code 8005F2D0
K : Attach Interrupt 15 Handler 8003336C
K : Set IDE IRQ15 return code 8005F2E4
K : IDE CH1 DMA enabled
K : IDE CH2 PIO, because ATAPI drive present
K : IDE DMA mode
3C59X: Device is a vortex type
3C59X: I'm sorry but vortex code hasnt been tested yet
3C59X: Please contact me on hidnplayr@kolibrios.org
3C59X: If you can help me finish it!
K : [51] UHCI 80B9182C status 0280/0093
K : reset done at 51
K : [53] UHCI 80B9182C status 0095
K : address set in device
K : address set for controller
K : device descriptor: 12 01 00 02 00 00 00 40 81 07 67 55 26 01 01 02 03 01
K : found USB device with ID 0781:5567, 1 configuration(s)
K : config descriptor: 09 02 20 00 01 01 00 80 32 09 04 00 00 02 08 06 50 00 07 05 81 02 40 00 00 07 05 02 02 40 00 00
K : USB interface class/subclass/protocol = 08/06/50
K : USB mass storage device detected
K : 1 logical unit(s)
K : media is ready
K : 0 attempts, 0 ticks
K : peripheral device type is 00
K : direct-access mass storage device detected
K : sector size is 512, last sector is 7821311
trying to add disk
its size is not specified, 10% from free RAM will be used
new DiskSize: MB
operation completed successfully
Detecting hardware...
Sound service not loaded
Sound service not installed
Detecting hardware...
Sound service not loaded
Sound service not installed
K : destroy app object
K : destroy app object
Code: Select all
Don`t forget to enable PCI Access to Applications in Setup Menu.
PCI Version = 2.10; Last PCI Bus = 7
User MMIO channel = 0F.F:F
Number of PCI units = 0ch
VenID DevID Bus# Dev# Fnc Rev Class Subclass/ IRQ Company Description
Interface
----- ----- ---- ---- --- --- ----- --------- --- ------------------------------------------ --------------------------------
8086 7190 00 00 00 03 06 00 00 00 Intel Corp. Bridge - CPU/PCI
8086 7191 00 01 00 03 06 04 00 00 Intel Corp. Bridge - PCI/PCI
104c ac1b 00 02 00 03 06 07 00 0b TEXAS INSTRUMENTS Bridge - CarClassIDus
104c ac1b 00 02 01 03 06 07 00 0b TEXAS INSTRUMENTS Bridge - CarClassIDus
10b7 6056 00 03 00 20 02 00 00 0b 3COM Corp, Networking Division Network - Ethernet
10b7 1007 00 03 01 20 07 80 00 0b 3COM Corp, Networking Division Communication - misc
1013 6003 00 05 00 01 04 01 00 0b Cirrus Logic Multimedia - Audio
8086 7110 00 07 00 02 06 80 00 00 Intel Corp. Bridge - misc
8086 7111 00 07 01 01 01 01 80 00 Intel Corp. Storage - IDE
8086 7112 00 07 02 01 0c 03 00 0b Intel Corp. Serial Bus - USB Universal HC
8086 7113 00 07 03 03 06 80 00 00 Intel Corp. Bridge - misc
5333 8c12 01 00 00 13 03 00 00 0b S3 Graphics Co., Ltd. Display - VGA-compatible c.
MM
Thank you. This is the list of currently supported audio cards in KolibriOS: http://wiki.kolibrios.org/wiki/Hardware_Support#Audio
The author of most audio drivers in KolibriOS is Asper - we will see what he replies in this thread regarding the driver for your card.
The author of most audio drivers in KolibriOS is Asper - we will see what he replies in this thread regarding the driver for your card.
I dont know what your intended purpose is, but perhaps this chip has an SB16 compatibility mode, like most chips.
If so, it might be possible to use the sb16 driver with your sound card.
And yes, it's possible to write/port drivers in C for KolibriOS, knowledge of both operating systems (when porting) will be required.
This might help a bit http://wiki.kolibrios.org/wiki/Writing_ ... _KolibriOS
If so, it might be possible to use the sb16 driver with your sound card.
And yes, it's possible to write/port drivers in C for KolibriOS, knowledge of both operating systems (when porting) will be required.
This might help a bit http://wiki.kolibrios.org/wiki/Writing_ ... _KolibriOS
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
Why?MustardMan wrote:It is likely the linux drivers are written in C, and recoding to assember is just not an option for me!
Yes I can make a driver to make it work, but I prefer assembly in development for Kolibri especially in development of system code. If you want drivers in C then I think you can ask Serge.
@Asper:
I consider myself reasonably good at assembly programmiing, and I had for many years (and sometimes still do) write assembler. But it was (and still is) for microcontrollers, a significantly different beast. I struggle to understand the addressing modes and mnemonics used for the 80xxx processors. Interestingly, it was actually Intel microcontrollers that I cut my teeth on.
My C is not very good - self taught using Pascal as my guide. My programs tend to look like Pascal, except with C tokens!
Most of my career was doing electronics at microcontroller level. I had a bit of a read about how the PC evolved from the 8088 to the '486. I *could not* believe how much of a kludge the thing was - even from the start! I found it just mind-boggling the effort that needed to be put in to maintain compatability with a system that was flawed from the outset.
But back to the subject - I agree that assembly makes for a much neater solution in the Kolibri world, AND, I certainly don't mean to push for C drivers in particular, but my personal approach would be 'code in C, get it working, translate to asm'. And I'd very likely leave step 3 to someone who knew what they were doing!
For such an outdated computer (laptop) as the one I am using, I don't expect anyone to write any code for it. What I would do (and will if I ever get enough time) is to 'port' the driver from linux (or at least use the code and comments applicable) to write something in C that works. That could have the benifit of allowing others who do know C (and not assembly) to write other things (drivers in particular) for Kolibri.
Cheers,
MM.
I consider myself reasonably good at assembly programmiing, and I had for many years (and sometimes still do) write assembler. But it was (and still is) for microcontrollers, a significantly different beast. I struggle to understand the addressing modes and mnemonics used for the 80xxx processors. Interestingly, it was actually Intel microcontrollers that I cut my teeth on.
My C is not very good - self taught using Pascal as my guide. My programs tend to look like Pascal, except with C tokens!
Most of my career was doing electronics at microcontroller level. I had a bit of a read about how the PC evolved from the 8088 to the '486. I *could not* believe how much of a kludge the thing was - even from the start! I found it just mind-boggling the effort that needed to be put in to maintain compatability with a system that was flawed from the outset.
But back to the subject - I agree that assembly makes for a much neater solution in the Kolibri world, AND, I certainly don't mean to push for C drivers in particular, but my personal approach would be 'code in C, get it working, translate to asm'. And I'd very likely leave step 3 to someone who knew what they were doing!
For such an outdated computer (laptop) as the one I am using, I don't expect anyone to write any code for it. What I would do (and will if I ever get enough time) is to 'port' the driver from linux (or at least use the code and comments applicable) to write something in C that works. That could have the benifit of allowing others who do know C (and not assembly) to write other things (drivers in particular) for Kolibri.
Cheers,
MM.
If you want to write a C driver for your sound card yourself you can take a look at the existing C audio driver for AMD Geode.
Последняя,ночная сборка (#5261), на IBM ThinkPad 600E приложения, использующие звуковую подсистему (AC97SND, игры Bomber, Ржавая земля и другие) грузят процессор на всю, при попытке закрыть приложение, закрывается лишь его окно, в диспетчере процессов процесс по прежнему остается и продолжает грузить процессор, при этом закрыть его нельзя, помогает лишь перегрузка ноутбука.
to infinity and beyond
А до этого звук работал? Или не работал никогда, просто раньше не висло?punk_joker wrote:Последняя,ночная сборка (#5261), на IBM ThinkPad 600E приложения, использующие звуковую подсистему (AC97SND, игры Bomber, Ржавая земля и другие) грузят процессор на всю, при попытке закрыть приложение, закрывается лишь его окно, в диспетчере процессов процесс по прежнему остается и продолжает грузить процессор, при этом закрыть его нельзя, помогает лишь перегрузка ноутбука.
Звук не работал и раньше. А висло или нет не знаю, не обращал внимание. Обратил внимание только когда игра Mario после добавления звука тоже стала грузить процессор.
to infinity and beyond
Ну выложи boardlog.txt после запуска AC97SND. Как будто вчера на форуме зарегистрировался, ей-Богуpunk_joker wrote:Звук не работал и раньше. А висло или нет не знаю, не обращал внимание. Обратил внимание только когда игра Mario после добавления звука тоже стала грузить процессор.
Логи boardlog и pcidev.
- Attachments
-
-
PCI_boardlog.7z (1.91 KiB)Downloaded 452 times
-
to infinity and beyond
Спасибо. Я перенёс твой пост в тему, соответствующую твоей звуковой карте Cirrus Logic CS4610/CS4239 (1013:6001). Об этих чипах именно в IBM ThinkPad 600E кое-что написано в интернете: http://www.thinkwiki.org/wiki/CS4610 и http://www.thinkwiki.org/wiki/Problem_w ... _ThinkPadspunk_joker wrote:Логи boardlog и pcidev.
Возможно, тебе поможет приведенное по этим линкам действие:
Если нет, то, возможно, Asper или CleverMouse что-нибудь придумают.Disable "Quick Boot" in your ThinkPad BIOS, otherwise the sound devices will not be activated by the BIOS. To enter the BIOS, press F1 before switching the ThinkPad on and until the first beep is heard.
Problem is in SB16 driver.
When sound.sys (sound driver loader) cannot find a supported PCI device, it loads sb16 driver as a last resort to give some sound.
SB16 driver is hardcoded to IRQ 5 while the CS card seems to be using IRQ B.
PS: reassembling SB16 driver with IRQ hardcoded to B instead of 5 might even result in sound it seems
When sound.sys (sound driver loader) cannot find a supported PCI device, it loads sb16 driver as a last resort to give some sound.
SB16 driver is hardcoded to IRQ 5 while the CS card seems to be using IRQ B.
PS: reassembling SB16 driver with IRQ hardcoded to B instead of 5 might even result in sound it seems
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
Who is online
Users browsing this forum: No registered users and 2 guests