ASoC: Intel: avs: rt5682: Refactor jack handling
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Tue, 29 Nov 2022 18:07:38 +0000 (19:07 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 29 Nov 2022 18:10:03 +0000 (18:10 +0000)
commita9d8723c72eada2e303e16a3c81d43bc802fbc6d
tree90740a69860d6888ceb4d7ff6fb198950d8fb4f5
parent19bb7c3053ee54fd7fa7635f680fba3969f4a026
ASoC: Intel: avs: rt5682: Refactor jack handling

Use link->exit() rather than pdev->remove() to unassign jack during card
unbind procedure so codec link initialization and exit procedures are
symmetrical.

Also, there is no need to perform search for codec dai in suspend_pre()
and resume_post() ourselves. Use snd_soc_card_get_codec_dai() instead.

Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20221129180738.2866290-3-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/boards/rt5682.c