SOF: HDA: Output device will auto switch from speaker to other source when unplug HDMI external port or headphone
Summary
On CML HDA platforms, if the driver is SOF and the UCM is using the latest configuration from alsa-ucm-conf, Output device will auto switch from speaker to other source when unplug HDMI external port or headphone.
environment
SW: Ubuntu 20.04 with sof audio driver + latest alsa lib + latest UCM HW: CML HDA platform
Steps to reproduce
step 1: Boot up system with headphone and HDMI external port both connected step 2: Open sound setting and select speaker as output device (corner case, as speaker has lowest priority) step 3: Unplug HDMI external port. step 4: Check the output device.
What is the current bug behavior?
The output device will be switched from speaker to headphone after unplug HDMI
What is the expected correct behavior?
The output should still be the speaker