deomsh Posted January 31 Posted January 31 Hello @space223 , can't say, there are no records of this codec with HDA2.DLL. Did you try already?
Guest Drew Hoffman Posted February 4 Posted February 4 @deomsh does your universal hdaicout.hda file work for any IDT and VIA HD Audio codecs or only Realtek? I'm looking for hints on what verbs I might be missing for my native WDM HD Audio driver which now works on most Intel chipsets with a Realtek codec but is still silent on IDT and VIA codecs . Unlike the Watler's driver I have a codec node parser if a very basic one taken from a hobbyist OS. https://msfn.org/board/topic/187713-native-wdm-hd-audio-driver-for-windows-98seme/page/1/
deomsh Posted February 5 Posted February 5 (edited) Hi @Drew Hoffman , didn't expect you in this thread.... I am aware of your project (I am reading MSFN daily). So far I had no time to test your driver, but your project looks promising, in case of Windows 98/ME. About your question: difficult to say. If you search in this thread for IDT, it seems there is one report, working with some quasi-universal version of HDAICOUT.HDA. But that's a while ago... I also 'did' one VIA codec (VT1708B) in this thread, additional verbs where needed in that case. But at home I did VT1705 on Asrock N68C-S UCC without. Somehow Realtek codecs have the 'easiest' architecture, I 'did' a few. ALC66x-ALC88x and ALC1220 have roughly the same nodes and same output pin's Apart from extra's in ALC88x. ALC231/ALC260 are already different. This is in my notes (ment for personal use): The lines in my quasi-universal version of HDAICOUT.HDA focus on a few nodes/ widgets for power up, open the playback path and to set the DAC and volume to default values. Because there are about max 200 verbs free for sending at once, and because in my approach HDAICOUT.HDA is used to sent same verb to 'all' nodes/ widgets, so type of verbs is limited. As such this quasi-universal approach is fully 'blind', no intelligence at all (hopefully some in the maker). All based on Intel's High Definition Audio Specification, NOT on specific Realtek codecs. In most of my versions of HDAICOUT.HDA I have concentrated on output's, but I had plans to make a new version to 'open' input-ampifiers too (mixers). But furthermore ignoring Connection Select will be the price to pay. So maybe you can play with '35xxx', '36xxx' or L+R combined: '37xxx', just an idea. From my notes: Set Amplifier Gain 3 Payload(s) Set Amplifier Gain 3 5 0 8 0 Mute Input Channel 0 R Set Amplifier Gain 3 5 0 0 0 UnMute Input Channel 0 R Set Amplifier Gain 3 5 0 7 F Max Input Volume Channel 0 R Set Amplifier Gain 3 6 0 8 0 Mute Input Channel 0 L Set Amplifier Gain 3 6 0 0 0 UnMute Input Channel 0 L Set Amplifier Gain 3 6 0 7 F Max Input Volume Channel 0 L Set Amplifier Gain 3 7 0 8 0 Mute Input Channel 0 R+L Set Amplifier Gain 3 7 0 0 0 UnMute Input Channel 0 R+L Set Amplifier Gain 3 7 0 7 F Max Input Volume Channel 0 R+L Set Amplifier Gain 3 7 1 7 F Max Input Volume Channel 1 R+L But in case of EAPD, Unsollicited Response and GPIO, things are different and often model-specific (laptops). In that case more information is needed. I only did a few codecs/ chipsets, always on a n=1 basis, with help of study of Linux (ALSA)-sources to find appropiate verbs. However you have a parser, should make things more easy (Watler delivers a seperate parser too in version L, but his driver does not use a parser as such). I am willing to help, but I am not a programmer, just an ordinary Joe with more spare time because I am not interested in sports (no offence to readers of this thread ment of course). Edited February 6 by deomsh Addition, correction
isolar Posted February 9 Posted February 9 Hi Deomsh! I was on this thread about 5 years ago and you assisted me to get audio working on a Soundmax AD1981HD codec. Since then I have also managed to get audio working on IDT 92HD75B3X5 codec and a Realtek ALC272 codec. I'm currently working on a 10EC 0280 codec which I have had limited success with so far, seemingly by using a mix of Watler's driver and Drew Hoffman's driver he is developing. If there's any info I can provide to assist your database please let me know and I'll be happy to assist. To note: the 10EC 0280 codec using Watler's is having the codec index mapping issue (it is mapped as index $2 which is actually the HDMI audio out, and the codec index should be $0), but with a combination of Hoffman's driver I am able to get sound - but no idea why. If you have any theories here I would be keen to know. Thank you and all the best!
deomsh Posted February 9 Posted February 9 (edited) Hi Isolar, long time no see. About your question: there are two possibilities, or their combination. 1) Your HD Audio controler needs a nosnoop bit set, you can check with WPCREdit. 2) The parser of WDMHDA identified some verbs you didn't use in your HDAICOUT.HDA. Possible candidates: 'opening' inputs (mixer?), EAPD or GPIO. Search in this thread for verbs. Edited February 9 by deomsh 1
isolar Posted February 10 Posted February 10 Thanks Deomsh, great to be back with you again! I am looking into these options now. 1)I have WPCREdit 1.4 and have located the registers for the HD Audio device 8086 0F04. How can I tell (if it exists) which bit is nosnoop and what to set it to? 2)I have currently sent verbs (via HDAICOUT) to map all of these except GPIO. Suspect number 1.. I will investigate further and let you know findings. 3)Side thought.. what does PCIPATCHB do and how can I tell if I should adjust it? Current verb list is (please advise if ordering of verbs could be wrong?): No double reset or power verbs - I had these in initially but found on reset that the codec sets power states to D0 - this seems to happen when Hoffman's driver is disabled too so not included. $01470C02 - Enable EAPD on Lineout $00C3B000 - Unmute Audio Mixer $0143B000 - Unmute LineOut $00270610 - DAC stream and channel set to stream 1 channel 0 (stream 1 as HDA specs say stream 0 is reserved as unused) $00220011 - DAC stream 48khz 16bit 2 channels $00C70100 - Audio Mixer connected to DAC $01470100 - LineOut connected to Audio Mixer $01470740 - LineOut Output enabled SleepingWidget=$01 (AFG) VolumeWidget=$02 (DAC - DAC at reset has volume set to 0dB so simply unmuting Audio Mixer and LineOut should still produce 0dB?) OutputWidget=$02 (DAC - is this correct?) Thanks hope to hear from you soon!
deomsh Posted February 10 Posted February 10 (edited) @isolar I looked into it, up to a certain extent for now. About 1: My initial idea was you can make print-screens to compare register 8086:0F04 without and with HDA.SYS from @Drew Hoffman but today I searched for the appropriate PCI-registers and couldn't find them. It seems your system has a SoC (System on Chip), not a 'classic' design. In some 4274 pages long Intel Datasheet I found things are different, seems have to do with separate PCI Configuration Registers (probably XT_SNP). So I expect no results. I had some conversations with Copilot during traffic, and it seems it is even possible to damage your hardware in this case. 'While less common, repeatedly writing unsupported values to hardware registers could stress the hardware or violate electrical timing constraints, leading to permanent damage in extreme circumstances.' Normally I use a disclaimer like 'writing to PCI registers is at your own risk, if any' but for now I strongly suggest NOT to write to your PCI registers and NOT try to use pcipatchB (unless you are knowing what you are doing). About 2: I Googled ALC280, so far GPIO not found mentioned in Linux sources! About 3: '$00C3B000 - Unmute Audio Mixer': this is a verb ment for OUTPUT's (3B000). For inputs use: Begin ;;node 0xC:Analog_Mixer $00CB0000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_R $00CB2000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_L $00C37000;AC_VERB_SET_AMP_GAIN_MUTE;Channel0_R+L;Unmute ;$00C37080;AC_VERB_SET_AMP_GAIN_MUTE;Channel0_R+L;Mute $00CB0000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_R $00CB2000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_L $00CB0001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_R $00CB2001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_L $00C37100;AC_VERB_SET_AMP_GAIN_MUTE;Channel1_R+L;Unmute ;$00C37180;AC_VERB_SET_AMP_GAIN_MUTE;Channel1_R+L;Mute $00CB0001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_R $00CB2001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_L End Mixer: '$00C70100 - Audio Mixer connected to DAC': as such okay, but I don't expect Selector Widgets before a Mixer. If wanted, better test with GET verbs too: $00CF0100;AC_VERB_GET_CONNECT_SEL;Channel0 $00C70100;AC_VERB_SET_CONNECT_SEL;Channel0 $00CF0100;AC_VERB_GET_CONNECT_SEL;Channel0 $00CF0101;AC_VERB_GET_CONNECT_SEL;Channel1 $00C70101;AC_VERB_SET_CONNECT_SEL;Channel1 $00CF0101;AC_VERB_GET_CONNECT_SEL;Channel1 Note for interested readers: a GET-VERB returns a meaningful payload, can be read-out in HDAICIN.TXT. SleepingWidget: I would set 'SleepingWidget=$02' in HDACFG.INI. Volume: If Volume is set to '00' I am afraid it's minimal volume. Please correct me if I am wrong! Better try a moderate value like '3F'. Next example Verbs are without Node/ Widget address: B8000;AC_VERB_GET_AMP_GAIN_MUTE;status_ch0_R BA000;AC_VERB_GET_AMP_GAIN_MUTE;status_ch0_L 3B000;AC_VERB_SET_AMP_GAIN_MUTE;unmute_ch0_L+R B8000;AC_VERB_GET_AMP_GAIN_MUTE;status_ch0_R BA000;AC_VERB_GET_AMP_GAIN_MUTE;status_ch0_L 3B03F;AC_VERB_SET_AMP_GAIN_MUTE;set_volume_ch0_L+R B8000;AC_VERB_GET_AMP_GAIN_MUTE;status_ch0_R BA000;AC_VERB_GET_AMP_GAIN_MUTE;status_ch0_L Power Verbs: I do not understand what you said about your Power States, please explain in (much) more detail. Further: Looks all good to me. Do not forget I have at home only about four different (desktop) High Definition Audio Controllers/ Codecs, all working with my quasi-universal HDAICOUT.HDA and only one HDA controller needed pcipatchB (or set already by Watler's HDA2.DLL, like on my SB710 chipset). I have one laptop from work, but I can not even open a command-line. Booting from USB is out of the question. So I can not run any tests on machines like yours.... Edited February 10 by deomsh
isolar Posted February 11 Posted February 11 @deomsh thank you for all of this info! Notes below with @Drew Hoffman HDA.SYS renamed HDA.BAK for testing purely Watler's. 1) Noted! I will leave the PCI registers alone for now. 2) The AFG reports some GPI/O - please see codec response log file attached below for full verb parameter responses. Response on AFG is $40000005 (reports 5 GPI/O's). 3) Until now I only unmuted outputs, but tested also with combined output and input payloads as you mentioned using $00C3F03F (F:Set out+In_L+R, 0: Index 0, 3F: Unmute and volume to 3F). Also $0143F03F. No change with these. Sleeping Widget) I tried $02. No change with this. Volume) According to DAC1 at reset AmpOut is set to $57 which when checking steps settings is 0dB and unmuted. I maybe read somewhere that amp gain is added together if you also set it on mixer and pin widget (but maybe I am imagining this and instead it adds L+R channels?). I thought if I set $57 also on Mixer and Pin Widget the amp gain becomes $57 + $57 + $57 at LineOut.. I think I am wrong here maybe..? Power Verbs) At the beginning of testing I set $00170500 and also $0C and $14 to 70500 to power on the nodes to D0 state, however checking F05 readings in HDAICIN without 705 set at reset: all nodes showing $00000000 (D0 power state) so I assume not needed to be set. Maybe I am wrong here and reading $00000000 could also mean no reading at all, therefore the 705 verbs are required? So I tested with that but no difference in result. Further) That is great you have a quasi-universal HDAICOUT.HDA that works on multiple codecs! Hopefully I can help confirm some more codecs for this. Please see image here with quick lookup reference I made from GET verbs and the responses that helped me map this codec. I am lost at what the vendor defined audio widgets could be. Any idea for these? CODEC RESPONSES.TXT
deomsh Posted February 11 Posted February 11 (edited) You have the Real Spirit! 1) Comparing 8086:0F04 only with WPCREdit with and without HDA.SYS will do no harm... 2) True according to 'sent $001F0011; got $40000005', but these are number of pin's only. Unknown if they are used in your laptop and how. I searched for ALC280 with GPIO. They are mentioned in https://lxr.missinglinkelectronics.com/linux+v4.9/sound/pci/hda/patch_realtek.c BTW look at ALC269 too. But most of the time mic-LED or mic-headset related? I also found a codec dump of 10EC0280: https://github.com/yehia2amer/Dell-Precision-T7610-Workstation-Hackintosh-Guide/blob/master/Linux ACPI %26 Sound Dump/asound/codec_dump.txt with 5 GPIO's mentioned. To me it seems almost equal to Block Diagram in Datasheet of ALC231 I have in my collection (ALC269 is a bit different). 3) I didn't mention verb '3F', only as payload in: '3B03F' (channel 0 L+R). I am not sure if your idea of '3Fxxx' is a good verb. For inputs I use 37xxx and for outputs 3Bxxx (both L+R together, more economical in HDAICOUT.HDA). About Sleeping Widget: if HDA2.DLL identifies the wrong codec (you mentioned Codec index $2 - probably your HDMI codec), I have seen earlier in this thread the codec is fully set by HDAICOUT.HDA, while the three Widget settings in HDACFG.INI where not working anymore, and WAVEOUT.EXE neither. Volume: no, there is only one Volume setting per DAC, so if there are 0x57 steps (87 decimal), max will be 57 (hex), so even above 3F (hex)! Power: if you used F0500 you are right if reponse was all zero. Still strange in case of a laptop. But: while debugging I would always Power up all nodes/ widgets. Better test without the two Reset Verbs too. Vendor Defined Widgets: always unknown, never see them mentioned in Datasheets. But now and then identified by Linux guy's (ALSA). But in case of ALC280 I found nothing special so far. For now I have two questions: 1) is the slider moving if you play a sound-file? Just to be sure... 2) Why concentrate on Pin-Widget $014? There are many other possibilities! I did a 'quicky' and made you a debug-version of HDAICOUT.HDA ment for ALC280 only. If you want to test, just rename. Further the usual procedure. ;;Debug-version_1_for_ALC280;HDACFG.INI:Codec_index=$0 Begin $0017FF00;AC_VERB_SET_CODEC_RESET; $0017FF00;AC_VERB_SET_CODEC_RESET;Always_twice! End Begin ;;Node 0x1:Audio_Function_Group $001F0500;AC_VERB_GET_POWER_STATE $00170500;AC_VERB_SET_POWER_STATE;Power up! $001F0500;AC_VERB_GET_POWER_STATE ;;GPIO: io=5, o=0, i=0, unsolicited=1, wake=0 ;; IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0 ;; IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0 ;; IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0 ;; IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0 ;; IO[4]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0 $001F0011;AC_PAR_GPIO_CAP;CODEC_AFG_GPIO_CAP=5 $001F1600;AC_VERB_GET_GPIO_MASK;$00000000 $001F1700;AC_VERB_GET_GPIO_DIRECTION;$00000000 $001F1500;AC_VERB_GET_GPIO_DATA;$00000000 ;$00171600;AC_VERB_SET_GPIO_MASK,00 ;$00171700;AC_VERB_SET_GPIO_DIRECTION,00 ;$00171500;AC_VERB_SET_GPIO_DATA,00 ;$001F1600;AC_VERB_GET_GPIO_MASK;$00000000 ;$001F1700;AC_VERB_GET_GPIO_DIRECTION;$00000000 ;$001F1500;AC_VERB_GET_GPIO_DATA;$00000000 ;$00171601;AC_VERB_SET_GPIO_MASK,01 ;$00171701;AC_VERB_SET_GPIO_DIRECTION,01 ;$00171501;AC_VERB_SET_GPIO_DATA,01 ;$001F1600;AC_VERB_GET_GPIO_MASK;$00000001 ;$001F1700;AC_VERB_GET_GPIO_DIRECTION;$00000001 ;$001F1500;AC_VERB_GET_GPIO_DATA;$00000001 ;$00171602;AC_VERB_SET_GPIO_MASK,02 ;$00171702;AC_VERB_SET_GPIO_DIRECTION,02 ;$00171502;AC_VERB_SET_GPIO_DATA,02 ;$001F1600;AC_VERB_GET_GPIO_MASK;$00000002 ;$001F1700;AC_VERB_GET_GPIO_DIRECTION;$00000002 ;$001F1500;AC_VERB_GET_GPIO_DATA;$00000002 End Begin ;;node 0x2:DAC_1 $002F0500;AC_VERB_GET_POWER_STATE $00270500;AC_VERB_SET_POWER_STATE;Power up! $002F0500;AC_VERB_GET_POWER_STATE $002F0600;AC_VERB_GET_CONV;GET_CHANNEL_STREAMID $00270610;AC_VERB_SET_CHANNEL_STREAMID,01 $002F0600;AC_VERB_GET_CONV;GET_CHANNEL_STREAMID $002A0000;AC_VERB_GET_STREAM_FORMAT $00224011;AC_VERB_SET_STREAM_FORMAT;44.1kHz_16-bits $002A0000;AC_VERB_GET_STREAM_FORMAT $002B8000;AC_VERB_GET_AMP_GAIN_MUTE $0023B057;AC_VERB_SET_AMP_GAIN_MUTE;max_vol $002B8000;AC_VERB_GET_AMP_GAIN_MUTE End Begin ;;node 0x3:DAC_2 $003F0500;AC_VERB_GET_POWER_STATE $00370500;AC_VERB_SET_POWER_STATE;Power up! $003F0500;AC_VERB_GET_POWER_STATE $003F0600;AC_VERB_GET_CONV;GET_CHANNEL_STREAMID $00370610;AC_VERB_SET_CHANNEL_STREAMID,01 $003F0600;AC_VERB_GET_CONV;GET_CHANNEL_STREAMID $003A0000;AC_VERB_GET_STREAM_FORMAT $00324011;AC_VERB_SET_STREAM_FORMAT;44.1kHz_16-bits $003A0000;AC_VERB_GET_STREAM_FORMAT $003B8000;AC_VERB_GET_AMP_GAIN_MUTE $0033B057;AC_VERB_SET_AMP_GAIN_MUTE;max_vol $003B8000;AC_VERB_GET_AMP_GAIN_MUTE End Begin ;;node 0xC:Analog_Mixer $00CF0500;AC_VERB_GET_POWER_STATE $00C70500;AC_VERB_SET_POWER_STATE;Power up! $00CF0500;AC_VERB_GET_POWER_STATE $00CB0000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_R $00CB2000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_L $00C37000;AC_VERB_SET_AMP_GAIN_MUTE;Channel0_R+L;Unmute ;$00C37080;AC_VERB_SET_AMP_GAIN_MUTE;Channel0_R+L;Mute $00CB0000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_R $00CB2000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_L $00CB0001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_R $00CB2001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_L $00C37100;AC_VERB_SET_AMP_GAIN_MUTE;Channel1_R+L;Unmute ;$00C37180;AC_VERB_SET_AMP_GAIN_MUTE;Channel1_R+L;Mute $00CB0001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_R $00CB2001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_L End Begin ;;node 0xC:Analog_Mixer $00DF0500;AC_VERB_GET_POWER_STATE $00D70500;AC_VERB_SET_POWER_STATE;Power up! $00DF0500;AC_VERB_GET_POWER_STATE $00DB0000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_R $00DB2000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_L $00D37000;AC_VERB_SET_AMP_GAIN_MUTE;Channel0_R+L;Unmute ;$00D37080;AC_VERB_SET_AMP_GAIN_MUTE;Channel0_R+L;Mute $00DB0000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_R $00DB2000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_L $00DB0001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_R $00DB2001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_L $00D37100;AC_VERB_SET_AMP_GAIN_MUTE;Channel1_R+L;Unmute ;$00D37180;AC_VERB_SET_AMP_GAIN_MUTE;Channel1_R+L;Mute $00DB0001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_R $00DB2001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_L End Begin ;;node 0xF:Analog_Mixer $00FF0500;AC_VERB_GET_POWER_STATE $00F70500;AC_VERB_SET_POWER_STATE;Power up! $00FF0500;AC_VERB_GET_POWER_STATE $00FB0000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_R $00FB2000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_L $00F37000;AC_VERB_SET_AMP_GAIN_MUTE;Channel0_R+L;Unmute ;$00F37080;AC_VERB_SET_AMP_GAIN_MUTE;Channel0_R+L;Mute $00FB0000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_R $00FB2000;AC_VERB_GET_AMP_GAIN_MUTE;Channel0_L $00FB0001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_R $00FB2001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_L $00F37100;AC_VERB_SET_AMP_GAIN_MUTE;Channel1_R+L;Unmute ;$00F37180;AC_VERB_SET_AMP_GAIN_MUTE;Channel1_R+L;Mute $00FB0001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_R $00FB2001;AC_VERB_GET_AMP_GAIN_MUTE;Channel1_L End Begin ;;node 0x14;[Fixed]Speaker_at_Int_N/A? $014F0500;AC_VERB_GET_POWER_STATE $01470500;AC_VERB_SET_POWER_STATE;Power up! $014F0500;AC_VERB_GET_POWER_STATE $014F0800;AC_VERB_GET_UNSOLICITED_RESPONSE $014F0900;AC_VERB_GET_PIN_SENSE $014F0700;AC_VERB_GET_PIN_WIDGET_CONTROL $01470740;AC_VERB_SET_PIN_WIDGET_CONTROL;out_enable $014F0700;AC_VERB_GET_PIN_WIDGET_CONTROL $014B8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $014BA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L $0143B000;AC_VERB_SET_AMP_GAIN_MUTE;Unmute $014B8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $014BA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L $014F0C00;AC_VERB_GET_EAPD_BTLENABLE;External Amplifier Power-Down $01470C02;AC_VERB_SET_EAPD_BTLENABLE;External Amplifier Power-Down $014F0C00;AC_VERB_GET_EAPD_BTLENABLE;External Amplifier Power-Down End Begin ;;node 0x15;[Jack]HP_Out_at_Ext_Front? $015F0500;AC_VERB_GET_POWER_STATE $01570500;AC_VERB_SET_POWER_STATE;Power up! $015F0500;AC_VERB_GET_POWER_STATE $015F0800;AC_VERB_GET_UNSOLICITED_RESPONSE $015F0900;AC_VERB_GET_PIN_SENSE $015F0700;AC_VERB_GET_PIN_WIDGET_CONTROL ;$015707C0;AC_VERB_SET_PIN_WIDGET_CONTROL;hp_amp_out_enable $01570740;AC_VERB_SET_PIN_WIDGET_CONTROL;out_enable $015F0700;AC_VERB_GET_PIN_WIDGET_CONTROL $015B8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $015BA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L $0153B000;AC_VERB_SET_AMP_GAIN_MUTE;Unmute $015B8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $015BA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L $015F0C00;AC_VERB_GET_EAPD_BTLENABLE;External Amplifier Power-Down $01570C02;AC_VERB_SET_EAPD_BTLENABLE;External Amplifier Power-Down $015F0C00;AC_VERB_GET_EAPD_BTLENABLE;External Amplifier Power-Down End Begin ;;node 0x16;[N/A]Speaker_at_Ext_Rear? $016F0500;AC_VERB_GET_POWER_STATE $01670500;AC_VERB_SET_POWER_STATE;Power up! $016F0500;AC_VERB_GET_POWER_STATE $016F0800;AC_VERB_GET_UNSOLICITED_RESPONSE $016F0900;AC_VERB_GET_PIN_SENSE $016F0700;AC_VERB_GET_PIN_WIDGET_CONTROL $01670740;AC_VERB_SET_PIN_WIDGET_CONTROL;out_enable $016F0700;AC_VERB_GET_PIN_WIDGET_CONTROL $016B8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $016BA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L $0163B000;AC_VERB_SET_AMP_GAIN_MUTE;Unmute $016B8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $016BA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L $016F0C00;AC_VERB_GET_EAPD_BTLENABLE;External Amplifier Power-Down $01670C02;AC_VERB_SET_EAPD_BTLENABLE;External Amplifier Power-Down $016F0C00;AC_VERB_GET_EAPD_BTLENABLE;External Amplifier Power-Down End Begin ;;node 0x17;[N/A]Speaker_at_Ext_Rear? $017F0500;AC_VERB_GET_POWER_STATE $01770500;AC_VERB_SET_POWER_STATE;Power up! $017F0500;AC_VERB_GET_POWER_STATE $017F0800;AC_VERB_GET_UNSOLICITED_RESPONSE $017F0900;AC_VERB_GET_PIN_SENSE $017F0700;AC_VERB_GET_PIN_WIDGET_CONTROL $01770740;AC_VERB_SET_PIN_WIDGET_CONTROL;out_enable $017F0700;AC_VERB_GET_PIN_WIDGET_CONTROL $017B8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $017BA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L $0173B000;AC_VERB_SET_AMP_GAIN_MUTE;Unmute $017B8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $017BA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L End Begin ;;node 0x18;[Jack]_Mic_at_Ext_Rear? $018F0500;AC_VERB_GET_POWER_STATE $01870500;AC_VERB_SET_POWER_STATE;Power up! $018F0500;AC_VERB_GET_POWER_STATE $018F0800;AC_VERB_GET_UNSOLICITED_RESPONSE $018F0900;AC_VERB_GET_PIN_SENSE $018F0700;AC_VERB_GET_PIN_WIDGET_CONTROL $01870740;AC_VERB_SET_PIN_WIDGET_CONTROL;out_enable $018F0700;AC_VERB_GET_PIN_WIDGET_CONTROL $018B8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $018BA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L $0183B000;AC_VERB_SET_AMP_GAIN_MUTE;Unmute $018B8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $018BA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L End Begin ;;node 0x1A;[Jack]_Mic_at_Ext_Front? $01AF0500;AC_VERB_GET_POWER_STATE $01A70500;AC_VERB_SET_POWER_STATE;Power up! $01AF0500;AC_VERB_GET_POWER_STATE $01AF0800;AC_VERB_GET_UNSOLICITED_RESPONSE $01AF0900;AC_VERB_GET_PIN_SENSE $01AF0700;AC_VERB_GET_PIN_WIDGET_CONTROL $01A70740;AC_VERB_SET_PIN_WIDGET_CONTROL;out_enable $01AF0700;AC_VERB_GET_PIN_WIDGET_CONTROL $01AB8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $01ABA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L $01A3B000;AC_VERB_SET_AMP_GAIN_MUTE;Unmute $01AB8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $01ABA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L End Begin ;;node 0x1B;[Jack]Line_Out_at_Ext_Rear? $01BF0500;AC_VERB_GET_POWER_STATE $01B70500;AC_VERB_SET_POWER_STATE;Power up! $01BF0500;AC_VERB_GET_POWER_STATE $01BF0800;AC_VERB_GET_UNSOLICITED_RESPONSE $01BF0900;AC_VERB_GET_PIN_SENSE $01BF0700;AC_VERB_GET_PIN_WIDGET_CONTROL $01B70740;AC_VERB_SET_PIN_WIDGET_CONTROL;out_enable $01BF0700;AC_VERB_GET_PIN_WIDGET_CONTROL $01BB8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $01BBA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L $01B3B000;AC_VERB_SET_AMP_GAIN_MUTE;Unmute $01BB8000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_R $01BBA000;AC_VERB_GET_AMP_GAIN_MUTE;Channel_0_L End I hope I made no errors, but please check for yourself. The number of Verbs should just fit I suppose, but you can check with HDAICIN.TXT of course. HDAICOUT_DEBUG_1_ALC280.HDA Edited February 11 by deomsh
isolar Posted February 13 Posted February 13 Thanks for this! I have tested this debug file with HDA.SYS disabled but unfortunately no sound. I re-enabled HDA.SYS and there is sound and this time no high pitched squeal and audio is sounding more stable than with my initial HDAICOUT. Investigation required as to what makes the difference.. "You have the Real Spirit!" - just a crazy brain that likes to solve puzzles. 1) No change detected in the PCI registers with and without HDA.SYS enabled for WPCREdit. I guess that rules out nosnoop here? 2) Excellent find! I ran through the codec dump and think you are correct for the GPI/O pins here.. Interesting I found the ALC269 datasheet and noticed node $14 has SPK-OUT+ and SPK-OUT - which I assume is GPI/O controlled? Unsure how to set this though. The same path of $02 to $0C to $14 can be found here and on most ALC codecs that I have looked at, which is why I have been working specifically with $14. I checked out ALC231 and looks very similar indeed! - much more simplified than ALC269. Do you have a HDAICOUT working file for ALC231 I could test on this codec? 3) Looking into the set amplifier payload format I wondered if possible to set 'both in and out' plus L and R which in hex is F07F, so using 3F07F was a test for that which I could use on all pin widgets whether they were out or in. I believe if one is not possible it ignores it, but possibly ignores the entire verb if one doesn't exist..? So I used your advice using 37xxx and 3Bxxx instead for further testing. Sleeping Widget) That is interesting to know.. Yes it is the HDMI codec being detected - see my HDACFG file below - In HDALOG it identifies the 10EC 0280 codec first, but as it gets no response at the next check it switches to codec $2 which is HDMI. Volume) Yes 57hex is max volume and 0dB setting for this DAC. My mistake was looking to find hex 57 in responses also on 0C and 14, but I see now that they change from muted response to a plain $00000000 response when unmuted, not $57.. I think? Power) Yes I thought it was strange to receive D0 response before any settings are applied.. so I have gone back to setting 70500 setting on all widgets in the path for now. No problem as they will be ignored if not needed, just not economical for the HDAICOUT file verb limit. Vendor Defined Widgets) Yes still a mystery even after combing through the linux dumps... I wonder what they are? In answer to your questions: 1) I am testing using the 'sounds' in control panel and playing the available ones. If the play button can be pressed, but no sound is heard, then reverts to stop mode, I assume this is telling me the sound is playing and audio output path is correct but blocked as something is muted.. would that be correct? When the audio path is incorrectly connected I can still press play but it never reverts back to stop mode so the path needs fixing. 2) I use $14 as most ALC codec datasheets I have studied use this port for speaker out on the notebooks I have tested (hardwired to the speakers). Also the connection list pointed me to use this as it is the 1st option (not always correct though!). I have since tried opening all possible output paths up but still no results to show with just Watler's driver enabled. Thank you very much for the debug file. I ran it and the amount of codecs is good, no room for more! Please see HDAICIN results attached below. I have noticed now that there is possibly a timing issue in the verb responses being recorded as '4011' which is audio stream setting is sometimes shown as the result of an amplifier gain setting request (Bxxxx payload).. and sometimes no response at all, just 0's until the check is repeated.. any idea how to stabilize these results? My wait times as you can see in HDACFG file below is set to $400. I tried running the get command 3 times in a row to see this and you can clearly see it misses some of them. HDAcfg.iniHDAICIN2.TXTHDAICIN3.TXTHDALOG.TXTHDAICIN.TXT
deomsh Posted February 13 Posted February 13 (edited) Aha, a Puzzler. Earlier I doubted if I would give you my debug-version of HDAICOUT.HDA so early, possibly disturbing you in your own development. I am more of a Problem Solver: if there is some problem I wake up, if it is solved I loose interest. 1) Not neccessarily, I'd like to see a picture of 8086:0F04 from WPCREdit in 8-bits mode. Please remove HDA.SYS fully in Safe mode before, switch off your machine and wait two minutes before next boot. I also like to know your EXACT chipset, or at least your model number. 2) There is no HDAICOUT.HDA in case of ALC231 in my collection, has been never asked for on msfn. I just downloaded the datasheet in the past, don't know why anymore. 'SPK-OUT+ and SPK-OUT -' will be just electrical characteristics, as such say nothing about GPIO. But you can try the two GPIO settings in the debug version of HDAICOUT.HDA which I commented out. First three SET-Verbs are needed to set GPIO [0], second three for GPIO [1] (NOT their combination). Maybe better rearrange, I made a reconstruction with help of Copilot, I only 'did' GPIO once, with awhooley in another thread: In case of GPIO [0]: $001F1700;AC_VERB_GET_GPIO_DIRECTION;0=input;1=output $001F1600;AC_VERB_GET_GPIO_MASK;0=inactive;1=active $001F1500;AC_VERB_GET_GPIO_DATA;0=GRND;1=High $00171701;AC_VERB_SET_GPIO_DIRECTION;0=input;1=output $00171601;AC_VERB_SET_GPIO_MASK;1=active $00171501;AC_VERB_SET_GPIO_DATA;0=GRND;1=High $001F1700;AC_VERB_GET_GPIO_DIRECTION;0=input;1=output $001F1600;AC_VERB_GET_GPIO_MASK;0=inactive;1=active $001F1500;AC_VERB_GET_GPIO_DATA;0=GRND;1=High In case of GPIO [1]: $001F1700;AC_VERB_GET_GPIO_DIRECTION;0=input;2=output $001F1600;AC_VERB_GET_GPIO_MASK;0=inactive;2=active $001F1500;AC_VERB_GET_GPIO_DATA;0=GRND;2=High $00171702;AC_VERB_SET_GPIO_DIRECTION;0=input;2=output $00171602;AC_VERB_SET_GPIO_MASK;2=active $00171502;AC_VERB_SET_GPIO_DATA;0=GRND;2=High $001F1700;AC_VERB_GET_GPIO_DIRECTION;0=input;2=output $001F1600;AC_VERB_GET_GPIO_MASK;0=inactive;2=active $001F1500;AC_VERB_GET_GPIO_DATA;0=GRND;2=High And so on: their are 8 bits available, so in case of your five GPIO's theory - as far I understand this subject currently - predicts payload '1F' will activate all five together (as Output). Response from the tree GET-Verbs in your HDAICOUT.TXT showed no GPIO-pin's where active! 3) I cannot rule this out, the bit's are indeed different in case of the SET-Verb: In case of DAC's and Mixers this will do no harm. Don't know what happens with Pin-Widgets. I assume: if they can be set as IN/ OUT, probably they will only 'listen' according their initialization with Verb 70720 (Input) or Verb 70740 (Output). I will think about it, could be more economical in case of HDAICOUT.HDA. Sleeping Widget) As you can see in HDALOG.TXT the driver *somehow* skips looking into CODEC Index=$0 too soon. This is known behavior, sadly there is no option in HDACFG.INI to force CODEC Index. But you still can try Verbinterface=$0 (Immediate Command interface, Verbinterface=$1 is the default: CORB/ RIRB). Volume) True, but it is all about setting bit's. As long 'Bit 7' is zero, everything is fine. Setting '7F' was one of my Verbs in my quasi-universal HDAICOUT.HDA: set Volume to max in case of a Volume Widget, or opening output's in other cases. Later I learned '7F' was too high on some codecs, so I lowered the payload to '3F', or even ' 1F'. Vendor Defined Widgets) I was maybe to fast. At least in Datasheet of ALC231 there is some setting mentioned in case of Node/ Widget 20h: Vendor Defined Audio Widget. Seems to be related to some Audio Processing (maybe related to noise reduction?). I am not sure, never tried such an approach. About testing) beter use bigger WAV-files in Sound Recorder or Mediaplayer or mp3 (in case of mp3 some (software-) codec is needed, like the one in DirectX 9.0c). Always use normal CD-quality to avoid switching frequencies, that's why I set you back to the default with '$00224011;AC_VERB_SET_STREAM_FORMAT;44.1kHz_16-bits' About Output Pin) Use headphones too, try always all your Jack's. About your HDAICIN.TXT's) The following '4011' responses are 'good': sent $002A0000; got $00000000 ticks=0000001E sent $00224011; got $00000000 ticks=00000023 sent $002A0000; got $00004011 ticks=0000001E and sent $003A0000; got $00000031 ticks=00000023 sent $00324011; got $00000000 ticks=0000001E sent $003A0000; got $00004011 ticks=0000001E But in HDAICIN2.TXT: sent $003A0000; got $00000031 ticks=0000001E sent $00324011; got $00000000 ticks=00000023 sent $003A0000; got $00000000 ticks=0000001E sent $003B8000; got $00004011 ticks=0000001E is strange, seems to be a delayed response. So better try more wait times. $400 is much higher than the default of $100. Did you try to go down to $50, $25., $10 or $5? I also found DAC_3 (probably headphone default, or for Surround sound?) was not set to Stream 1: sent $003F0600; got $00000000 ticks=0000001E sent $00370610; got $00000000 ticks=0000001E sent $003F0600; got $00000000 ticks=0000001E In case of ALC231 it looks like DAC_3 is related to Stream 2. So maybe sending '$00370620' instead? In case of the Pin-widgets I saw '1A' seems to be Input only, so can be probably left out: sent $01AF0700; got $00000020 ticks=0000001E sent $01A70740; got $00000000 ticks=0000001E sent $01AF0700; got $00000000 ticks=0000001E In case of EAPD I saw EAPD was already active on Pin Widget 15h, according to your earlier investigation this is your headphone widget: sent $015F0C00; got $00000002 ticks=0000001E sent $01570C02; got $00000000 ticks=00000023 sent $015F0C00; got $00000002 ticks=0000001E Further testing: try without the both Codec Reset lines too. If you want to post HDAICIN.TXT files again, better give them more descriptive names, or write a 'header' inside. Edited February 14 by deomsh Typo's
isolar Posted February 16 Posted February 16 (edited) Okay I have managed to do much more testing in between a crazy weekend! 1) As requested WPCREdit attached. Chipset is unknown (so far) as it is SoC. Model is Lenovo S20-30 with Intel N2840 processor. 2) I went over the awhooley thread to wrap my head around it but not sure this is what is required here as Drew Hoffman's driver does not appear to deal with GPI/O either. Nevertheless, I did try all 5 options you presented, one at a time to no avail sadly. When you say 'payload 1F will activate all 5 GPI/O pins together, which verb would I use to try that? I will give it a go. 3) Please let me know what you think, I can run some tests to see if it is plausible if you like, just let me know what you would like to see. I guess setting the out and in values on both the AFG and the mixer could test this as AFG should be output and mixer should be input? Therefore running a get command after setting these should show in HDACIN with volume still set on AFG to the value, in this case $57. However mixer will show 00 as input so hard to tell unless I maybe mute to 80? Sleeping Widget) I tried Verbinterface $0 and checked HDAICIN. First thing I noticed is all of the power get verbs F05 showed a response of $00000400, which according to HDA spec is D3 cold mode. Unsure why this only shows using Verbinterface $0 but not on CORB/RIRB $1? Volume) Correct, I ran a lot more tests trying to set volume $57 on the mixer and pin widgets but always show as 0 if unmuted or 80 if muted, never 57. Therefore unmuting these with payload 00 at the end should be sufficient. Vendor Defined Widgets) Audio processing you are correct with here, it appears to be for filters and such that can be applied to an audio stream. There is one Vendor Defined Widget with processing control on my codec that I believe has something to do with this - NID $20 also. About testing) Noted! I will try wav files 44.1kHz CD audio quality. For now seems to be the slider moves with no sound. About output pin) Noted! Since reading this I have tried all output pin widgets for completion sake and tried speaker and headphone jack, sadly no result. Something else is at play here.. Timing/Wait settings) I tried $50, $25, $10, $5 but things got worse as I went lower to the point of all 0's in HDAICIN! So I tried higher and went to $800 (probably overkill) and found all HDAICIN results now stable. Sticking with $800 for now.. not optimal but all results shown until solved. Stream 5) Interesting to note the Linux dump for ALC3220 (The Dell T7610 dump) codec is identical to my codec! I noticed DAC $2 and $3 set to stream 5! I did try this on Watler's but no result.. any idea why stream 5 used? Andy Hoffman's driver) Investigating Hoffman's driver, it seems it disables unsolicited response, and also disables processing on all widgets (??). This is something I have not tried but will give it a go.. unsure if it will make any difference. I am still leaning towards Hoffman's driver initializing codec 0, it stays active and then Watler's initializes codec $2, however the verbs sent through HDAICOUT can be received by codec 0 as it has been successfully initialized by Hoffman's.. therefore sound works with the correct verbs. From what I read with Watler's driver the source code is using a language that few are fluent in so hard to reprogram, however surely not too hard to find in the source code where the codec selection happens and hard code it to codec $0? I might have a try although this is entirely new to me.. More to come! Edited February 16 by isolar Edit: Attached WPCREdit image, tried to put into post but did not load. Also added chipset/platform info
isolar Posted February 16 Posted February 16 Small update.. I found in Watler's source code where the codec index is discovered and managed to force it to codec $0 and recompile. So now Hdacfg shows Codec Index=$0. Now further testing to route the audio! Hdacfg and log files attached for reference. Any ideas greatly welcome!! HDALOG_forced.TXT HDAcfg_forced.ini
deomsh Posted February 16 Posted February 16 (edited) Thanks for the WPCREdit image. I think it is time to try pcipatchB=$7900 in HDACFG.INI If you look at address 79h, you can see this is the default in (most?) Intel High Definition Audio Controllers: 08h Because pcipatchB can address ONE Byte only (78h-79h is a Word), so we have to use 79h to set the 'No Snoop' Bit11=0 (it is all in this thread). Lately I asked Copilot again about your Intel High Definition Audio Controller 8086:0F04. This time the answer was going into the 'usual' direction. So it is worth a try, but as always: writing to PCI-devices is at our own risk, if any! I would say in your case: if anything does not 'feels' or 'sounds' right, immediately Power down your machine and reset pcipatchB to its original value (I believe pcipatchB=$0000). Best start without HDAICOUT.HDA and set all three Widgets mentioned in HDACFG.INI to $2 and for now Verbinterface=$1 and wait times to $100 for now. Listen with headphones if you can hear anything, even the slightest 'pop' or 'tic'. Do not use Windows Sounds only, but play some CD-quality music file too. I would like to see HDALOG.TXT and HDACFG.INI (to check). About Verbinterface=$0 giving other response values: I thing your problem is with your High Definition Audio Controller! About ALC3220: is commonly seen as equal to ALC280. I have no ideas about Stream 5. About the Source Code of Watler's driver: when I started with Watler's driver I bought a German book 'Turbo Pascal & Delphi fuer Kids' from Hans-Georg Shumann, including a full version of Delphi on CD-ROM. I once managed to compile HDA2.DLL, but I had no real problem to solve... So I never tried to learn more of Delphi. While I was writing these lines, you recompiled HDA2.DLL already for 'Codec index', so it seemes you are much better equiped in this respect. I will look into it soon. ******************************************************* I made new quasi-universal versions of HDAICOUT.HDA, one for each 'Codec index'. I used your idea to set IN/ OUT together, so all highest four bytes at once in case of the Volume Verb. It would nice if you can give it a try. Lately I wrote all the Codec info in my HDAWIN16 folder to my Nodes List. This gives a broad generalisation, from which I selected the DAC's and Pin's to sent Verbs to. See the print-screen, saved in png-format. I raised the number of Nodes/ Widgets to 2Fh, but only Power up and Volume/ Unmute Verbs are sent to all. Connection Select Verbs sent only to common Pin-D/ Mono-out Nodes/ Widgets (Channel0). This time I included EAPD for all selected Pin-widgets, and GPIO is pre-set as Output for max 8 pin's. GPIO needs THREE SET Verbs, look at my comments in the new HDAICOUT.HDA. I added two commented out SET Verbs (xx is the Node number) to their relevant section: ;$0xx707C0;AC_VERB_SET_PIN_WIDGET_CONTROL;hp_amp_out_enable ;$0xx20011;AC_VERB_SET_STREAM_FORMAT;48kHz_16-bits Further at the beginning/ end of each section the relevant GET Verbs for debugging are added (now commented-out). If I counted right, total number of sent Verbs will be 230, so there is not much room to sent more Verbs, for debugging with GET Verbs, or sending other SET Verbs/ Adresses. Best disable some Select Verbs in that case. HDAICOUT.HDA.ZIP: latest version in Edited February 21 by deomsh Corrected Print-screen of Nodes List & additions. Deleted HDAICOUT.HDA.ZIP 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now