diff options
author | Brent Lu <brent.lu@intel.com> | 2024-03-25 17:10:51 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-03-25 22:45:00 +0000 |
commit | a7963f6ecc4be8a331d7740cb276651f2045e92c (patch) | |
tree | 96b4779a2ea01375fc4ac18a9f2aac7613052f61 /sound/soc/intel/boards/sof_da7219.c | |
parent | a8f408dc8733d83c1cbd0ff238fc90d8b43db1c4 (diff) |
ASoC: Intel: sof_da7219: add codec exit function
Add exit function to headphone codec dai link.
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240325221059.206042-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/sof_da7219.c')
-rw-r--r-- | sound/soc/intel/boards/sof_da7219.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/sof_da7219.c b/sound/soc/intel/boards/sof_da7219.c index f0cb1572c6c4..3d9c48107f58 100644 --- a/sound/soc/intel/boards/sof_da7219.c +++ b/sound/soc/intel/boards/sof_da7219.c @@ -167,6 +167,13 @@ static int da7219_codec_init(struct snd_soc_pcm_runtime *rtd) return ret; } +static void da7219_codec_exit(struct snd_soc_pcm_runtime *rtd) +{ + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; + + snd_soc_component_set_jack(component, NULL, NULL); +} + static int max98373_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { @@ -245,6 +252,7 @@ sof_card_dai_links_create(struct device *dev, struct snd_soc_card *card, ctx->codec_link->codecs = da7219_component; ctx->codec_link->num_codecs = ARRAY_SIZE(da7219_component); ctx->codec_link->init = da7219_codec_init; + ctx->codec_link->exit = da7219_codec_exit; if (ctx->amp_type == CODEC_NONE) return 0; |