Jump to content

Intel HDA Audio Codec STA9274D


AlainTox714
 Share

261 posts in this topic

Recommended Posts

Alain, thanks again for your great work on this! I have a question about the volume level and if it is customizable. Using your extensions, when adjusting the volume level, it seems to climb like an exponential curve. Of the 16 or so volume levels, it seems like the first 10 barely change the volume and each of the last 4 change it quite dramatically. Is there any way to smooth this out so the volume increments are more equal across the entire range?

Link to comment
Share on other sites

How could I go about making a linux codec dump?

 

1) Get your favorite Linux Live ISO and burn it to disc.

 

2) Boot of the disc.

Open the terminal and type this:

cat /proc/asound/card0/codec#0

 

Sometimes "codec" itself is another directory, so you would do something similar to this:

cat /proc/asound/card0/codec97#0/ac97#0-0

 

The name of your card may vary.

 

3) When you find it the terminal will scroll through the data.

Copy the data and paste it into a text document and save it as CodecDump.txt.

 

4) Send to yourself an email with the CodecDump.txt file attached.

 

4) Boot into OS X and then read your mail to get the file.

Link to comment
Share on other sites

Alain, thanks again for your great work on this! I have a question about the volume level and if it is customizable. Using your extensions, when adjusting the volume level, it seems to climb like an exponential curve. Of the 16 or so volume levels, it seems like the first 10 barely change the volume and each of the last 4 change it quite dramatically. Is there any way to smooth this out so the volume increments are more equal across the entire range?

 

I just check for me it sound normal, every sound system level use a logarithmic curve even potentiometer did.

Link to comment
Share on other sites

Take a look at this thread, could help.

 

http://forum.insanelymac.com/index.php?s=&...st&p=170168

Both of you if you got time please make a Linux Codec Dump of your mobo and upload it.

 

So i will look at it.

 

Okay I have a Sigmatel STAC9271 codec, I installed this:

http://forum.insanelymac.com/index.php?showtopic=97201

and now in system preferences I have "HD Audio Device" and I can adjust volume, but I am still not getting any sound from any of my ports (pink, green, blue, black, or orange)

I no longer have any devices listed in system profiler.

Link to comment
Share on other sites

Okay I have a Sigmatel STAC9271 codec, I installed this:

http://forum.insanelymac.com/index.php?showtopic=97201

and now in system preferences I have "HD Audio Device" and I can adjust volume, but I am still not getting any sound from any of my ports (pink, green, blue, black, or orange)

I no longer have any devices listed in system profiler.

 

Why you didn't just try the:

 

STAC9271D.v7.zip ( 291.56K ) Number of downloads: 81

 

in the first post of this thread?

 

It shoulds works!

Link to comment
Share on other sites

Hi Alain,

 

I have one quick question as I have been following this thread and with your guide I have my sound working great. Thanks a million!!!

 

The one question I have is My sound works but I cannot get all 5 working at the same time. If I switch to HEADPHONES the 2 work and if I switch to Line out the other 3 work. Is there away to get them all working together?

 

Thanks For all your help.

 

Xwing

Link to comment
Share on other sites

Hi Alain,

 

I have one quick question as I have been following this thread and with your guide I have my sound working great. Thanks a million!!!

 

The one question I have is My sound works but I cannot get all 5 working at the same time. If I switch to HEADPHONES the 2 work and if I switch to Line out the other 3 work. Is there away to get them all working together?

 

Thanks For all your help.

 

Xwing

 

Not shure it could be possible, Apple Audio System Preferences is not build fot that.

But with "Audio MIDI Setup.app" in utilities folder you can agregate Outputs, just try.

Otherwise what do you want to do?

Link to comment
Share on other sites

Guest BuildSmart

Audio should not be so complicated, having to use another extension to load information into the system makes no sense when most of you are already using a device-property string for graphics or using a modified DSDT so you may as well save resources.

 

HDAEnabler.kext and/or ALCinject.kext are not required to make audio work properly.

 

What is needed is AlainTox714's AppleHDA.kext and the following 3 peices of information:

  1. layout-id
  2. codec-id
  3. PinConfigurations

You can do it through a device-property string or through DSDT (this can yield a better result).

 

I've tried both methods and they yielded working audio, but the DSDT solution seems to be more ACPI compliant.

 

You can make the PinConfigurations data if you have the ConfigData in the /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAController.kext/Contents/Info.plist file.

 

(you only need the last bite from each segment)

<00a71c1f 00a71d40 00a71e21 00a71f02 00b71c40 00b71d90 00b71ea1 00b71f02 00c71c2e 00c71d30 00c71e81 00c71f01 00d71c10 00d71d40 00d71e11 00d71f01 00e71c20 00e71d90 00e71ea1 00e71f01 00f71c12 00f71d10 00f71e11 00f71f01 01071c11 01071d70 01071e11 01071f01 02171c50 02171d21 02171e45 02171f01>

 

Another solution is to search the codec file for lines that contain [Jack], take the hex values and reverse the order, order them by their node number.

Codec: SigmaTel STAC9274D
Address: 2
Vendor Id: 0x83847621
Subsystem Id: 0x80860419
Revision Id: 0x100201
Default PCM: rates 0x7e0, bits 0x0e, types 0x1
Default Amp-In caps: ofs=0x00, nsteps=0x0e, stepsize=0x05, mute=0
Default Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x02, mute=1

Node 0x0a [Pin Complex] wcaps 0x400181: Stereo
 Pin Default 0x0221401f: [Jack] HP Out at Ext Front
Conn = 1/8, Color = Green
becomes 1f402101
00a71c1f 00a71d40 00a71e21 00a71f02

Node 0x0b [Pin Complex] wcaps 0x400181: Stereo
 Pin Default 0x02a19040: [Jack] Mic at Ext Front
Conn = 1/8, Color = Pink
becomes 4090a102
00b71c40 00b71d90 00b71ea1 00b71f02

Node 0x0c [Pin Complex] wcaps 0x400181: Stereo
 Pin Default 0x0181302e: [Jack] Line In at Ext Rear
Conn = 1/8, Color = Blue
becomes 2e308101
00c71c2e 00c71d30 00c71e81 00c71f01

Node 0x0d [Pin Complex] wcaps 0x400181: Stereo
 Pin Default 0x01114010: [Jack] Speaker at Ext Rear
Conn = 1/8, Color = Green
becomes 10401101
00d71c10 00d71d40 00d71e11 00d71f01

Node 0x0e [Pin Complex] wcaps 0x400181: Stereo
 Pin Default 0x01a19020: [Jack] Mic at Ext Rear
Conn = 1/8, Color = Pink
becomes 2090a101
00e71c20 00e71d90 00e71ea1 00e71f01

Node 0x0f [Pin Complex] wcaps 0x400181: Stereo
 Pin Default 0x01111012: [Jack] Speaker at Ext Rear
Conn = 1/8, Color = Black
becomes 12101101
00f71c12 00f71d10 00f71e11 00f71f01

Node 0x10 [Pin Complex] wcaps 0x400181: Stereo
 Pin Default 0x01117011: [Jack] Speaker at Ext Rear
Conn = 1/8, Color = Yellow
becomes 11701101
01071c11 01071d70 01071e11 01071f01

Node 0x21 [Pin Complex] wcaps 0x400301: Stereo Digital
 Pin Default 0x01452150: [Jack] SPDIF Out at Ext Rear
Conn = Optical, Color = Grey
becomes 50214501
02171c50 02171d21 02171e45 02171f01

 

Using the PinConfigurations data you can convert it for your device-property string XML file using the following command:

echo "1f4021014090a1022e308101104011012090a101121011011170110150214501" | xxd -r -p | openssl enc -base64

This gave me

H0AhAUCQoQIuMIEBEEARASCQoQESEBEBEXARAVAhRQE=

for my BadAxe2 (STAC9274D)

 

Find the slot holding the audio hardware

gfxutil -f HDEF; # if that fails try AZAL in place of HDEF

 

For the BadAxe2 that gave me

DevicePath = PciRoot(0x0)/Pci(0x1b,0x0)

 

I added the following to my XML file and then regenerated my string using gfxutil: (gfxutil -s -v -n -i xml -o hex in.plist out.hex)

	<key>PciRoot(0x0)/Pci(0x1b,0x0)</key>
<dict>
	<key>PinConfigurations</key>
	<data>
	H0AhAUCQoQIuMIEBEEARASCQoQESEBEBEXARAVAhRQE=
	</data>
	<key>codec-id</key>
	<string>0x83847683</string>
	<key>layout-id</key>
	<string>0x04000000</string>
</dict>

 

What would be nice is a script or program that gives you the PinConfigurations data by dropping the codec on it.

 

In the end I chose to do my BadAxe2 in DSDT only because I'm already doing so much in it that the few extra bytes didn't hurt and saved me loading another kext that isn't really needed.

 

You can achieve this if you meet the following criteria

  • you currently use HDAEnabler.kext or ALCinject.kext
  • you use AppleHDA.kext
  • you have (or can get) the three pieces of required information about your audio hardware and the modified AppleHDA.kext it needs

You can do it in a device-property string or in DSDT, the DSDT method is by far better, here's the PinConfigurations details for the BadAxe1 which uses the STAC9221D A2 (what I cam currently working on) so I can finish off my DSDT work and release the DSDT's or at least the relevant sections.

 

BadAxe1:

	| |   +-o HDEF@1B  <class IOPCIDevice, registered, matched, active, busy 0, retain 8>
| |   | | {
| |   | |   "IOPCIResourced" = Yes
| |   | |   "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")
| |   | |   "IOName" = "pci8086,27d8"
| |   | |   "subsystem-id" = <17040000>
| |   | |   "IODeviceMemory" = (({"address"=18446744073225109504,"length"=16384}))
| |   | |   "class-code" = <00030400>
| |   | |   "revision-id" = <01000000>
| |   | |   "assigned-addresses" = <10d8008200000000000020e30000000000400000>
| |   | |   "built-in" = <00>
| |   | |   "acpi-device" = "IOACPIPlatformDevice is not serializable"
| |   | |   "name" = "pci8086,27d8"
| |   | |   "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/HDEF@1b0000"
| |   | |   "subsystem-vendor-id" = <86800000>
| |   | |   "reg" = <00d800000000000000000000000000000000000010d800020000000000000000000000000040
000>
| |   | |   "compatible" = <"pci8086,417","pci8086,27d8","pciclass,040300">
| |   | |   "PinConfigurations" = <104021021010010120308101104001012190a1011160010130214501>
| |   | |   "layout-id" = 2
| |   | |   "IOPCIExpressLinkCapabilities" = 0
| |   | |   "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2}
| |   | |   "IOInterruptSpecifiers" = (<1600000007000000>,<0400000000000100>)
| |   | |   "device-id" = <d8270000>
| |   | |   "vendor-id" = <86800000>
| |   | |   "device_type" = <"STAC9221A2">
| |   | |   "codec-id" = 2206496387
| |   | |   "IOPCIExpressLinkStatus" = 0
| |   | | }

 

BadAxe2:

	| |   +-o HDEF@1B  <class IOPCIDevice, registered, matched, active, busy 0, retain 8>
| |   | | {
| |   | |   "IOPCIResourced" = Yes
| |   | |   "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController")
| |   | |   "IOName" = "pci8086,27d8"
| |   | |   "layout-id" = <04000000>
| |   | |   "subsystem-id" = <19040000>
| |   | |   "IOPCIExpressLinkCapabilities" = 0
| |   | |   "IODeviceMemory" = (({"address"=18446744073226158080,"length"=16384}))
| |   | |   "class-code" = <00030400>
| |   | |   "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2}
| |   | |   "revision-id" = <01000000>
| |   | |   "IOInterruptSpecifiers" = (<1600000007000000>,<0200000000000100>)
| |   | |   "assigned-addresses" = <10d8008200000000000030e30000000000400000>
| |   | |   "built-in" = <00>
| |   | |   "acpi-device" = "IOACPIPlatformDevice is not serializable"
| |   | |   "device-id" = <d8270000>
| |   | |   "vendor-id" = <86800000>
| |   | |   "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/HDEF@1b0000"
| |   | |   "subsystem-vendor-id" = <86800000>
| |   | |   "name" = "pci8086,27d8"
| |   | |   "IOPCIExpressLinkStatus" = 0
| |   | |   "reg" = <00d800000000000000000000000000000000000010d800020000000000000000000000000040
000>
| |   | |   "compatible" = <"pci8086,419","pci8086,27d8","pciclass,040300">
| |   | |   "PinConfigurations" = <1f4021014090a1022e308101104011012090a101121011011170110150214501>
| |   | |   "codec-id" = 2206496289
| |   | | }

 

 

You don't believe audio can work without HDAEnabler.kext or ALCinject.kext, do it as a device-property string or better, do it in DSDT.

 

Here's the basic code, I provide two example sections of code, one for the BadAxe1 and the second for the BadAxe2, don't use both sections.

AUDIO IN DSDT:

______________________________________________________________


// this goes near the beginning of your DSDT (right after Method (_WAK, 1, Serialized)
Method (DTGP, 5, NotSerialized)
{
	If (LEqual (Arg0, Buffer (0x10)
			{
				/* 0000 */	0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, 
				/* 0008 */	0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
			}))
	{
		If (LEqual (Arg1, One))
		{
			If (LEqual (Arg2, Zero))
			{
				Store (Buffer (One)
					{
						0x03
					}, Arg4)
				Return (One)
			}

			If (LEqual (Arg2, One))
			{
				Return (One)
			}
		}
	}

	Store (Buffer (One)
		{
			0x00
		}, Arg4)
	Return (Zero)
}


______________________________________________________________


			// change all occurrences of AZAL to HDEF

______________________________________________________________


			// example for BadAxe1 (with comments)

______________________________________________________________


			// this goes at end of Device (HDEF)
			// BadAxe1 (D975XBXLKR)
			Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x08)
					{
						"codec-id", 
						Buffer (0x04)
						{
							0x83, 0x76, 0x84, 0x83 // the hex codec ID (reverse order)
						}, 
						"layout-id", 
						Buffer (0x04)
						{
							0x02, 0x00, 0x00, 0x00 // the hex layout ID (reverse order)
						}, 
						"device_type", 
						Buffer (0x16) // the hex count + 1 for null terminated ascii string
						{
							"SigmaTel STAC9221D A2" // the string identifier
						}, 
						"PinConfigurations", 
						Buffer (0x1C) // the actual hex count
						{
							/* the PinConfigurations data as it appears.
							/* 0000 */	0x10, 0x40, 0x21, 0x02, 0x10, 0x10, 0x01, 0x01,
							/* 0008 */	0x20, 0x30, 0x81, 0x01, 0x10, 0x40, 0x01, 0x01,
							/* 0010 */	0x21, 0x90, 0xa1, 0x01, 0x11, 0x60, 0x01, 0x01,
							/* 0018 */	0x30, 0x21, 0x45, 0x01 /* one entry seems missing */
						}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}

______________________________________________________________


			// example for BadAxe2

______________________________________________________________


			// this goes at end of Device (HDEF)
			// BadAxe2 (D975XBX2KR)
			Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x08)
					{
						"codec-id", 
						Buffer (0x04)
						{
							0x21, 0x76, 0x84, 0x83 // the hex codec ID (reverse order)
						}, 
						"layout-id", 
						Buffer (0x02)
						{
							0x04, 0x00, 0x00, 0x00 // the hex layout ID (reverse order) 
						}, 
						"device_type", 
						Buffer (0x13)
						{
							"SigmaTel STAC9274D"
						}, 
						"PinConfigurations", 
						Buffer (0x20)
						{
							/* 0000 */	0x1f, 0x40, 0x21, 0x02, 0x40, 0x90, 0xa1, 0x02,
							/* 0008 */	0x2e, 0x30, 0x81, 0x01, 0x10, 0x40, 0x11, 0x01,
							/* 0010 */	0x20, 0x90, 0xa1, 0x01, 0x12, 0x10, 0x11, 0x01,
							/* 0018 */	0x11, 0x70, 0x11, 0x01, 0x50, 0x21, 0x45, 0x01
						}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}

______________________________________________________________

Link to comment
Share on other sites

Not shure it could be possible, Apple Audio System Preferences is not build fot that.

But with "Audio MIDI Setup.app" in utilities folder you can agregate Outputs, just try.

Otherwise what do you want to do?

 

I was hoping to get all 5 speakers working, is that possible in MAC?

 

Thanks for your your input

Link to comment
Share on other sites

I was hoping to get all 5 speakers working, is that possible in MAC?

 

Thanks for your your input

 

Use the coaxial or optical digital out. You will need a separate digital to analog converter to get 5.1. I have all my logitech 5.1 speakers working. You also need to select digital out in DVDPlayer preferences (disc setup).

Good Luck

Link to comment
Share on other sites

Use the coaxial or optical digital out. You will need a separate digital to analog converter to get 5.1. I have all my logitech 5.1 speakers working. You also need to select digital out in DVDPlayer preferences (disc setup).

Good Luck

 

Thank's timewise for these informations, happy to know that everything is really working as i can't check by my own.

Link to comment
Share on other sites

Hi everyone,

 

I like to go further and have a working 10.5.x AppleHDA.kext working but i need some help.

 

I am looking for ioreg dump of MacBook pro 1st generation and 2sd generation with Sigmatel STAC9221 Codec.

 

I mean a full dump with in terminal:

 

ioreg -lw0 > ~/Desktop/MacbookXXX.txt

 

If someone can get this i will be very grateful to him.

Link to comment
Share on other sites

  • 2 weeks later...

The file STAC9271D_0x83847627_testing.zip mentioned earlier in this thread and others is no longer on the system. this is the kext I need for my DP35DP mobo. Can someone point me to it, post it, or email it?

 

Looking for the quick and easy route to audio :)

Link to comment
Share on other sites

The file STAC9271D_0x83847627_testing.zip mentioned earlier in this thread and others is no longer on the system. this is the kext I need for my DP35DP mobo. Can someone point me to it, post it, or email it?

 

Looking for the quick and easy route to audio :)

 

It's there:

 

http://www.mediafire.com/?sharekey=84a5630...2db6fb9a8902bda

 

STAC9271D.v7.zip ( 291.56K ) Number of downloads: 187

Link to comment
Share on other sites

Thanks for the fast response!

 

The link you gave brings me to download SWPI.txt and not the .kext. Can you check the link?

 

Also for reference, I tried V7 of the STA9271D and no sound on my DP35DP mobo. I do see a line out device, no input device, but not sound out of any jack.

 

I am loading kext using OSX86tools. I assume there should be no issues with that method.

 

I have tried several kext files. Any files that I absolutely should NOT have for audio to work? Example... I have an Azalia kext that is from sometime during one of my many trials.

Link to comment
Share on other sites

Thanks for the fast response!

 

The link you gave brings me to download SWPI.txt and not the .kext. Can you check the link?

 

Also for reference, I tried V7 of the STA9271D and no sound on my DP35DP mobo. I do see a line out device, no input device, but not sound out of any jack.

 

I am loading kext using OSX86tools. I assume there should be no issues with that method.

 

I have tried several kext files. Any files that I absolutely should NOT have for audio to work? Example... I have an Azalia kext that is from sometime during one of my many trials.

 

 

Sorry my mistake, the link should point to v7 so it's OK, you already tried it.

 

So here is the requested file:

STAC9271D_0x83847627_testing_1.zip

Link to comment
Share on other sites

Thanks for the file.... still no sound.

 

I'll have to do a unix dump and invest in learning how to use the methods listed here.

 

Anyone else have the DP35DP mobo with working audio? I have Kalyway 10.5.2 OS.

i do. just check the v7 provided in this thread (see post #1).

Link to comment
Share on other sites

 Share

×
×
  • Create New...