On 5/8/18 10:35 AM, Hans de Goede wrote:
Hi All,
This series has been long in the making, but it is finally ready now. This series adds jack-detect support for rt5640 using devices.
This is modelled after the recent rt5651 codec- and bytcr-rt5651 machine- driver jack-detect changes (which were actually based on a WIP version of this series).
As discussed on the list already unfortunately there are no really good defaults which work everywhere, so patch 18 adds quirks for 10 devices, I've decided to do this in one go rather then split this into 10 patches.
Impressive work, thanks!
patches 8..18 Acked-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com
Patch 19 makes the bytcr-rt5640 set a longname based on the speaker and input-map quirks, so that userspace can pick a correct UCM profile based on the longname with working jack-detect based input / output switching. I've matching patches adding UCM profiles for this to alsa-lib here: https://github.com/jwrdegoede/alsa-lib/commits/master I'm waiting with submitting those upstream until patch 19 is accepted for merging.
That last patch is a bit controversial. I am not sure this is the right direction to add a new profile for every combination of quirks. At the very least, we should have a mechanism to include basic parts (and I think UCM already has a concept of include). Or better one UCM file that combines all possible combinations and disables some parts based on quirk information fetched during initialization.
Regards,
Hans