Jump to content

ESI Juli@ / Envy 24 with OSX86 - Any progress?


  • Please log in to reply
971 replies to this topic

#101
audiodriverwriter

audiodriverwriter

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 318 posts
Thanks!

I also found something like kprintf() which is a kernel debug function which can output to serial, but you have to set some debug bit in the Open Firmware, but I'm not sure we have such thing (or emulation thereof). If that works, kprintf() looks a lot easier, otherwise I'll try your code!

#102
Pyroman

Pyroman

    InsanelyMac Protégé

  • Members
  • Pip
  • 20 posts

Thanks!

I also found something like kprintf() which is a kernel debug function which can output to serial, but you have to set some debug bit in the Open Firmware, but I'm not sure we have such thing (or emulation thereof). If that works, kprintf() looks a lot easier, otherwise I'll try your code!


Maximum you must build a new kernel...:P Good luck for this project, i thin kprintf() will work

#103
DaemonES

DaemonES

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 327 posts
  • Location:Kiev, Ukraine
Forget about serial. In audio driver you should work in primary interrupt context. If you will block for several milliseconds then you will gen an interrupt look up and crash of the system. You also should not use IOLog from interrupt routine, maybe firewire, but not sure.

Also remember about with OS X and multiple DMA mode in Envy24HT. You should use separate DMA buffer for each two channels.

#104
audiodriverwriter

audiodriverwriter

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 318 posts

Forget about serial. In audio driver you should work in primary interrupt context. If you will block for several milliseconds then you will gen an interrupt look up and crash of the system. You also should not use IOLog from interrupt routine, maybe firewire, but not sure.

Also remember about with OS X and multiple DMA mode in Envy24HT. You should use separate DMA buffer for each two channels.


Heh, but i need to know if it comes in the interrupt handler at all. Since it hangs after playback, I really need to know this. On other systems I can send strings to a serial line, which helps tremendously. Even if it locks up after that.

#105
DaemonES

DaemonES

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 327 posts
  • Location:Kiev, Ukraine
IOFilterInterruptEventSource should submit 2 callbacks. One which return bool (does interrupt is yours or not) - filter, second callback - handler would be called if filter returns true. So you may print from interrupt handler routine, but not from filter. Anyway, use GDB to analyze crash dumps.

#106
audiodriverwriter

audiodriverwriter

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 318 posts

IOFilterInterruptEventSource should submit 2 callbacks. One which return bool (does interrupt is yours or not) - filter, second callback - handler would be called if filter returns true. So you may print from interrupt handler routine, but not from filter. Anyway, use GDB to analyze crash dumps.



Since it freezes, I doubt there is a crash dump somewhere.
I tried again yesterday evening, even trying a registerInterrupt(), but nothing. I generated a sine wave with Audacity and it's surely playing the first part of that sine wave over and over again. So either I'm still doing something wrong, or there is another interrupt handler that doesn't pass the interrupt when it's not his interrupt.
I can try putting the card in another slot to see if that matters. I can also connect a MIDI device and see if it freezes when MIDI bytes are coming in (causing the same interrupt).

#107
audiodriverwriter

audiodriverwriter

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 318 posts
Ok, learned a couple of things...
I inserted a CMI8738 card in the slot as the Phase22 was and put a Revo5.1 in another PCI slot.
Added IOLog() calls in the CMI8738 driver's interruptFilter() and interruptHandler() routines (I know, I may not do this in the filter). Both of them were printed (of course with a small delay), so for testing it should be 'safe'.
With the CMI card at the slot of the Phase22, it can't be interrupt hijacking either, so, back to debugging I guess...

#108
audiodriverwriter

audiodriverwriter

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 318 posts
Cool! I got it to play and stop without freezing! This is looking good! :(

#109
blink41

blink41

    InsanelyMac Protégé

  • Members
  • Pip
  • 37 posts
You make amazing progress !!! It's really nice to hear that you progress, thank you !

#110
audiodriverwriter

audiodriverwriter

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 318 posts
Yes, it's now playing a stereo sample correctly in Audacity. I can stop, play again etc.

Now I have to do the boring stuff: add volume controls, make sure it can be unloaded, deal with multi-channel settings per sound card model etc.

#111
blink41

blink41

    InsanelyMac Protégé

  • Members
  • Pip
  • 37 posts
Well, good luck !

#112
Kotman

Kotman

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts
2 Audiodriverwriter

Wow!!! Very good news about driver! :)

May be You upload for us a test version of Your work?

I think it will be a powerfull test with different soundcards based on ENVY24HT.

#113
audiodriverwriter

audiodriverwriter

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 318 posts

2 Audiodriverwriter

Wow!!! Very good news about driver! :)

May be You upload for us a test version of Your work?

I think it will be a powerfull test with different soundcards based on ENVY24HT.



Thanks!
There are currently two problems preventing that:
1) reading of the eeprom where the exact model is stored (for example, m-audio revo 5.1, 7.1, julia) can sometimes give incorrect results. That can result in a freeze.
2) for some reason, loading the driver/.kext twice results in that performAudioEngineStart() is not called the 2nd time. When booting normally, it seems to always load the driver twice, so you don't hear a thing. I always boot in safe mode to prevent this.

I'd love to share it with you, but right now that would cause too much complaints or disappointment. Tonight I'll continue my work on the driver.

#114
Kotman

Kotman

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts
2 Audiodriverwriter

I can read a dump of eeprom, If You need it for this work. I have Revo 5.1

#115
greyanaroth

greyanaroth

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 3 posts
I have an ESI1010, and really wanted to test out logic on my hackintosh which i JUST got working!

I also, very smartly, installed the mac driver for the card and nuked my osx.

It's constantly asking me to restart during boot!!! Like a window pops up and asks me to restart!

Trying safe mode, looks like audio wont work :-(

I'm really praying for your success audiodriverwriter! Crazy stuff you're doing here!

edit: Mac started up in safe mode. Moved "ESI Settings" to trash. I'm a bit new to a mac. Not booting normally. Need to reinstall :-( First time!

But damned lame about audio drivers! Damn!

#116
Kotman

Kotman

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts
2 greyanaroth

Read forums cearefully :(

IMac's dosn't have any PCI slots. MacPro has only PCI-e slots. Our soundcards can't work natively on this computers. The oficial drivers for this cards are PPC Mac version. Of course they crashes Your Hackintosh.

Delete manualy ESI kext, which was installed in . /System/Library/Extensions

Make it in single user mode (boot with -s flag).

#117
audiodriverwriter

audiodriverwriter

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 318 posts

2 Audiodriverwriter

I can read a dump of eeprom, If You need it for this work. I have Revo 5.1



Hi,

I actually need working code to read the eeprom. Actually, my code worked on the AmigaOne computer I wrote this driver for as well, but there seems to be a timing issue of some sort.
So, I'm not sure if you have what I need, since if you do, you would have an Envy24HT driver already! :D
Edit: reading the eeprom twice results in the correct bytes, funny.

@greyanaroth

Please read my previous posts on which cards I will support. ESI1010 is not one of them. It is perhaps possible to add support later, but I usually need the physical device here, otherwise development is real hard. Oh, and Envy24HT is not the same as the Envy24 (I'll add support for some Envy24 cards when I finish the HT one).

#118
Kotman

Kotman

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts
2 Audiodriverwriter

I'm sorry, My English is very poor.

My friend has a IC-programmator. With it I can read a dump of eeprom and save as file.

You need this dump. Am I right?

#119
audiodriverwriter

audiodriverwriter

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 318 posts

2 Audiodriverwriter

I'm sorry, My English is very poor.

My friend has a IC-programmator. With it I can read a dump of eeprom and save as file.

You need this dump. Am I right?


No need to be sorry, I am bad at explaining! ;)
No, I don't need the dump. I know exactly what's in the eeprom. It's just that I need to read the eeprom from code using the Envy's I2C lines, since the first 4 bytes contain the exact model ID. Depending on the model ID, I initialize specific codecs and controls for that model alone. But it seems to be reliable now when I read it twice.

But thanks for trying to help anyway, I appreciate it!

#120
Kotman

Kotman

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts
2 Audiodriverwriter

Aaa! Now I understand You! ;)

I'll go to study English again. :thumbsup_anim:

Good luck in Your work! :)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy