Contribute
Register

G5 front panel headphone jack with AUTO SENSING

Joined
Mar 4, 2011
Messages
33
Motherboard
Gigabyte P55M-UD2
CPU
i7
Graphics
GT 630
Mac
iMac, MacBook, Mac Pro
Mobile Phone
iOS
Preface:
Font panel headphone jack auto sensing seems to a bit of a miracle when trying to mate a good old G5 panel with todays HD audio (Intel defined standard) mother board header.
And the more I was reading the more I got confused if anybody has been getting things to work without adding any active circuitry!
The HD Audio header requires isolated switches, normally open, the PowerMac G5 headphone socket sense switch is normally CLOSED and one leg is hardwired to the audio line (right channel), so these 2 schemes don´t match at all (in my mind).
My conclusion is:
a) by default the Mac G5 sensing switch does NOT comply to HD audio sensing
b) If you want things to work as auto detect (front to back and vice versa) you have to "translate" the sensing to make it work

A working solution I came up with:
I added a little Reed Relay, which is hooked up to the corresponding HD Audio control inputs (pin 7 and 10 of standard HD header) and drive this relay with a darlington NPN transistor switch.
The pull up resistor and the relay get 5V from an open USB pin header (+5V) (or any other motherboard pin feeding 5V. The base of the darlington is connected to the PowerMac G5 front panel audio sense pin (pin 15). With no head phone in the socket the normally CLOSED contact shortens the sense line to the audio out (right channel), so pin 17 of the panel header. So to make sure the relay is OFF I added bias resistors pulling the audio line to ground. (both lines for sake of symmetry)
So the function is simple: As soon as you plug in the headphone the sense line opens and is pulled up, the darlington turns on, relay is activated, HD audio detects headphone and you listen to your preferred music. Unplug the head set, audio reverts to the back panel and Mac OS recognizes the switching AUTOMATICALLY.
The same by the way in Windows.

Implementation:
I took a tiny bread board PCB (30mm*15mm) to hold the components, shrink tubed the whole thing and made it part of the front panel to motherboard harness so that it hides behind the DVD drive.

Circuit diagram:
Power mac G5 Front Panel Audio Autosensing.jpg

Notes:

There may be all solid state ways of doing this, yet the little reed relay was available and simple enough for me. I saw proposals with an optocoupler and also a CMOS analog switch, yet I have not seen confirmation for those to reliably work.
I decided for the darlington thing, because I wanted the DC biassing injected to the audio output to be as low as possible (the pull up is connected to 5V!)
I am very much open for suggestions to run this all solid state, just let me know!

Attachment
I have compiled a detailed pin out reference for G5 to ATX from the various sources I ran across, maybe this helps.
 

Attachments

neilhart

Moderator
Joined
May 25, 2010
Messages
2,739
Motherboard
ASRock Fatal1ty Z270 Gaming - ITX/ac
CPU
Intel i7-7700T (TDP: 35W)
Graphics
Gigabyte GTX960 2GB, ITX
Mac
MacBook, MacBook Pro
Mobile Phone
iOS
Preface:
Font panel headphone jack auto sensing seems to a bit of a miracle when trying to mate a good old G5 panel with todays HD audio (Intel defined standard) mother board header.
And the more I was reading the more I got confused if anybody has been getting things to work without adding any active circuitry!
The HD Audio header requires isolated switches, normally open, the PowerMac G5 headphone socket sense switch is normally CLOSED and one leg is hardwired to the audio line (right channel), so these 2 schemes don´t match at all (in my mind).
My conclusion is:
a) by default the Mac G5 sensing switch does NOT comply to HD audio sensing
b) If you want things to work as auto detect (front to back and vice versa) you have to "translate" the sensing to make it work

A working solution I came up with:
I added a little Reed Relay, which is hooked up to the corresponding HD Audio control inputs (pin 7 and 10 of standard HD header) and drive this relay with a darlington NPN transistor switch.
The pull up resistor and the relay get 5V from an open USB pin header (+5V) (or any other motherboard pin feeding 5V. The base of the darlington is connected to the PowerMac G5 front panel audio sense pin (pin 15). With no head phone in the socket the normally CLOSED contact shortens the sense line to the audio out (right channel), so pin 17 of the panel header. So to make sure the relay is OFF I added bias resistors pulling the audio line to ground. (both lines for sake of symmetry)
So the function is simple: As soon as you plug in the headphone the sense line opens and is pulled up, the darlington turns on, relay is activated, HD audio detects headphone and you listen to your preferred music. Unplug the head set, audio reverts to the back panel and Mac OS recognizes the switching AUTOMATICALLY.
The same by the way in Windows.

Implementation:
I took a tiny bread board PCB (30mm*15mm) to hold the components, shrink tubed the whole thing and made it part of the front panel to motherboard harness so that it hides behind the DVD drive.

Circuit diagram:
View attachment 304409

Notes:

There may be all solid state ways of doing this, yet the little reed relay was available and simple enough for me. I saw proposals with an optocoupler and also a CMOS analog switch, yet I have not seen confirmation for those to reliably work.
I decided for the darlington thing, because I wanted the DC biassing injected to the audio output to be as low as possible (the pull up is connected to 5V!)
I am very much open for suggestions to run this all solid state, just let me know!

Attachment
I have compiled a detailed pin out reference for G5 to ATX from the various sources I ran across, maybe this helps.


That is an excellent solution to the problem. You are one of the few hackers that have solved this problem and published your solution.

I took a different route on my SOS project: See post # 8 at https://www.tonymacx86.com/threads/neilharts-slow-roll-g5-power-mac-system-on-slides.129400/ .

Good modding,
neil
 
Joined
Dec 3, 2015
Messages
8
Motherboard
GA-Z97M-D3H
CPU
i5 4690K
Graphics
Intel
Mobile Phone
iOS
Here in my G5 hackintosh, the audio jack has never worked ok.
I'm using the AlohaCab.
 
Joined
Aug 26, 2015
Messages
85
Motherboard
ASUS Strix Z370- Wifi
CPU
i9-9900K
Graphics
Vega 64
Mac
MacBook Pro
Classic Mac
Power Mac
Mobile Phone
iOS
If you don't want to have all the hassle: I recommend to change your mainboard audio header to "AC'97" instead of "HD Audio"
Then it is always active (at least AFAIK in windows) and you can just choose your preferred audio output from the taskbar. If you plug in headphones it will play on your headphones as well as your primary output (lets say: USB-Soundcard)

I know that is not AUTO Sensing, but I can easily live with it.
Someone needs to test this under OSX but it should be the same...

Using BlackCH Cables btw
 
Top