Jump to content

VIA VT2021 and AppleHDA (as to be alternative)


  • Please log in to reply
15 replies to this topic

#1
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 585 posts
After I had tested AppleHDA.kext on Gigabyte Z77M-D3H's VIA VT2021, I had found that a few ports could be working last two weeks.

This is the best I could make.
Attached File  VIA_VT2021_for_Z77M-D3H.zip   19.04KB   619 downloads
requires AppleHDA from 10.7.4 update

If you are interested how to edit/patch AppleHDA, you can study from following information.
What do you need?
- codec dump from Linux
- Microsoft High Definition Audio Utility 3.3 (using Google)
- Xcode

Links:
[HOW TO] Patch AppleHDA - Knowledge Base by THe KiNG, this's useful. Please read all of them to get some idea for you.
How to patch AppleHDA.kext from 10.5.2 and above, Ii is a little bit hard, but is fun. by MadTux
[How To] Pinconfig for Linux users by Master Chief
Legacy AppleHDA for BOOT-132 by stickpin



Attached File  VIA_VT2021_PGB.zip   27.04KB   76 downloads


Note:
- don't add MuteGPIO in layout


No more update for this sound chip from me.

Edited by VCH888, 06 June 2012 - 12:48 PM.


#2
lazybon3

lazybon3

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts
Great. Will test it when i am @ home.

#3
lazybon3

lazybon3

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts
Hello,

i just tried to make my VT2021 work with AppleHDA using the Files that you provided but as it seems it doesnt work for me.
I followed your Guide/Readme.txt Step-By-Step and i am sure DSDT injection is working, but AppleHDA won't load for me.

So here is what the Console gives me:

Jun  2 20:28:12 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 2094
Jun  2 20:28:12 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 214
Jun  2 20:28:12 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 1050
Jun  2 20:38:13 macintosh kernel[0]: Sound assertion in AppleHDAPath at line 1331
Jun  2 20:38:13 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 507
Jun  2 20:38:13 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 6726
Jun  2 20:38:13 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 6671
Jun  2 20:38:13 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 694
Jun  2 20:38:13 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 2191
Jun  2 20:38:13 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 214
Jun  2 20:38:13 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 1050
Jun  2 20:44:45 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 1504
Jun  2 20:44:45 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 2094
Jun  2 20:44:45 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 214
Jun  2 20:44:45 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 1050
Jun  2 20:51:17 macintosh kernel[0]: Sound assertion in AppleHDAPath at line 1331
Jun  2 20:51:17 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 507
Jun  2 20:51:18 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 6726
Jun  2 20:51:18 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 6671
Jun  2 20:51:18 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 694
Jun  2 20:51:18 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 2191
Jun  2 20:51:18 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 214
Jun  2 20:51:18 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 1050
Jun  2 20:55:51 macintosh kernel[0]: Sound assertion in AppleHDAPath at line 1331
Jun  2 20:55:51 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 507
Jun  2 20:55:52 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 6726
Jun  2 20:55:52 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 6671
Jun  2 20:55:52 macintosh kernel[0]: Sound assertion in AppleHDAEngine at line 694
Jun  2 20:55:52 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 2191
Jun  2 20:55:52 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 214
Jun  2 20:55:52 macintosh kernel[0]: Sound assertion in AppleHDADriver at line 1050


The HDA-Device shows up in System Profiler, and even shows some Input and Output Ports.
But no Input or Output Device shows up in Audio/Sound Settings.

Since i already tried to make VIA VT2021 work with AppleHDA im am not suprised, because i know the Console Messages and behavior.

So when i just follow your Guide/Readme.txt HDA and Outputs show up in System Profiler but i can't use them.
When i add my own Verbs for Layout12 in AppleHDAHardwareConfigDriver.kext System freezes for about 2 Minutes after boot, i am able
to move my Cursor, but there is no reaction on Click or Keyboard-Input.

Console Output is something like this:

Jun  2 21:03:11 macintosh kernel[0]: IOHIDSystem: postEvent LLEventQueue overflow.
Jun  2 21:05:07 macintosh kernel[0]: IOHIDSystem: postEvent LLEventQueue overflow.

So i just want to find out if i am doing something wrong or i just missed a Step.

So here is what i tried Step for Step.

1. Edited my DSDT

		Device (HDEF)
		{
			Name (_ADR, 0x001B0000)
			OperationRegion (HDAR, PCI_Config, 0x4C, 0x10)
			Field (HDAR, WordAcc, NoLock, Preserve)
			{
				DCKA,   1,
						Offset (0x01),
				DCKM,   1,
					,   6,
				DCKS,   1,
						Offset (0x08),
					,   15,
				PMES,   1
			}
			Method (_PRW, 0, NotSerialized)
			{
				Return (Package (0x02)
				{
					0x0D,
					0x05
				})
			}
			Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x04)
					{
						"layout-id",
						Buffer (0x04)
						{
							0x0C, 0x00, 0x00, 0x00
						},
						"PinConfigurations",
						Buffer (Zero) {}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}
		}

I am sure that there is no mistake here, since Audio Device shows up in System Profiler with In- and Output Ports and AppleHDA gives me Messages on the Console.

2. Binary Patching.

I just entered the Command provided in your Readme.txt. Here is a point where i am not so sure what to do, i entered both commands without a big understanding
of whats happening here. Do i really need to run both commands? Or is it depending on something?

sudo perl -pi -e 's|\x84\x19\xd4\x11|\x41\x04\x06\x11|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA
sudo perl -pi -e 's|\x83\x19\xd4\x11|\x00\x00\x00\x00|g' /System/Library/Extensions/AppleHDA.kext/Contents/MacOS/AppleHDA

3. Copying the layout12.xml and Platform.xml to /System/Library/Extensions/AppleHDA.kext/Contents/Resources/

I am also sure that i made no mistake here, since it didnt work for me i also tried copying all layout*.xml files to this path but it still didn't work for me.
I guess when i just use Layout ID 12 in DSDT i just need to copy Layout12.xml + Platform.xml. Am i right?

4. I skipped the whole 10.8 DP3 Part since i am using 10.7.4

10.8 DP3 or later  Credits to revogirl for making perl script of zlib.pl
copy layout###.xml.zlib and Platform.xml.zlib to /System/Library/Extensions/AppleHDA.kext/Contents/Resources/
example;
sudo cp /where the file is/layout12.xml.zlib /System/Library/Extensions/AppleHDA.kext/Contents/Resources/

Terminal command: zlib.pl
perl zlib.pl inflate layout12.xml.zlib > layout12.xml
perl zlib.pl deflate layout12.xml > layout12.xml.zlib

5. I skipped the zlib.pl part since there was no layout12.xml.zlib provided in your ZIP-File.

6. Copied VIA2021.kext to /S/L/E and changed/fixed owner and permissions for VIA2021.kext and AppleHDA.kext

So here is the Question, do i need to add my Device/Codec ID to the Info.plist in VIA2021.kext? In my case the DeviceID is 0x1e208086.

7. Tried adding the Verbs you provided in VT2021-0 Document to Layout 12 in AppleHDAHardwareConfigDriver.kext but still no joy.
8. Tried adding the Verbs i use with VoodooHDA to AppleHDAHardwareConfigDriver.kext but System freezes for about 2-3 Minutes after Boot
and there is no reaction on mouseclick or keyboard input.


Maybe i just missed a Step somewhere, or at least i hope so, since i am really looking forward to using AppleHDA for my VT 2021 ;)


Thanks and Bye


Edit: As it seems i am using a different Mainboard, Gigabyte GA-Z77X-UD3H-WB WiFi but the Board also uses a VIA VT2020 / VT2021 Audio Chipset.

#4
VCH888

VCH888

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 585 posts

Jun  3 10:43:23 macs-Mac-Pro kernel[0]: Sound assertion in AppleHDADriver at line 2094
Jun  3 10:43:23 macs-Mac-Pro kernel[0]: Sound assertion in AppleHDADriver at line 214
Jun  3 10:43:23 macs-Mac-Pro kernel[0]: Sound assertion in AppleHDADriver at line 1050

These sound assertions (four times) as I got related to trying to use nVidia HDMI audio and patched AppleHDA for VT2021 at the same time. I had no problem about these errors if I used AMD HD6870.

Sorry, I have no idea about overflow.

So here is the Question, do i need to add my Device/Codec ID to the Info.plist in VIA2021.kext? In my case the DeviceID is 0x1e208086.

You don't need to add this DeviceID.


I hope you copy Platforms.xml not Platform.xml. :)


I will continue to test my small board before I'll get a bigger one.

Edited by VCH888, 03 June 2012 - 09:09 AM.


#5
lazybon3

lazybon3

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts
Hello again.

Okay, so now i have tried the patched AppleHDA.kext + VIA2021.kext and here are the Results:

I also added my PinConfigurations in DSDT and hoped this would change something, but no difference.

Layout ID 12:
Only Rear Green Output works and in Audio Preferences there is also the Digital Output, and for Input there is LineIn and Internal Microphone, but only the Green Rear Output works.
No Output on Black, Gray, Orange, Pink or Blue Rear, No Output on Green Front. No Input on any Port.

Layout ID 36:
Rear Green Line Out works and Front Green Line Out work (even when the Cable at Rear is still connected). None of the Other Ports work for Output or Input.

Layout ID 48:
Same behavior as Layout ID 12 but Input/Output Ports show up differently in Sound Preferences. So only Green Rear works, no Input or Output on any of the other Ports.

Here is the Pinconfiguration from my DSDT:

		Device (HDEF)
		{
			Name (_ADR, 0x001B0000)
			OperationRegion (HDAR, PCI_Config, 0x4C, 0x10)
			Field (HDAR, WordAcc, NoLock, Preserve)
			{
				DCKA,   1,
						Offset (0x01),
				DCKM,   1,
					,   6,
				DCKS,   1,
						Offset (0x08),
					,   15,
				PMES,   1
			}
			Method (_PRW, 0, NotSerialized)
			{
				Return (Package (0x02)
				{
					0x0D,
					0x05
				})
			}
			Method (_DSM, 4, NotSerialized)
			{
				Store (Package (0x04)
					{
						"layout-id",
						Unicode ("$"),
						"PinConfigurations",
						Buffer (0x34)
						{
							/* 0000 */	0x20, 0x10, 0x01, 0x01, 0x40, 0x60, 0x01, 0x01,
							/* 0008 */	0x50, 0x20, 0x01, 0x01, 0x60, 0x40, 0x21, 0x01,
							/* 0010 */	0x30, 0x90, 0xA1, 0x01, 0x70, 0x30, 0x81, 0x01,
							/* 0018 */	0x80, 0x90, 0xA1, 0x01, 0xF0, 0x00, 0x37, 0x50,
							/* 0020 */	0x90, 0x10, 0x45, 0x00, 0xA0, 0x10, 0x45, 0x00,
							/* 0028 */	0xB0, 0x10, 0x45, 0x40
						}
					}, Local0)
				DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
				Return (Local0)
			}
		}

But i dont think another PinConfiguration will change the Result since it doesnt make any differnce if i use it or not.
I also tried to add/change my verbs in AppleHDAHardwareConfigDriver.kext for LayoutID 12 and 36, but this didn't make any difference.

I dont know why the other Ports wont work for me, but i think the Result with Layout ID 36 isn't that bad :)

Thanks & Bye

EDIT: Maybe there is a Problem with the PinConfig, i am back to VoodooHDA at the Moment and i see all Ports (based on my verbs/Pin Config) in the
System Profiler. Maybe it will work out for me when i just customize the LayoutXXX.xml for my configuration and delete the obsolete "Pins" from Pin Configurations in DSDT?

#6
smx

smx

    InsanelyMac Protégé

  • Members
  • Pip
  • 33 posts
  • Gender:Male
  • Location:Italy
Hello, i'm trying to patch AppleHDA (OSX Lion 10.7.4) for Via VT1708S.

I've read some documents, and tryied the patch myself.

1 - I bin patched Apple HDA
2 - I used DSDT-Patcher to fix my DSDT and add the audio part
3 - I edited the AppleHDAHardwareConfigDriver.kext plist to match my CodecID and my ConfigData (verbs dumped from linux and parsed with verbit).
4 - I edited layout12.xml to match my codecID and to remove

MuteGPIO


5 - I rebooted, and my soundcard was detected :-), but i didn't patch Platforms.xml, and so no input/output devices :-(
The problem is that i don't know what to do exactely with Platforms.xml. I have codec graph and codec verbs, but i don't know where to put which node.



Could someone could please help me?

I attach here some dumped files

Attached Files



#7
eep357

eep357

    Triple Platinum

  • Retired
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
Since the orig poster is no longer working on this project, and no indication anyone ever got it fully working, I think voodoo is your best bet atm.

#8
smx

smx

    InsanelyMac Protégé

  • Members
  • Pip
  • 33 posts
  • Gender:Male
  • Location:Italy
Do you know where can i found some info about Platforms.xml? I googled a lot, but i figured out almost anything.

#9
eep357

eep357

    Triple Platinum

  • Retired
  • 2,527 posts
  • Gender:Male
  • Location:Dark Side of The Wall
  • Interests:things and stuff
well, for voodoo audio you would go here http://code.google.c.../downloads/list and don't need to edit any xml files.

#10
smx

smx

    InsanelyMac Protégé

  • Members
  • Pip
  • 33 posts
  • Gender:Male
  • Location:Italy
Well, VoodooHDA already worked well for me, but i had some minor problems with the mic (echo effect) and wanted to try the HDA patch.
If there isn't any documentation on the new Lion HDA i will just wait and stick with VoodooHDA, thank you anyway.

#11
lazybon3

lazybon3

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts
Hey smx,

maybe this solves your Problem with VoodooHDA:

Problem: audio feedback (Larsen effect), sound loop between input (microphone) and output (speakers).
Solution: mute iGain and increase iMix or Mic if microphone dosn't work
Code:
<key>iGain</key>
<string>0</string>


Source: VoodooHDA - common problems

If you want to "customize" your Version of VoodooHDA (cosmetic fixes, additional inputs and outputs) you should read the full post.

hf :)
  • smx likes this

#12
smx

smx

    InsanelyMac Protégé

  • Members
  • Pip
  • 33 posts
  • Gender:Male
  • Location:Italy
Thank you very much you are a hero :-D The kext linked within the tread is PERFECT!
I finally managed to get the Prefpane to see my devices, and the igain trick (which failed on a previous kext), worked like a charm with this one

#13
clickmikes

clickmikes

    InsanelyMac Protégé

  • Members
  • Pip
  • 7 posts
@lazybon3

Still got no Audio on my Z77M-D3H (VT2021), 3570K, Mountain Lion.

This is what I did:
1) Installed AppleHDA as per your instructions above.
2) Edited DSDT to add ID 12 to HDEF and added Method DTGP (found the instructions in another thread)
3) Installed VIA2021.kext (it does not show in kextstat)
4) Added 10.8 fixes (created zlibs and copied to AppleHDA.kext)

I can see Intel High Definition Audio Device in system profiler, and the details show Audio-ID: 12
However the speaker icon in my menu bar is greyed out and I cannot see any audio device in my audio settings.
Cannot add any audio device via Audi-MIDI-setup.app either.

Can you please give me some ideas where/how I can find a solution?

TIA
Michael

#14
lazybon3

lazybon3

    InsanelyMac Protégé

  • Members
  • PipPip
  • 55 posts
@ clickmikes:

check out the other 2 posts about AppleHDA for VT2021 / VoodooHDA for VT2021.

I didn't find the time to take a look at it yet, i will install ML next week and post a solution asap. (i guess it will be by the end of next week).

Bye

#15
lukaschan

lukaschan

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts
  • Gender:Male

Hello, i'm trying to patch AppleHDA (OSX Lion 10.7.4) for Via VT1708S.

I've read some documents, and tryied the patch myself.

1 - I bin patched Apple HDA
2 - I used DSDT-Patcher to fix my DSDT and add the audio part
3 - I edited the AppleHDAHardwareConfigDriver.kext plist to match my CodecID and my ConfigData (verbs dumped from linux and parsed with verbit).
4 - I edited layout12.xml to match my codecID and to remove

MuteGPIO


5 - I rebooted, and my soundcard was detected :-), but i didn't patch Platforms.xml, and so no input/output devices :-(
The problem is that i don't know what to do exactely with Platforms.xml. I have codec graph and codec verbs, but i don't know where to put which node.



Could someone could please help me?

I attach here some dumped files


i'm working on 1708s too. does the system can recognize the input/output devices in system profiler after your patch??
here is my work for 1708s platforms...
please try it.

wait for your good news!

=========================================

19 (Audio Input) --> [23 ]
20 (Audio Input) --> [30 ]
22 (Audio Mixer) --> [16 31 26 27 30 29 37 ]
23 (Audio Selector) --> [27 31 26 30 29 22 ]
24 (Audio Selector) --> [17 ]
25 ( [Jack] Line Out at Ext Rear) --> [24 ]
26 ( [Jack] Mic at Ext Rear) --> [38 ]
27 ( [Jack] Line In at Ext Rear) --> [24 ]
28 ( [Jack] Line Out at Ext Rear) --> [22 ]
29 ( [Jack] HP Out at Ext Front) --> [22 37 ]
30 ( [Jack] Mic at Ext Front) --> [22 37 ]
32 ( [Jack] Digital Out at Int HDMI) --> [18 ]
33 ( [Jack] SPDIF Out at Ext Rear Panel) --> [21 ]
34 ( [Jack] Line Out at Ext Rear) --> [38 ]
35 ( [Jack] Line Out at Ext Rear) --> [39 ]
38 (Audio Selector) --> [36 ]
39 (Audio Selector) --> [37 ]
25( [Jack] Line Out at Ext Rear)[
25( [Jack] Line Out at Ext Rear)
24(Audio Selector)
17(Audio Output)
]
26( [Jack] Mic at Ext Rear)[
19(Audio Input)
23(Audio Selector)
26( [Jack] Mic at Ext Rear)
e.g: (19-->23-->26)

27( [Jack] Line In at Ext Rear)[
19(Audio Input)
23(Audio Selector)
27( [Jack] Line In at Ext Rear)
(19-->23-->27)

28( [Jack] Line Out at Ext Rear)[
28( [Jack] Line Out at Ext Rear)
22(Audio Mixer)
16(Audio Output)
]
29( [Jack] HP Out at Ext Front)[
29( [Jack] HP Out at Ext Front)
37(Audio Output)
]
30( [Jack] Mic at Ext Front)[
20(Audio Input)
30( [Jack] Mic at Ext Front)
]
31( [Fixed] CD at Int N/A)[
19(Audio Input)
23(Audio Selector)
31( [Fixed] CD at Int N/A)
]
34( [Jack] Line Out at Ext Rear)[
34( [Jack] Line Out at Ext Rear)
38(Audio Selector)
36(Audio Output)
]
35( [Jack] Line Out at Ext Rear)[
35( [Jack] Line Out at Ext Rear)
39(Audio Selector)
37(Audio Output)
]

32 ( [Jack] Digital Out at Int HDMI)


32-->18


33 ( [Jack] SPDIF Out at Ext Rear Panel)


33-->21



the red numbers are the nodes!!
smx: here is the platforms.xml i made.

Attached Files


  • smx likes this

#16
kidalive

kidalive

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 275 posts
  • Gender:Male

After I had tested AppleHDA.kext on Gigabyte Z77M-D3H's VIA VT2021, I had found that a few ports could be working last two weeks.

This is the best I could make.
Attached File  VIA_VT2021_for_Z77M-D3H.zip   19.04KB   619 downloads
requires AppleHDA from 10.7.4 update

If you are interested how to edit/patch AppleHDA, you can study from following information.
What do you need?
- codec dump from Linux
- Microsoft High Definition Audio Utility 3.3 (using Google)
- Xcode

Links:
[HOW TO] Patch AppleHDA - Knowledge Base by THe KiNG, this's useful. Please read all of them to get some idea for you.
How to patch AppleHDA.kext from 10.5.2 and above, Ii is a little bit hard, but is fun. by MadTux
[How To] Pinconfig for Linux users by Master Chief
Legacy AppleHDA for BOOT-132 by stickpin



Attached File  VIA_VT2021_PGB.zip   27.04KB   76 downloads


Note:
- don't add MuteGPIO in layout


No more update for this sound chip from me.

I have GA-Z77M-D3H-MVP with VIA VT2021 or VIA VT2020 NOT SURE. MB SHOWS VT2020, LINUX DISTRO SHOWS VT2020. Got one sound assertion iwith this Pinconfigration below.Sound assertion in AppleHDACodecGeneric at line 360
22471C10 22471D40 22471E11 22471F01 22571CF0 22571D00 22571E00 22571F40 22671CF0 22671D00 22671E00 22671F40 22771CF0 22771D00 22771E00 22771F40 22871CF0 22871D00






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy