[LG V20 ROMs, Kernels, Recoveries, & Other Developm] Dr_DjEnder:
[MENTION=2881807]x86cpu[/MENTION]

I should have clarified the stuff I think is missing is for the DAC as they are called when the DAC is active and when the user skips tracks but regardless the files and changes are in:

and heres my commit of exactly what changed (its a bit messy): https://github.com/Devoark/android_kernel_lge_msm8996/commit/200e2d43c89bf98c2bd2c79f1767a60277234803

include/sound/apr_audio-v2.h

sound/soc/msm/qdsp6v2/lge_dsp_sound_effect.h

sound/soc/msm/qdsp6v2/lge_dsp_sound_mabl.h

sound/soc/msm/qdsp6v2/lge_dsp_sound_normalizer.h

sound/soc/msm/qdsp6v2/msm-audio-effects-q6-v2.c

sound/soc/msm/qdsp6v2/msm-compress-q6-v2.c

sound/soc/msm/qdsp6v2/q6asm.c

-----------------------------------------------------------------------------------------------

Right for the other Stuff

On stock lineage without any kernel mods this is the sequence for me with my <50ohm headphones

https://pastebin.com/JH8cS9Yc

Modified Lineage Kernel For the DAC

https://pastebin.com/uQgyHm3b

And stock LGE ROM DAC behavior :

https://pastebin.com/3XUNNLDq

The main problem with lineage's kernel is that it doesn't assign a headset type (1, 2, 3) for low, high-imp, and aux. Then the amp isnt being turned on, in es9218_startup, which is part of another set of functions that aren't called which is why i think the DAC isn't outputting sound, or at least would get us closer to a working Hi-Fi Mode. So by forcing it on and assigning the Headset a static value it allows the DAC to proceed into Hifi mode in bypass2hifi, and es9218_sabre_wcdon2bypass_put confirms that but now there is no sound output through the headphone jack (well its odd the first track that is played is in the es9218 bypass so there IS sound, but when you skip a track or start another audio stream it THEN puts the DAC in Hi-Fi mode then theres no sound :silly: )

Now the dac calls functions in LGE stock ROM that arent called in Lineage among them are :

lge_dsp_sound_offload_playback_number_put: current_be_id = 3, lge_effect_be_id = 3
es9218_headset_type_put (headset-type)
es9218_startup (called)
es9218_startup : state = BYPASS : goto HIFI !!
es9218_set_thd(): Headset Type = #
es9218_sabre_amp_start(): Headset Type = #
es9218_startup(): exit
es9218_pcm_hw_params(): entry , bps : 16 , rate : 48000 //////// (bit 16/24) and the sampling rate
es9218_pcm_hw_params(): Rev-B PCM Format Running
es9218_pcm_hw_params(): exit, ret=0
+++++++++++++++++++++++++++++++++++++
lge_dsp_sound_effect_allparam_put: value 1
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
lge_dsp_sound_mabl_devicespeaker_put: value 0
+++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++
lge_dsp_sound_mabl_monoenable_put: value 0
+++++++++++++++++++++++++++++++++++++

Chances are I'm doing something wrong here but its where if gotten with this with the limited time I have anyone who wants to check out the commits they are here:

https://github.com/Devoark/android_kernel_lge_msm8996/commits/lineage-15.1st/sound

Ill continue to work on this when I can but I've mostly run out of ideas of what to do to call the missing functions and some clean up of what I've done I feel is really needed.