Closed rsglobal closed 2 years ago
I noticed recent changes to the audio.pinephone.xml file, is this issue at all related to that or no? Also is that the only file that needs adjustment to solve this? and if so could information be gathered from the example tinyhal implementation (https://github.com/CirrusLogic/tinyhal/blob/master/audio.example.xml) which seems to already have a device section for both loudspeaker and headphone port? I understand that it cannot be used without modification, just wondering about how this all works. I apologise for my lack of knowledge on this topic although am eager to learn!
In the attempt to complete this issue it was discovered that tinyhal lacks a lot of required functionality. Therefore it can be used to provide basic features only. We have to search for alternative solution or implement our own audio HAL.
For someone planning to implement an alternative/new solution, consider purely using UCM as configuration format. It is after all already in use to feed PipeWire and PulseAudio for that exact same reason, and should allow a single config to be written and reused across every platform.
@rsglobal and me talked about this a long while ago and I recall creating an issue for it on the CirrusHAL repo - but it doesn't seem to be there. Roman, if you remember this might be the right spot to link it just in case.
Benefits:
GloDroid configuration: https://github.com/GloDroid/glodroid_device/blob/master/pinephone/audio.pinephone.xml https://cs.android.com/android/platform/superproject/+/master:device/linaro/hikey/audio/audio_policy_configuration.xml;l=87?q=audio_policy_configuration.xml%20hikey
PostMarketOS configuration: https://gitlab.com/postmarketOS/pmaports/-/tree/master/device/main/device-pine64-pinephone/ucm
Pine64 official UCMs: https://gitlab.com/pine64-org/pine64-alsa-ucm/-/merge_requests/1
Example how may phone policies look like: https://cs.android.com/android/platform/superproject/+/master:device/google/coral/audio/audio_policy_configuration.xml;l=208?q=audio_policy_configuration.xml%20&sq=