// Original
While searching for a solution to turn on headphones for the CX20549 (Conexant Venice), I stumbled upon a solution for the ALC269 on the Ipis Forum (OS X on EeePCs):
http://ipis-osx.wikidot.com/forum/t-100527...ternal-speakers
The solution used there was to send verbs (or commands) to the driver through the developer utility called reggie_se. They turn on the headphone controls, turn on the headphone amplifier, and turn off the internal speakers to get audio.
For a beginning demonstration, people with CX20549 can try this:
CODE
sudo reggie_se -D PhysAddr -w 0x0103b080 -a 0xf4500060 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
This should turn off your speakers. (adjusting the volume or a reboot will bring everything back)
The way this works is you send a verb to the 0x60 offset (called the Immediate Command Output Interface) in the device memory address (which can be found in the IORegExplorer or through ioreg). Then you activate that command by sending 1 to the 0x68 offset (Immediate Command Status). A verb is a 32-bit sting that has the following structure:
Bits 31:28 are the Codec Address (0000 in our case, I think), bits [27:20] is the NID (in your codec dump), and then bits [19:0] is the verb command. Those last 20 bits are what are important, they are the command. For example the verb command 70500 sets the power state to D0 (to control power states you use the 0x705, followed by the state data and preceded by the Codec Address and NID). For example, if I want to set the headphones in CX20549 to the D0 state we do the following:
CODE
sudo reggie_se -D PhysAddr -w 0x01170500 -a 0xf4500060 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
If you do that for the first time (after a reboot lets say) you should hear a pop in your headphones (perhaps indicating that they were not powered on before as calling this command again does nothing). Note the Codec Address (CAd) is 0x0, NID is 0x11, verb ID 0x705 and D0 state 0x00. There are more verb commands and you can read about them in the High Definition Audio Specifications on Intel's site (Google it). The ones I think we need to concern ourselves with are:
Power State: 0x705
EAPD/BTL: 0x70c
Volume Knob Control: 0x70f
Pin Widget Control: 0x707
Amplifier Gain/Mute: 0x3 (followed by 16 bits instead of 8)
Now, I have been unable to switch over to the headphone output just yet. CX20549 seems significantly different to ALC269. For example the ALC269 has an EAPD pin on the headphone widget, but the CX20549 does not. I am also at at a loss of being able to turn on the internal speakers through reggie_se after turning them off. In fact, both the 0x3b000 (should turn on speakers) and 0x3b080 (should mute speakers) commands turn internal speakers off (for some odd reason I have not found out yet). I have not tried using Get commands yet, because I hoped everything was in the Linux codec dump, but it may not be. My biggest success is with the pop on the headphone Power State setting.
Any ideas or help with this would be appreciated. Also, if anyone with a EeePC with ALC269 could upload a Linux Codec dump, that would be great. The dump I found seems to be a bit odd and is poorly formatted
//
Solution:
This is a temporary solution to get headphones to output on the CX20549 (The commands below work for SubSysID 0x103C30CD and might be different for other SubSystem ID's If you have your codec dump, try getting the right NID's for your specific version and the correct memory address). Make sure AppleAzaliaAudio.kext is installed and you get output through your speakers. Also, you must install CHUD tools (or the entire Development Tools package). Run these commands in terminal:
CODE
sudo reggie_se -D PhysAddr -w 0x01170500 -a 0xf4500060 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
sudo reggie_se -D PhysAddr -w 0x011707c0 -a 0xf4500060 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
sudo reggie_se -D PhysAddr -w 0x0113b020 -a 0xf4500060 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
sudo reggie_se -D PhysAddr -w 0x011707c0 -a 0xf4500060 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
sudo reggie_se -D PhysAddr -w 0x0113b020 -a 0xf4500060 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
If you want the commands to turn off the speakers as well, add this:
CODE
sudo reggie_se -D PhysAddr -w 0x0103b080 -a 0xf4500060 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
sudo reggie_se -D PhysAddr -w 1 -a 0xf4500068 -B 32
(Note: I have reason to believe that if you get errors about not being able to write to that address, it could be the result of using a non-vanilla kernel that blocks this type of memory editing)
Also, note that you cannot use the standard volume controls to make the headphones louder. If you use the standard volume controls (if you make anything louder in them) you will turn on the internal speakers again if you turned them off (tell me if this doesn't work). To change volumes in headphones you have to use this command:
sudo reggie_se -D PhysAddr -w 0x0113b0xx -a 0xf4500060 -B 32
where xx is between 00 and 80 (80 is mute, but anything right below 80 is very loud). 00 is very very quiet (this was actually my original problem, I just couldn't hear that I turned the headphones on, or the speakers back on).
If you have problems turning you speakers back on, run this:
sudo reggie_se -D PhysAddr -w 0x0103b0xx -a 0xf4500060 -B 32
where xx is between 00 and 80 (80 is mute anything right below 80 is very loud , 00 is very quiet).
Note, that all this resets after reboot and sleep.
There is a problem however; I think pushing the Amplifiers like we are doing with these commands produces shitty quality, so there has to be another way to control volume without hurting the quality. Anyway, please test and tell me if I need to clarify anything, or if this even makes sense.
