Jump to content

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


zuus
 Share

982 posts in this topic

Recommended Posts

Audiodriverwriter you're the best!.

 

Will it work for my M-Audio Delta 1010 (Envy24) with external rack?.

 

I hope so :)

 

All my support for you!!!

 

 

Certainly not at first, but I have to look how different it is to the 1010LT (which should work). Please contact me when I have finished this driver. The 1010 and 1010LT use the Envy24 (non-HT). I am currently working on the HT, but after that I'll do the Envy24 driver.

Link to comment
Share on other sites

What about M-Audio Delta Audiophlie 2496?

 

The 2496 will be supported by my Envy24 driver.

 

Woohoo! It showed up in HalLab (an audio testing tool) and it actually played some kind of sound!! ^_^

It froze after that though with the sound looping, but that's quite 'normal' when developing an audio driver and running it for the first time.

Gonna try and fix it!

 

I'll keep you posted.

Link to comment
Share on other sites

The 2496 will be supported by my Envy24 driver.

 

Woohoo! It showed up in HalLab (an audio testing tool) and it actually played some kind of sound!! :)

It froze after that though with the sound looping, but that's quite 'normal' when developing an audio driver and running it for the first time.

Gonna try and fix it!

 

I'll keep you posted.

 

W00t, progress. i love it :)

 

Audiodriverwriter, i might have skipped the part about Envy24PT support, any news on that?

 

All the info i could find on this chipset: VIA Envy24PT w/ VIA VT1617A Codec, Wolfson WM8728 DAC - 8 Channel

Link to comment
Share on other sites

W00t, progress. i love it :D

 

Audiodriverwriter, i might have skipped the part about Envy24PT support, any news on that?

 

All the info i could find on this chipset: VIA Envy24PT w/ VIA VT1617A Codec, Wolfson WM8728 DAC - 8 Channel

 

 

The Envy24PT seems to have the same PCI device and vendor ID as the HT. That means that the driver will recognize it, but since the codecs are different, it will not work. I assume it's on a motherboard? In that case, I can not easily go out and buy one.

Link to comment
Share on other sites

The Envy24PT seems to have the same PCI device and vendor ID as the HT. That means that the driver will recognize it, but since the codecs are different, it will not work. I assume it's on a motherboard? In that case, I can not easily go out and buy one.

 

Yes, it's an onboard chipset. will give it a try if you can make a kext. thx for your help.

Link to comment
Share on other sites

I was just thinking of something : will asio be supported with your driver ? If yes, it would be incredible !!!

 

No, this is a CoreAudio driver.

 

Notes on the progress (warning, can be a bit too technical!) :

I seem to be having problems writing to the 2nd base address of the PCI device. The first (BAR 0) is going perfectly fine, but for some strange reason, an ioWrite32() to BAR1 doesn't do a thing. There seem to be some values set in the BAR1 range, so it might be that ioWrite8() works, but ioWrite32() doesn't. I need to investigate that further.

Anyway, that's probably the only thing that blocks this thing from working yet.

 

I'll keep you posted.

Link to comment
Share on other sites

Thanks for your answer, i just searched a little and found that there's no coreaudio mentioned about the juli@... Will i be able to work with it like i do with asio on windows (i will use reaper, maybe logic when i got enough money)

Link to comment
Share on other sites

Thanks for your answer, i just searched a little and found that there's no coreaudio mentioned about the juli@... Will i be able to work with it like i do with asio on windows (i will use reaper, maybe logic when i got enough money)

 

U can use reaper with linux(official supported) tooo! For "try"! Logic its enought a simle motherboard like ALC888 or 889 blabla

Link to comment
Share on other sites

i got an alc888 integrated chipset, but juli@ is a little bit different, if you know what i mean ... ^_^

 

"For "try"! Logic its enought",

so i mean just for TRY ES2

 

Anyway, if audriodriverwriter is finishd, we have the envy24 power for using full Logic

Link to comment
Share on other sites

Yeah, but audiodriverwriter is still a bit stuck! :rolleyes:

 

It seems that writing to BAR1 works now, but it still hangs at playback.

What I used to debug when writing drivers on other operating systems, was a serial cable between two computers. This way I could insert serial debug statements (synchronous) inside the interrupt handler. Now, nothing is written to the system log when using IOLog() in an interrupt handler (perhaps it's not even allowed!), even with the synchronous bit set in debug.iokit.

Anyone knows if a plain serial port (no USB!) works on these machines?

Link to comment
Share on other sites

Yeah, but audiodriverwriter is still a bit stuck! :D

 

It seems that writing to BAR1 works now, but it still hangs at playback.

What I used to debug when writing drivers on other operating systems, was a serial cable between two computers. This way I could insert serial debug statements (synchronous) inside the interrupt handler. Now, nothing is written to the system log when using IOLog() in an interrupt handler (perhaps it's not even allowed!), even with the synchronous bit set in debug.iokit.

Anyone knows if a plain serial port (no USB!) works on these machines?

 

I am not a developer, but maybe its help 4 u:

 

"

Well if you can connect to that device in Windows through Hyper Terminal, then u can use the "screen" command. After you find out the speed at which its COM port works, then you just need to find out the commands the windows app sends and manually type them after connecting to the board.

 

After you got all that working, then simply make a bunch of Apple scripts.

 

Example: My Router is connected to my comp using the COM1 port. I connect to it using either Hyperterminal or the Screen command in Mac. Its speed is set at 115200bps. It uses a linux kernel, so commands are not a problem. Heres what I do:

 

1) Open Terminal

2) Type in "screen /dev/tty1 115200"

3) Send commands to router

4) Quit by typing Apple+A and Apple+

"

 

The originap topic:

 

Serial Port Hardware Interfacing

 

audiodriverwriter, i don't think our hackintoshes support serial ports, but i don't know well...

 

I dont think so, because many industrial system use just serial port for programming or controlling the interfaces, like CNC machines etc..

The Mac osx is based on freebsd, so BSD system, i thing for get serial working is simple unix command in console. But "simple" for who know unix, not for me...:)

Link to comment
Share on other sites

Serial port works perfectly. I used dialup serial modem on AMD-based Hackintosh with "Tiger" and used Siemens ME45 via craddle as GPRS-modem on Intel-based Hackintosh with "Leo".

 

But!!! AMD-based variant must use flag "cpus=1", because 2 CPU cores crashed internet surfing. (10.4.8)

 

 

 

Good luck! ;)

 

 

Link to comment
Share on other sites

Ok, good to hear it works. Now I only need to know how I send messages to the serial port from C/C++ (so, no script or whatever) and if I can do that within an interrupt.

 

Anyway, I now have verified that all the registers of the Envy24HT chip on the hackintosh machine are the same as on my other system, right before sending the signal to start playing, so there can't be anything wrongly set-up now. By having serial debug in the interrupt handler I could find out if it enters the handler at all.

Link to comment
Share on other sites

Ok, good to hear it works. Now I only need to know how I send messages to the serial port from C/C++ (so, no script or whatever) and if I can do that within an interrupt.

 

Anyway, I now have verified that all the registers of the Envy24HT chip on the hackintosh machine are the same as on my other system, right before sending the signal to start playing, so there can't be anything wrongly set-up now. By having serial debug in the interrupt handler I could find out if it enters the handler at all.

 

Opening the Serial Port original link

 

 

OR u can search "serial port" at apple developer

 

 

To open a serial port, the MyOpenSerialPort function, shown in Listing 1-7, calls the open function, passing the device file path, as well as the following constants:

 

*

 

O_RDWR: open for reading and writing

*

 

O_NOCTTY: don’t assign a controlling terminal

*

 

O_NONBLOCK: allow subsequent I/O on the device to be nonblocking

 

These constants and the open and fcntl functions are defined in fcntl.h.

 

If open returns a valid file descriptor, MyOpenSerialPort performs the following additional steps:

 

1.

 

It calls the ioctl function, passing TIOCEXCL, to prevent additional opens on the device, except from a root-owned process.

2.

 

It calls the fcntl function, passing the value F_SETFL to clear the O_NONBLOCK flag so subsequent I/O will block.

3.

 

It calls the tcgetattr function to save the current file settings in the global static structure gOriginalTTYAttrs, of type termios. These values will be restored later by the MyCLoseSerialPort function (Listing 1-10). The termios structure and the tcgetattr and tcsetattr functions are defined in the header termios.h.

4.

 

It sets some fields of options, a local termios structure, using values defined in the header termios.h. These options specify, among other things, raw input mode, a one second timeout value for blocking reads, and input and output baud rates. MyOpenSerialPort then passes the options structure to the tcsetattr function to set new values for the serial port (the changes won’t take effect until the call to tcsetattr). The constant TCSANOW is also defined in termios.h, and indicates that the change should be made immediately.

5.

 

Finally, it returns the file descriptor obtained from the call to open.

 

You can find the headers mentioned in this section in header files in Kernel.framework, System.framework, or the directory /usr/include.

 

Listing 1-7 Opening the serial port specified by the passed device file

 

static int MyOpenSerialPort(const char *deviceFilePath)

 

{

 

int fileDescriptor = -1;

 

int handshake;

 

struct termios options;

 

 

 

// Open the serial port read/write, with no controlling terminal,

 

// and don't wait for a connection.

 

// The O_NONBLOCK flag also causes subsequent I/O on the device to

 

// be non-blocking.

 

// See open(2) ("man 2 open") for details.

 

 

 

fileDescriptor = open(deviceFilePath, O_RDWR | O_NOCTTY | O_NONBLOCK);

 

if (fileDescriptor == -1)

 

{

 

printf("Error opening serial port %s - %s(%d).\n",

 

deviceFilePath, strerror(errno), errno);

 

goto error;

 

}

 

 

 

// Note that open() follows POSIX semantics: multiple open() calls to

 

// the same file will succeed unless the TIOCEXCL ioctl is issued.

 

// This will prevent additional opens except by root-owned processes.

 

// See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details.

 

 

 

if (ioctl(fileDescriptor, TIOCEXCL) == kMyErrReturn)

 

{

 

printf("Error setting TIOCEXCL on %s - %s(%d).\n",

 

deviceFilePath, strerror(errno), errno);

 

goto error;

 

}

 

 

 

// Now that the device is open, clear the O_NONBLOCK flag so

 

// subsequent I/O will block.

 

// See fcntl(2) ("man 2 fcntl") for details.

 

 

 

if (fcntl(fileDescriptor, F_SETFL, 0) == kMyErrReturn)

 

{

 

printf("Error clearing O_NONBLOCK %s - %s(%d).\n",

 

deviceFilePath, strerror(errno), errno);

 

goto error;

 

}

 

 

 

// Get the current options and save them so we can restore the

 

// default settings later.

 

if (tcgetattr(fileDescriptor, &gOriginalTTYAttrs) == kMyErrReturn)

 

{

 

printf("Error getting tty attributes %s - %s(%d).\n",

 

deviceFilePath, strerror(errno), errno);

 

goto error;

 

}

 

 

 

// The serial port attributes such as timeouts and baud rate are set by

 

// modifying the termios structure and then calling tcsetattr to

 

// cause the changes to take effect. Note that the

 

// changes will not take effect without the tcsetattr() call.

 

// See tcsetattr(4) ("man 4 tcsetattr") for details.

 

 

 

options = gOriginalTTYAttrs;

 

 

 

// Print the current input and output baud rates.

 

// See tcsetattr(4) ("man 4 tcsetattr") for details.

 

 

 

printf("Current input baud rate is %d\n", (int) cfgetispeed(&options));

 

printf("Current output baud rate is %d\n", (int) cfgetospeed(&options));

 

 

 

// Set raw input (non-canonical) mode, with reads blocking until either

 

// a single character has been received or a one second timeout expires.

 

// See tcsetattr(4) ("man 4 tcsetattr") and termios(4) ("man 4 termios")

 

// for details.

 

 

 

cfmakeraw(&options);

 

options.c_cc[VMIN] = 1;

 

options.c_cc[VTIME] = 10;

 

 

 

// The baud rate, word length, and handshake options can be set as follows:

 

 

 

cfsetspeed(&options, B19200); // Set 19200 baud

 

options.c_cflag |= (CS7 |// Use 7 bit words

 

PARENB | // Enable parity (even parity if PARODD

 

// not also set)

 

CCTS_OFLOW | // CTS flow control of output

 

CRTS_IFLOW); // RTS flow control of input

 

 

 

// Print the new input and output baud rates.

 

 

 

printf("Input baud rate changed to %d\n", (int) cfgetispeed(&options));

 

printf("Output baud rate changed to %d\n", (int) cfgetospeed(&options));

 

 

 

// Cause the new options to take effect immediately.

 

if (tcsetattr(fileDescriptor, TCSANOW, &options) == kMyErrReturn)

 

{

 

printf("Error setting tty attributes %s - %s(%d).\n",

 

deviceFilePath, strerror(errno), errno);

 

goto error;

 

}

 

 

 

// To set the modem handshake lines, use the following ioctls.

 

// See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details.

 

 

 

if (ioctl(fileDescriptor, TIOCSDTR) == kMyErrReturn)

 

// Assert Data Terminal Ready (DTR)

 

{

 

printf("Error asserting DTR %s - %s(%d).\n",

 

deviceFilePath, strerror(errno), errno);

 

}

 

 

 

if (ioctl(fileDescriptor, TIOCCDTR) == kMyErrReturn)

 

// Clear Data Terminal Ready (DTR)

 

{

 

printf("Error clearing DTR %s - %s(%d).\n",

 

deviceFilePath, strerror(errno), errno);

 

}

 

 

 

handshake = TIOCM_DTR | TIOCM_RTS | TIOCM_CTS | TIOCM_DSR;

 

// Set the modem lines depending on the bits set in handshake.

 

if (ioctl(fileDescriptor, TIOCMSET, &handshake) == kMyErrReturn)

 

{

 

printf("Error setting handshake lines %s - %s(%d).\n",

 

deviceFilePath, strerror(errno), errno);

 

}

 

 

 

// To read the state of the modem lines, use the following ioctl.

 

// See tty(4) ("man 4 tty") and ioctl(2) ("man 2 ioctl") for details.

 

 

 

if (ioctl(fileDescriptor, TIOCMGET, &handshake) == kMyErrReturn)

 

// Store the state of the modem lines in handshake.

 

{

 

printf("Error getting handshake lines %s - %s(%d).\n",

 

deviceFilePath, strerror(errno), errno);

 

}

 

 

 

printf("Handshake lines currently set to %d\n", handshake);

 

 

 

// Success:

 

return fileDescriptor;

 

 

 

// Failure:

 

error:

 

if (fileDescriptor != kMyErrReturn)

 

{

 

close(fileDescriptor);

 

}

 

 

 

return -1;

 

}

Link to comment
Share on other sites

 Share

×
×
  • Create New...