Jump to content

getcodecid - Command line tool to detect codec id

getcodecid command line tool codec AppleHDA VoodooHDA

  • Please log in to reply
123 replies to this topic

#21
insanelyDeepak

insanelyDeepak

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 301 posts
  • Gender:Male

As requested by someone (broken file), I've attached the getcodecid project by AnV that work under ARC, with the fix described above (post 19), so non more memory leak.

The deployment target is set to 10.7 (due to the ARC technology you need at least Lion to compile it) but it should work in 10.6 on (was tested) and probably in 10.5 too where the Obj-C 2.0 was introduced (not tested).

I dont't have the non-ARC project, AnV probably have a copy of it's own work  :P

 

EDIT

 

project contain  a pre-built getcodecid command ready to use

Thank you micky ,, working awesome ..



#22
calibre™

calibre™

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 258 posts
  • Gender:Male

wont run on 10.6.8 due to "iIllegal instruction"

 

Fixed: Attached File  getcodecid.zip   15.84KB   12 downloads



#23
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Test this one:Attached File  getcodecid.zip   118.68KB   25 downloads

....no change in the code, only differente arch for the binary  "Standar 32-64 bit Intel", compiled i Lion this time. 



#24
insanelyDeepak

insanelyDeepak

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 301 posts
  • Gender:Male

Hi guys

just updated the source with more codec to make detection of Codecid more better 

also added some more codec of Realtek, IDT , Conexant, Nvdia , Intel 

 

 

project contain  a pre-built getcodecid command ready to use

Attached File  getcodecid.zip   138.78KB   28 downloads



#25
calibre™

calibre™

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 258 posts
  • Gender:Male
add source please deepak

#26
insanelyDeepak

insanelyDeepak

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 301 posts
  • Gender:Male

add source please deepak

which source ???

it includes all 



#27
calibre™

calibre™

    InsanelyMac Sage

  • Members
  • PipPipPipPipPip
  • 258 posts
  • Gender:Male
Mickey1979
can you please compile Deepak's source to support standard 32-64bit. it has updated drivers in it.
thanks

#28
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,774 posts
  • Gender:Male
  • Location:UK

I've had a look at the recent submissions here so I can update the binary in DarwinDumper. After some testing I found:

 
- Mickey's posted binary failed on 10.6 here with 'Illegal instruction'.
- Calibre's posted binary run fine in 10.6 but was x64 only.
- Deepak's posted binary failed with 'dyld: Symbol not found: _OBJC_CLASS_$_NSRegularExpression'. I did manage to compile sources so it worked okay, but only as x64.
- AnV's getcodecid_NoARC binaries were FAT but failed to run on SL without error.
 
As a result I took a frankenstein approach to build a working FAT binary. Steps taken:
 
1 - Started with AnV's getcodecid_NoARC.zip from opening post.
2 - Added the additional codecs from InsanelyDeepak's posted source from post #24
3 - Moved the position of the NSMutableArray as suggested by Mickey1979 in post #19
4 - Build with Xcode 6.3, using 10.10 SDK with a 10.6 deployment target.
 
It might not be pretty but it works.
 
Source and binary:
Attached File  getcodecid_NoArc_Blackosx.zip   164.92KB   14 downloads
 
Feel free to clean it up anyone.


#29
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

 

I've had a look at the recent submissions here so I can update the binary in DarwinDumper. After some testing I found:

 
- Mickey's posted binary failed on 10.6 here with 'Illegal instruction'.
- Calibre's posted binary run fine in 10.6 but was x64 only.
- Deepak's posted binary failed with 'dyld: Symbol not found: _OBJC_CLASS_$_NSRegularExpression'. I did manage to compile sources so it worked okay, but only as x64.
- AnV's getcodecid_NoARC binaries were FAT but failed to run on SL without error.
 
As a result I took a frankenstein approach to build a working FAT binary. Steps taken:
 
1 - Started with AnV's getcodecid_NoARC.zip from opening post.
2 - Added the additional codecs from InsanelyDeepak's posted source from post #24
3 - Moved the position of the NSMutableArray as suggested by Mickey1979 in post #19
4 - Build with Xcode 6.3, using 10.10 SDK with a 10.6 deployment target.
 
It might not be pretty but it works.
 
Source and binary:
 
Feel free to clean it up anyone.

 

Yep, my release was done when forum goes down, and all attachments lost (btw now is ok).

Just for curiosity, this kind of binary is still supported in El capitan? (sorry I can't test atm because I made an urgent Windows Installation to do a Job with SolidWorks...I sacrificed it :P )



#30
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,774 posts
  • Gender:Male
  • Location:UK

No problem. I just wanted a new file for DarwinDumper.

Yes, a single FAT binary works fine on 10.6.8 thru 10.11 DP6. Though I have not yet tried it on SL booted with kernel in 32-bit mode. I will do later today though.

 

EDIT: works fine with kernel booted in 32-bit mode.

Attached File  screenshot.jpg   83.36KB   1 downloads



#31
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Thanks



#32
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Hey blackosx, you want to show also the device id with subsystem-id too of that codecs near the codecs name?..it's easy no problem to do that...



#33
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,774 posts
  • Gender:Male
  • Location:UK

Hey mickey1979. 

Sure. If you can add it then that may well be very useful. Thanks

 

I was also thinking of adding back say, HD3000 where InsanelyDeepak changed it to 'Panther Point'. What do you think to that?

 

EDT:

Or if not reverting then adding it.. so maybe we could have output like:

Panther Point (HD3000) (8086:0116)



#34
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 5,256 posts
  • Gender:Male
  • Location:Canary Islands

Hey mickey1979. 
Sure. If you can add it then that may well be very useful. Thanks
 
I was also thinking of adding back say, HD3000 where InsanelyDeepak changed it to 'Panther Point'. What do you think to that?
 
EDT:
Or if not reverting then adding it.. so maybe we could have output like:
Panther Point (HD3000) (8086:0116)

 
 
To be more versatile and show the correct name associated to the CodecID you need also to parse the RevisionID...
 
Take a look here (Enoch Codec name list)
http://forge.voodoop...saio/hda.c#L267
 
ex:
ALC888 and ALC1200
http://forge.voodoop...saio/hda.c#L326
 

	{ HDA_CODEC_ALC887, 0,          "ALC887" },
	{ HDA_CODEC_ALC888, 0x0101,"ALC1200" }, // Revision Id: 0x100101
	{ HDA_CODEC_ALC888, 0,          "ALC888" },
	{ HDA_CODEC_ALC889, 0,          "ALC889" },

Other example... the ALC885 with all his variants...

ErmaC



#35
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Hey mickey1979. 

Sure. If you can add it then that may well be very useful. Thanks

 

I was also thinking of adding back say, HD3000 where InsanelyDeepak changed it to 'Panther Point'. What do you think to that?

 

EDT:

Or if not reverting then adding it.. so maybe we could have output like:

Panther Point (HD3000) (8086:0116)

"Panther Point" simply is the right one because the Audio controller has nothing to do with the CPU..ie you can find "Panther Point" in a mobo (... like me) with HD 4000 but is not 8086:0116  :P.

getcodec can't show you CPU info, was just AnV that wrote that in the header (regarding a 80862806)... but IMHO is wrong (approach was ok when 6 Series chip came out the first time)

 

try with the one attached, the output is like that:

IDT 92HD91BXX (111d:76e0)
	Controller 8086:1e20 (sub-ven:103c:1818)
Intel Panther Point (8086:2806)
	Controller 8086:1e20 (sub-ven:103c:1818) 

To get something like 8086:1E20 instead of 0x80861E20 require additional work.... EDIT done!

Please before compile re-check the deployment target and the binary options (I've use that in Yosemite). Removed AppKit and Foundation, just imported Cocoa (btw is the same: Foundation +AppKit), but this way only one link for xcode.

 

EDIT II

if you want less output...I'm here just tell me what

Attached Files



#36
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Mickey1979
can you please compile Deepak's source to support standard 32-64bit. it has updated drivers in it.
thanks

Sorry not aware of your request until today :blush:



#37
blackosx

blackosx

    InsanelyMacaholic

  • Coders
  • 3,774 posts
  • Gender:Male
  • Location:UK

To be more versatile and show the correct name associated to the CodecID you need also to parse the RevisionID...

That would be great but I'm not looking to spend much time on this, instead just working with what we've got here.


"Panther Point" simply is the right one because the Audio controller has nothing to do with the CPU..ie you can find "Panther Point" in a mobo (... like me) with HD 4000 but is not 8086:0116  :P.

Yeah. bad example  :P

 

try with the one attached, the output is like that:

IDT 92HD91BXX (111d:76e0)
    Controller 8086:1e20 (sub-ven:103c:1818)
Intel Panther Point (8086:2806)
    Controller 8086:1e20 (sub-ven:103c:1818) 

To get something like 8086:1E20 instead of 0x80861E20 require additional work.... EDIT done!

That's great!

Thank you Micky1979!



#38
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

THX, the output can be more intresting when a chip audio is present in a discrete video card! :)

I hope there is enough space in DarwinDumper to display everything correctly.

Bye bye :lol:

 

EDIT

the sub-vendor indicate users when they can install a patched AppleHDA for a particular codec because if matching user will be 100% sure that this will work also for him, otherwise same codec can have different pinconfig (a codec have a lot of unused node)...this is OEM depending



#39
ErmaC

ErmaC

    127.0.0.1

  • Supervisors
  • 5,256 posts
  • Gender:Male
  • Location:Canary Islands

Tiny mod.
Now also scan for the revision id (Only AppleHDA.kext ATM... need to be adapt for VoodooHDA.kext)
And Codec list name with some variant as been ported from Enoch HDA model/codec list.

InsanelyMac:Test ermac$ ./getcodecid
Analog Devices AD2000b
NVIDIA GT440
NVIDIA GT440
NVIDIA GT440
NVIDIA GT440
Analog Devices AD2000b (11d4:989b) Rev.(00100300)
	Controller 8086:3a3e (sub-ven:106b:00a0)
NVIDIA GT440 (10de:0014) Rev.(00100100)
	Controller 10de:0bea (sub-ven:1458:3544)
NVIDIA GT440 (10de:0014) Rev.(00100100)
	Controller 10de:0bea (sub-ven:1458:3544)
NVIDIA GT440 (10de:0014) Rev.(00100100)
	Controller 10de:0bea (sub-ven:1458:3544)
NVIDIA GT440 (10de:0014) Rev.(00100100)
	Controller 10de:0bea (sub-ven:1458:3544)

Source -> Attached File  source_code_for_getcodecid_with_revid.zip   62.23KB   7 downloads
binary tool -> Attached File  getcodecid.zip   27.16KB   12 downloads

ErmaC



#40
Micky1979

Micky1979

    I realized that I am lucky

  • Retired
  • 4,864 posts
  • Gender:Male
  • Location:a 100m dal Tevere, vicino a Peppe

Greet Fabio!!!

anyway you need to comment line 390 :P







Also tagged with one or more of these keywords: getcodecid, command line tool, codec, AppleHDA, VoodooHDA


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy