ALSA: hda - hdmi dynamically bind PCM to pin when monitor hotplug
Dynamically bind/unbind the PCM to pin when HDMI/DP monitor hotplug.
When monitor is connected, find a proper PCM for the monitor.
When monitor is disconnected, unbind the PCM from the pin.
The binding policy (use Intel platform as example) is:
1. Try to use the legacy pin-pcm mapping for the device entry 0
of the pin.
2. If step 1 fails, try to bind pin to the backup PCMs. For example,
on Intel platform, if DP MST is enabled, 5 PCMs will be created.
PCM 3, PCM 7, PCM 8 are supposed to be used by device entry 0 of
pin 5, pin 6 and pin 7. PCM 9 and PCM 10 are the backup PCMs.
3. If step 2 fails, try to find any PCM to bind to the pin.
Signed-off-by: Libin Yang <libin.yang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>