Brandon2004 Posted March 19, 2006 Share Posted March 19, 2006 Ok...so...this is wierd, can some body tell me if the ati sound cards are the same in the x200 chipsets how come some people have a realtek and some people have conexant does it have to do with like desktop or laptop or...is the problem how the southbridge adresses the sound card I am a little confused as to how a fix for realtek cards is gonna help those with conexant cards or vice versa...or am i just like a complete retard and totally off base...sorry if this sounds noobish... Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79069 Share on other sites More sharing options...
EdFlyer Posted March 19, 2006 Share Posted March 19, 2006 actually brandon, ur right on, and that seems to be the problem i just ran into. It appears the desktop chips use and realtek ALC655 codec, and the notebooks use something else, but both have vendor id as 1002 4370, which is from ATI. It would also seem that at least some of the Intel ICH series use the same codec chip. This leads to an interesting problem about developing the driver, the key is to figure out exactly what system is similar to the SB400 chip, and see how that driver developed in other OS's like linux or *bsd and then develop in the same way for MAC OS. That's the research that has been occupying me for the last couple hours. I have some def specs and pdf's to leaf through to see if there are similarities that can be exploited, otherwise this driver is going to have to come from total scratch. Since I am on a laptop there's only certain things I can test, so when the time comes, we're gonna need some people with the desktop versions to test the driver, and yeah, that's what Im to up to right now. Its possible code started by scousi may be able to be finished by me, but I still need to get his source code that he started to finish it. Hopefully this can be a nice collaborative effort. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79077 Share on other sites More sharing options...
fireshark Posted March 20, 2006 Share Posted March 20, 2006 if anyoes needs to know, I have a laptop (HP) and its 4370 with the ATI, and its Conexant audio. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79084 Share on other sites More sharing options...
EdFlyer Posted March 20, 2006 Share Posted March 20, 2006 fireshark, can u figure out if its an actual conexant codec chip, or a realtek chip being loaded by the Conexant AMC Audio driver. also i've noticed the x64 windows driver is supplied by ATI. Does anyone know a way of determining exactly what codec chip the computer uses, possibly from windows or linux? Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79100 Share on other sites More sharing options...
scousi Posted March 20, 2006 Share Posted March 20, 2006 fireshark, can u figure out if its an actual conexant codec chip, or a realtek chip being loaded by the Conexant AMC Audio driver. also i've noticed the x64 windows driver is supplied by ATI. Does anyone know a way of determining exactly what codec chip the computer uses, possibly from windows or linux? Mine is the Realtek 255. EdFlyer, I'm still looking for the code I had. I has lost my HD but i know that the I have a backup. The question is where did I put the backup! Duhh! BTW, did you ever manage to get the Interrupts captured? Are you using IO mapping or Memory mapping? I only have BAR0 availiable on my device. Do you have any other BARS on yours? Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79174 Share on other sites More sharing options...
Nick Jacholson Posted March 20, 2006 Share Posted March 20, 2006 Hi Ed, I don´t know i´ve it would help you, but when I load the konoppix 4.0.2 my sound works well. But i´m not so into linux to post you the log you need. I´ve u would give me a little bit advice I would look it up for you. Or you just DL the Knoppix by your self. Hope it helped. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79298 Share on other sites More sharing options...
EdFlyer Posted March 20, 2006 Share Posted March 20, 2006 i'm not 100% sure what's going with my driver.....i think my problem may be in the interrupts, but i don't know. I'd like to get a working log of the linux driver to see what's done in what order and compare that. Unfortunately college classes are getting in the way of the driver development, but I'll have free time later. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79422 Share on other sites More sharing options...
dimbulb Posted March 20, 2006 Share Posted March 20, 2006 Ed: What sort of data do you need? Just a dmesg and lspci? Or do you need something from /proc? If necessary, I can put my laptop with the x200 board somewhere you can get at it via ssh. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79669 Share on other sites More sharing options...
EdFlyer Posted March 20, 2006 Share Posted March 20, 2006 the boot log from when the driver loads in linux is what i'm looking for. I would like to trace what happens, and in what order, so that I can make sure the driver's loading the right stuff in the correct order. oh scousi, im not sure what you meant with the interrupts, but it seems to attach correctly to irq 17 with an io of 3400, but I'm not sure entirely the meaning of the io number. alright, im off to more debugging and coding. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79686 Share on other sites More sharing options...
scousi Posted March 20, 2006 Share Posted March 20, 2006 the boot log from when the driver loads in linux is what i'm looking for. I would like to trace what happens, and in what order, so that I can make sure the driver's loading the right stuff in the correct order. oh scousi, im not sure what you meant with the interrupts, but it seems to attach correctly to irq 17 with an io of 3400, but I'm not sure entirely the meaning of the io number. alright, im off to more debugging and coding. Your best bet is to look at the linux atiixp source code (attached) and the ALSA documentation. There is a lot of similarities between Linux and Macs initialize PCI card drivers. With the IXP, you need the interrupt to detect the 3 codec devices. You will have to learn on how the read and write to the ATI registers. The atiixp.c module has all the register offsets defined. You will need these since there is no public ATI documentation. The driver will never work unless you set up the proper framework to read and write to the proper registers. You have to service the interrups that the card generates. The trick is to set up your DMA or IO access correctly. You absolutely need the proper offsets and status bits. That's why you will find the values defined in the atiixp module quite usefull. Also get this: ftp://ftp.apple.com/developer/Tool_Chest/.../CHUD_4.3.2.dmg CHUD tools. There is a utility in there called Regie SE that allows you to view all the low level stuff. You can read and write the registers if you know the proper offsets. Good luck. the atiixp.txt is actually atiixp.c but they won't let me upload a .c file for some reason. atiixp.txt Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79719 Share on other sites More sharing options...
EdFlyer Posted March 20, 2006 Share Posted March 20, 2006 yeah, i've been working off that for a while, my problem is there is an access timeout that occurs when the code checks to see if the ac-link is not busy. i was hoping for a boot log from linux to see if I had loaded something the wrong or at the wrong time or in the wrong order. i shall continue testing this evening. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79744 Share on other sites More sharing options...
EdFlyer Posted March 20, 2006 Share Posted March 20, 2006 the chud tools just caused a kernel panic so..yeah, i won't be able to use that. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79759 Share on other sites More sharing options...
scousi Posted March 21, 2006 Share Posted March 21, 2006 the chud tools just caused a kernel panicso..yeah, i won't be able to use that. Was it the installation itself or the Reggie SE application? It works OK on 2 computers. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79783 Share on other sites More sharing options...
EdFlyer Posted March 21, 2006 Share Posted March 21, 2006 it was the kext files it loaded that crashed the system Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79790 Share on other sites More sharing options...
dimbulb Posted March 21, 2006 Share Posted March 21, 2006 Here's the part of the dmesg which seams to correspond to sound initialization: Advanced Linux Sound Architecture Driver Version 1.0.10rc3 (Mon Nov 07 13:30:21 2005 UTC). ACPI: PCI Interrupt 0000:00:14.5[B] -> GSI 17 (level, low) -> IRQ 209 ACPI: PCI Interrupt 0000:00:14.6[B] -> GSI 17 (level, low) -> IRQ 209 MC'97 0 converters and GPIO not ready (0x1) ALSA device list: #0: ATI IXP rev 1 with unknown codec at 0xb0003400, irq 209 #1: ATI IXP Modem rev 1 at 0xb0003800, irq 209 I'm not sure if there's more to it, so I'm including the full dmesg in case there's something else. I installed this kernel late last week, and sound is working on it. dmesg.txt Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-79835 Share on other sites More sharing options...
quickslvr1287 Posted March 22, 2006 Share Posted March 22, 2006 hey guys I'm not as smart as you guys as far as the coding and debugging for the driver goes, but if you can think of any way I could help you out, let me know. It doesnt feel right to just sit here and wait for you guys to finish and then just reap the rewards for doing nothing Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-80821 Share on other sites More sharing options...
Geek Posted March 23, 2006 Share Posted March 23, 2006 I am very excited to see what comes of this again the last thing not working is my ati ac97 sound....best of luck to you brave fellows Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-81312 Share on other sites More sharing options...
Peter Gammelgaard Posted March 26, 2006 Share Posted March 26, 2006 Any news in this projekt? Is the homepage up soon, or!? I'm just curious.. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-83205 Share on other sites More sharing options...
scousi Posted March 27, 2006 Share Posted March 27, 2006 Any news in this projekt? Is the homepage up soon, or!? I'm just curious.. I've been working on it lately. I found my backup of the source code. The problem I'm having so far is getting the device to fire interrupts and mapping the DMA buffers to the device. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-83839 Share on other sites More sharing options...
scousi Posted March 28, 2006 Share Posted March 28, 2006 I've been working on it lately. I found my backup of the source code. The problem I'm having so far is getting the device to fire interrupts and mapping the DMA buffers to the device. Here's the source code if anyone want to take a look. It doesn't work however. ati.tar.gz Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-84247 Share on other sites More sharing options...
EdFlyer Posted March 29, 2006 Share Posted March 29, 2006 well, i've been working off scousi's and mine source code and checking against the linux code. I've run into an interesting problem where there's an infinite loop occuring, but its not occuring in the code that we developed, but in the code that came from Apple. So, hopefully is a matter of figuring out where the loop is originally called from, and then tracing the steps that cause that. The good news is that the river is loading more or less and that we can control volume, but anytime it attmpets to play a sound it hits the inifite loop, so that's the current status for the curious. Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-85210 Share on other sites More sharing options...
digicide Posted March 29, 2006 Share Posted March 29, 2006 thanks! I love updates-- I think I check this thread about once an hour. it sounds like you're close. once I get garageband installed, i'm naming my mac drive 'scousi' and my windows drive 'edflyer' so they'll be right there on the desktop all the time and i'll never forget the blood sweat and tears sacrificed for my hackintosh.... Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-85306 Share on other sites More sharing options...
kaveman Posted March 29, 2006 Share Posted March 29, 2006 hey digicide.... you know you can actually subscribe to the topic to get an email whenever there is a new post doncha? Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-85326 Share on other sites More sharing options...
scousi Posted March 30, 2006 Share Posted March 30, 2006 well, i've been working off scousi's and mine source code and checking against the linux code. I've run into an interesting problem where there's an infinite loop occuring, but its not occuring in the code that we developed, but in the code that came from Apple. So, hopefully is a matter of figuring out where the loop is originally called from, and then tracing the steps that cause that. The good news is that the river is loading more or less and that we can control volume, but anytime it attmpets to play a sound it hits the inifite loop, so that's the current status for the curious. Can you send me what you are talking about? (PM). I've cleaned up my code a liitle by actually using the Linux functions. (Sorry about the mess but this is a hack, no QA on my back). I don't have the master volume working either. The driver isn't actually crashing. Another weirdness is that DebugLog only logs when it's called from code within AppleAC97AudioATIIXP.cpp module. THe DMA mappings just don't seem to happen. We must find a way to kick-start the whole thing. I'm also a little suspicious about the source since it didn't compile without any tweaks. I have enclosed an update to the code. The problem I'm having is this: Mar 29 21:26:02 MACPortable kernel[0]: AppleAC97AudioATIIXP::startDMAEngine[1] Mar 29 21:26:02 MACPortable kernel[0]: AppleAC97AudioATIIXP::startDMAEngine[1] IS ALREADY RUNNING Mar 29 21:26:02 MACPortable kernel[0]: HW Position = 0x102d50b4 engine ID = 0x1,REG=0xc Mar 29 21:26:02 MACPortable kernel[0]: LINKPTR = 0x106a1001 Mar 29 21:26:02 MACPortable kernel[0]: START = 0x102d5000 Mar 29 21:26:02 MACPortable kernel[0]: NEXT = 0x21b6800c Mar 29 21:26:02 MACPortable kernel[0]: CUR = 0x102d50b4 Mar 29 21:26:02 MACPortable kernel[0]: SZ = 0x8000400 Mar 29 21:26:02 MACPortable kernel[0]: HW Position = 0x102d50b4 engine ID = 0x1,REG=0xc Mar 29 21:26:02 MACPortable kernel[0]: LINKPTR = 0x106a1001 Mar 29 21:26:02 MACPortable kernel[0]: START = 0x102d5000 Mar 29 21:26:02 MACPortable kernel[0]: NEXT = 0x21b6800c Mar 29 21:26:02 MACPortable kernel[0]: CUR = 0x102d50b4 Mar 29 21:26:02 MACPortable kernel[0]: SZ = 0x8000400 Mar 29 21:26:02 MACPortable kernel[0]: AppleAC97AudioATIIXP::startDMAEngine[1] Mar 29 21:26:02 MACPortable kernel[0]: AppleAC97AudioATIIXP::startDMAEngine[1] IS ALREADY RUNNING Mar 29 21:26:02 MACPortable kernel[0]: HW Position = 0x102d50b4 engine ID = 0x1,REG=0xc Mar 29 21:26:02 MACPortable kernel[0]: LINKPTR = 0x106a1001 Mar 29 21:26:02 MACPortable kernel[0]: START = 0x102d5000 Mar 29 21:26:02 MACPortable kernel[0]: NEXT = 0x21b6800c Mar 29 21:26:02 MACPortable kernel[0]: CUR = 0x102d50b4 Mar 29 21:26:02 MACPortable kernel[0]: SZ = 0x8000400 Mar 29 21:26:02 MACPortable kernel[0]: HW Position = 0x102d50b4 engine ID = 0x1,REG=0xc Mar 29 21:26:02 MACPortable kernel[0]: LINKPTR = 0x106a1001 Mar 29 21:26:02 MACPortable kernel[0]: START = 0x102d5000 Mar 29 21:26:02 MACPortable kernel[0]: NEXT = 0x21b6800c Mar 29 21:26:02 MACPortable kernel[0]: CUR = 0x102d50b4 Mar 29 21:26:02 MACPortable kernel[0]: SZ = 0x8000400 Mar 29 21:26:03 MACPortable kernel[0]: AppleAC97AudioATIIXP::startDMAEngine[1] Mar 29 21:26:03 MACPortable kernel[0]: AppleAC97AudioATIIXP::startDMAEngine[1] IS ALREADY RUNNING Mar 29 21:26:03 MACPortable kernel[0]: HW Position = 0x102d50b4 engine ID = 0x1,REG=0xc Mar 29 21:26:03 MACPortable kernel[0]: LINKPTR = 0x106a1001 Mar 29 21:26:03 MACPortable kernel[0]: START = 0x102d5000 Mar 29 21:26:03 MACPortable kernel[0]: NEXT = 0x21b6800c Mar 29 21:26:03 MACPortable kernel[0]: CUR = 0x102d50b4 Mar 29 21:26:03 MACPortable kernel[0]: SZ = 0x8000400 Mar 29 21:26:03 MACPortable kernel[0]: HW Position = 0x102d50b4 engine ID = 0x1,REG=0xc Mar 29 21:26:03 MACPortable kernel[0]: LINKPTR = 0x106a1001 Mar 29 21:26:03 MACPortable kernel[0]: START = 0x102d5000 Mar 29 21:26:03 MACPortable kernel[0]: NEXT = 0x21b6800c Mar 29 21:26:03 MACPortable kernel[0]: CUR = 0x102d50b4 Mar 29 21:26:03 MACPortable kernel[0]: SZ = 0x8000400 Mar 29 21:26:03 MACPortable kernel[0]: AppleAC97AudioATIIXP::startDMAEngine[1] Mar 29 21:26:03 MACPortable kernel[0]: AppleAC97AudioATIIXP::startDMAEngine[1] IS ALREADY RUNNING Mar 29 21:26:03 MACPortable kernel[0]: HW Position = 0x102d50b4 engine ID = 0x1,REG=0xc Mar 29 21:26:03 MACPortable kernel[0]: LINKPTR = 0x106a1001 Mar 29 21:26:03 MACPortable kernel[0]: START = 0x102d5000 Mar 29 21:26:03 MACPortable kernel[0]: NEXT = 0x21b6800c Mar 29 21:26:03 MACPortable kernel[0]: CUR = 0x102d50b4 Mar 29 21:26:03 MACPortable kernel[0]: SZ = 0x8000400 Mar 29 21:26:03 MACPortable kernel[0]: HW Position = 0x102d50b4 engine ID = 0x1,REG=0xc Mar 29 21:26:03 MACPortable kernel[0]: LINKPTR = 0x106a1001 Mar 29 21:26:03 MACPortable kernel[0]: START = 0x102d5000 Mar 29 21:26:03 MACPortable kernel[0]: NEXT = 0x21b6800c Mar 29 21:26:03 MACPortable kernel[0]: CUR = 0x102d50b4 Mar 29 21:26:03 MACPortable kernel[0]: SZ = 0x8000400 Mar 29 21:26:03 MACPortable kernel[0]: AppleAC97AudioATIIXP::startDMAEngine[1] Mar 29 21:26:03 MACPortable kernel[0]: AppleAC97AudioATIIXP::startDMAEngine[1] IS ALREADY RUNNING Mar 29 21:26:03 MACPortable kernel[0]: HW Position = 0x102d50b4 engine ID = 0x1,REG=0xc Mar 29 21:26:03 MACPortable kernel[0]: LINKPTR = 0x106a1001 Mar 29 21:26:03 MACPortable kernel[0]: START = 0x102d5000 Mar 29 21:26:03 MACPortable kernel[0]: NEXT = 0x21b6800c Mar 29 21:26:03 MACPortable kernel[0]: CUR = 0x102d50b4 Mar 29 21:26:03 MACPortable kernel[0]: SZ = 0x8000400 Mar 29 21:26:03 MACPortable kernel[0]: HW Position = 0x102d50b4 engine ID = 0x1,REG=0xc Mar 29 21:26:03 MACPortable kernel[0]: LINKPTR = 0x106a1001 Mar 29 21:26:03 MACPortable kernel[0]: START = 0x102d5000 Mar 29 21:26:03 MACPortable kernel[0]: NEXT = 0x21b6800c Mar 29 21:26:03 MACPortable kernel[0]: CUR = 0x102d50b4 Mar 29 21:26:03 MACPortable kernel[0]: SZ = 0x8000400 ati_snd.tar.gz Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-85491 Share on other sites More sharing options...
EdFlyer Posted March 30, 2006 Share Posted March 30, 2006 that engine running problem is the one i've run into, once I get back on my laptop tomorrow, I'll upload the .cpp file that's relevent. Yeah, We need to figure out how to have the dma shutdown properly after the codecs are initialized, so that when the OS calls it, it isn't already running, because it shuoldn't. Hopefully we can get this solved. Too bad the other driver projects aren't getting this amount of collaboration. that's all for now -ed Link to comment https://www.insanelymac.com/forum/topic/10903-ati-ac-97-sounds-sb400-effort/page/2/#findComment-85560 Share on other sites More sharing options...
Recommended Posts