I reverted to 5.4.0-29-generic from 5.4.0-31-generic and now sound and mic work ok.
Something in 5.4.0-31 which is the latest upgrade for Ubuntu 20.04, breaks stuff.
I can confirm that with all kernel versions shipped with Ubuntu 20.04 up to 5.4.0-29 but excluding 5.4.0-31, sound and mic work without problems on Lenovo S940
I reverted to 5.4.0-29-generic from 5.4.0-31-generic and now sound and mic work ok.
Something in 5.4.0-31 which is the latest upgrade for Ubuntu 20.04, breaks stuff.
I can confirm that with all kernel versions shipped with Ubuntu 20.04 up to 5.4.0-29 but excluding 5.4.0-31, sound and mic work without problems on Lenovo S940