Andy Vandijck Posted December 27, 2012 Share Posted December 27, 2012 On demand of Uphuck I have created a command line tool to detect the codec id. It requires VoodooHDA / AppleHDA to be present... This tool will get the codec id from the drivers and print them... Cheers Uphuck... Source included Binary is under Release EDIT: Made a version for Lion + Mountain Lion and can be compiled for Snow Leopard too... (This one doesn't use ARC and is 32 + 64 bit) getcodecid.zip getcodecid_NoARC.zip 9 Link to comment Share on other sites More sharing options...
bertmannaustria Posted December 27, 2012 Share Posted December 27, 2012 thx Link to comment Share on other sites More sharing options...
uphuck Posted December 28, 2012 Share Posted December 28, 2012 Andy it is very good news! I finished the audio autodetection script which is using your terminal program 8) Party time soon Cheers Andy!!! 1 Link to comment Share on other sites More sharing options...
Slice Posted December 28, 2012 Share Posted December 28, 2012 MacBook:Projects slice$ /Users/slice/Downloads/getcodecid/Release/getcodecid Illegal instruction MacBook:Projects slice$ Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 28, 2012 Author Share Posted December 28, 2012 @slice: Which version of xcode are you using? It builds fine with xcode 4.5.2... Link to comment Share on other sites More sharing options...
rhada Posted December 28, 2012 Share Posted December 28, 2012 Works well with Xcode 4.5.2, detects AL889 and my Nvidia HDMI output (GTX 560 ti) Link to comment Share on other sites More sharing options...
Zenith432 Posted December 28, 2012 Share Posted December 28, 2012 When run under VMware, it says "Unknown Codec". Following is IOHDACodecDevice +-o IOHDACodecDevice@1,0 <class IOHDACodecDevice, id 0x1000002e6, registered, matched, active, busy 0 (2948 ms), retain 7>| { | "IOHDACodecVendorID" = 0x15ad1975 | "IOHDACodecRevisionID" = 0x100103 | "IOHDACodecAddress" = 0x0 | } With device ID 0x15ad1975 that's not in the list. However, when dumping AppleHDAController... +-o AppleHDAController@1 <class AppleHDAController, id 0x1000002dd, registered, matched, active, busy 0 (2948 ms), retain 8>| { | "IOClass" = "AppleHDAController" | "CFBundleIdentifier" = "com.apple.driver.AppleHDAController" | "IOProviderClass" = "IOPCIDevice" | "DPAudioDeviceExclusion" = ({"ManufacturerID"=0x610,"ProductID"=0x2792}) | "IOPCIClassMatch" = "0x04020000&0xFFFE0000" | "DPAlwaysDisplayRouting" = (0x3,0x21,0x23,0x58) | "IOPMUnattendedWakePowerState" = 0x0 | "IOProbeScore" = 0x1 | "CodecAddressFilterArray" = ({"CodecAddressMask"=<01000000>,"PCIVendorDeviceID"=0x10de0ac0,"LayoutID"=0x4008},{"CodecAddressMask"=<01000000>,"PCIVendorDeviceID"=0x10de0ac0,"LayoutID"=0x0},{"CodecAddressMask"=<09000000>,"PCIVendorDeviceID"=0x10de0ac0,"LayoutID"=0x41},{"CodecAddressMask"=<01000000>,"PCIVendorDeviceID"=0x10de0ac0,"LayoutID"=0x49}) | "IOPowerManagement" = {"ChildrenPowerState"=0x2,"DevicePowerState"=0x2,"CurrentPowerState"=0x2,"MaxPowerState"=0x2} | "IOMatchCategory" = "IODefaultMatchCategory" | "RequireMaxBusStall" = ({"Layouts"=(),"MaxBusStall"=0x3a98}) | "HDAControllerIndex" = 0x0 | "CodecList" = ({"RevisionID"=0x100103,"VendorProductID"=0x15ad1975}) | "HwFactoryPrefixTranslation" = ({"LayoutID"=0x4e,"StandInDID"=0xaa30,"SourceDID"=0xaa40,"VID"=0x1002},{"LayoutID"=0x4e,"StandInDID"=0xaa30,"SourceDID"=0xaa38,"VID"=0x1002},{"LayoutID"=0x4f,"StandInDID"=0xaa30,"SourceDID"=0xaa40,"VID"=0x1002},{"LayoutID"=0x4f,"StandInDID"=0xaa30,"SourceDID"=0xaa38,"VID"=0x1002}) | } it lists 0x10de0ac0 (Nvidia MCP79) in the CodecAddressFilterArray. Update: CodecAddressFilterArray is hardwired in Info.plist for AppleHDAController, so 0x10de0ac0 is not relevant. 0x15ad1975 is the right ID, it's just not in the list. Link to comment Share on other sites More sharing options...
Slice Posted December 28, 2012 Share Posted December 28, 2012 @slice: Which version of xcode are you using? It builds fine with xcode 4.5.2... 3.2.5 on OSX10.6.8 Tomorrow I will try with XCode4 Link to comment Share on other sites More sharing options...
Regi Yassin Posted December 28, 2012 Share Posted December 28, 2012 works fine on Xcode 4.5.2 Link to comment Share on other sites More sharing options...
Slice Posted December 28, 2012 Share Posted December 28, 2012 Also fail in 10.7.5 Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 28, 2012 Author Share Posted December 28, 2012 It's because it uses ARC I'll make a version too for SL + Lion (32 + 64 bit) Keep you posted Slice @ Slice: It's made... it's the NoARC zip... can be built with Xcode 3.2 and later... Link to comment Share on other sites More sharing options...
Andy Vandijck Posted December 28, 2012 Author Share Posted December 28, 2012 Added a new autorelease pool... Sources + binary for Lion/Snow Leopard... Slice, try this one and let me know if it still leaks... getcodecid_new.zip Link to comment Share on other sites More sharing options...
Slice Posted December 29, 2012 Share Posted December 29, 2012 Added a new autorelease pool... Sources + binary for Lion/Snow Leopard... Slice, try this one and let me know if it still leaks... Sorry, but exactly the same issue Link to comment Share on other sites More sharing options...
Poco Posted December 29, 2012 Share Posted December 29, 2012 What version of Xcode are you trying to compile on? You have to be running Xcode 4.4+ (Apple LLVM 4.0+ compiler) to compile code that uses Objective-C literals for objects other than simple strings. You can read more about it here http://clang.llvm.or...eCLiterals.html Link to comment Share on other sites More sharing options...
Slice Posted December 30, 2012 Share Posted December 30, 2012 OK, I will update my XCode installation to recent version. As I see Xcode 4.4.1 is more recent then 4.5.2?! EDITED. Yes, with Xcode 4.4.1 the project is compilable. The version also contains 4.5.2 tools and libraries to compile under Lion for ML. Thanks iPoco for the note. Link to comment Share on other sites More sharing options...
Slice Posted December 30, 2012 Share Posted December 30, 2012 Added a new autorelease pool... Sources + binary for Lion/Snow Leopard... Slice, try this one and let me know if it still leaks... Yes, it still leaks iHack:~ Slice$ /Users/Slice/Downloads/getcodecid\ 2/DerivedData/Build/Products/Debug/getcodecid objc[614]: Object 0x103017ef0 of class __NSArrayM autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug Realtek ALC887/888b ATI R6xx HDMI iHack:~ Slice$ Link to comment Share on other sites More sharing options...
Micky1979 Posted December 31, 2012 Share Posted December 31, 2012 Added a new autorelease pool... Sources + binary for Lion/Snow Leopard... Slice, try this one and let me know if it still leaks... Compiling well in Mountain Lion alsoxCode Version 4.5.2 (4G2008a) Micky Link to comment Share on other sites More sharing options...
ErmaC Posted December 31, 2012 Share Posted December 31, 2012 Hi Andy. works fine here. localhost:Release ErmaC$ ./getcodecid Analog Devices AD2000b localhost:Release ErmaC$ I add some more "codecs"source from here: http://people.freebs.../sound/pci/hda/ getcodecid.h.zip Also would be nice add the revision. I have a second motherboard with ALC1200 (getcodecid not tested yet on it) but I think his Audio codec will be recognized as ALC888 localhost:Release Isa$ ./getcodecid Realtek ALC888 localhost:Release Isa$ as you can see from the source above the device revision id is used for evaluating the device (ALC) http://people.freebs...pci/hda/hdacc.c mine example is one there is more... { HDA_CODEC_ALC888, 0x0101, "Realtek ALC1200" }, { HDA_CODEC_ALC888, 0, "Realtek ALC888" }, { HDA_CODEC_ALC861, 0x0340, "Realtek ALC660" }, { HDA_CODEC_ALC861, 0, "Realtek ALC861" }, Fabio 4 Link to comment Share on other sites More sharing options...
Micky1979 Posted September 7, 2014 Share Posted September 7, 2014 On demand of Uphuck I have created a command line tool to detect the codec id. Anv in the project that use ARC, fix the autorelease pool error by moving the @autoreleasepool as below from: int main(int argc, const char * argv[]) { io_iterator_t itThis; io_service_t service; io_service_t parent; io_name_t name; NSString *pciFormat = @"0x%04lX%04lX"; NSMutableArray *temp = [NSMutableArray array]; @autoreleasepool { to int main(int argc, const char * argv[]) { @autoreleasepool { or int main(int argc, const char * argv[]) { io_iterator_t itThis; io_service_t service; io_service_t parent; io_name_t name; NSString *pciFormat = @"0x%04lX%04lX"; @autoreleasepool { NSMutableArray *temp = [NSMutableArray array]; In short before the "temp" mutable array, and it will work as expect in 10.7 on by setting the "OSX Deployment target" to 10.7 and using the latest 10.10 SDK (i have all SDK). I've compiled in 10.7.5 Can I use your code in Pandora, obviously with credits? EDIT it work in Snow Leopard also keeping the "OSX Deployment target" to 10.7, but always set a SDK greater than or equal to 10.7...to use the obj-c Automatic Reference Counting Micky 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted March 19, 2015 Share Posted March 19, 2015 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 EDIT project contain a pre-built getcodecid command ready to use getcodecid.zip 1 Link to comment Share on other sites More sharing options...
insanelyDeepak Posted March 20, 2015 Share Posted March 20, 2015 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 EDIT project contain a pre-built getcodecid command ready to use Thank you micky ,, working awesome .. Link to comment Share on other sites More sharing options...
calibre™ Posted March 20, 2015 Share Posted March 20, 2015 wont run on 10.6.8 due to "iIllegal instruction" Fixed: getcodecid.zip Link to comment Share on other sites More sharing options...
Micky1979 Posted March 21, 2015 Share Posted March 21, 2015 Test this one:getcodecid.zip ....no change in the code, only differente arch for the binary "Standar 32-64 bit Intel", compiled i Lion this time. 1 Link to comment Share on other sites More sharing options...
insanelyDeepak Posted April 3, 2015 Share Posted April 3, 2015 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 getcodecid.zip Link to comment Share on other sites More sharing options...
calibre™ Posted April 3, 2015 Share Posted April 3, 2015 add source please deepak Link to comment Share on other sites More sharing options...
Recommended Posts