[ALSA] Improve the shared-jack handling on ac97