I think I covered everything you need in the application note: https://developer.qualcomm.com/download/db410c/stereo-connector-and-audio-routing-application-note.pdf, let me know if this doesn’t answer your questions so I can update the document if there is missing information.
HPH_REF must be connected to AGND, this is exactly what you are wanting to do. It is preferable to make the connection as close to the destination as possible to minimize undesired offsets caused bu the return currents on the AGND line. Usually the connection would made be at the headphone jack, but even better if you can make the connection right at your equipment.
Full Disclosure, I am an employee of Qualcomm Canada, any opinions I may have expressed in this or any other post may not reflect the opinions of my employer.