nau8825.c (6f84981772535e670e4e2df051a672af229b6694) nau8825.c (ec4b2099c6e01342e5c3289a906615c3abef85b8)
1// SPDX-License-Identifier: GPL-2.0-only
2//
3// Copyright(c) 2021-2022 Intel Corporation. All rights reserved.
4//
5// Authors: Cezary Rojewski <cezary.rojewski@intel.com>
6// Amadeusz Slawinski <amadeuszx.slawinski@linux.intel.com>
7//
8

--- 244 unchanged lines hidden (view full) ---

253
254 return snd_soc_component_set_jack(codec_dai->component, NULL, NULL);
255}
256
257static int avs_card_resume_post(struct snd_soc_card *card)
258{
259 struct snd_soc_dai *codec_dai = snd_soc_card_get_codec_dai(card, SKL_NUVOTON_CODEC_DAI);
260 struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card);
1// SPDX-License-Identifier: GPL-2.0-only
2//
3// Copyright(c) 2021-2022 Intel Corporation. All rights reserved.
4//
5// Authors: Cezary Rojewski <cezary.rojewski@intel.com>
6// Amadeusz Slawinski <amadeuszx.slawinski@linux.intel.com>
7//
8

--- 244 unchanged lines hidden (view full) ---

253
254 return snd_soc_component_set_jack(codec_dai->component, NULL, NULL);
255}
256
257static int avs_card_resume_post(struct snd_soc_card *card)
258{
259 struct snd_soc_dai *codec_dai = snd_soc_card_get_codec_dai(card, SKL_NUVOTON_CODEC_DAI);
260 struct snd_soc_jack *jack = snd_soc_card_get_drvdata(card);
261 int stream = SNDRV_PCM_STREAM_PLAYBACK;
261
262 if (!codec_dai) {
263 dev_err(card->dev, "Codec dai not found\n");
264 return -EINVAL;
265 }
266
262
263 if (!codec_dai) {
264 dev_err(card->dev, "Codec dai not found\n");
265 return -EINVAL;
266 }
267
267 if (codec_dai->stream_active[SNDRV_PCM_STREAM_PLAYBACK] &&
268 codec_dai->playback_widget->active)
268 if (snd_soc_dai_stream_active(codec_dai, stream) &&
269 snd_soc_dai_get_widget(codec_dai, stream)->active)
269 snd_soc_dai_set_sysclk(codec_dai, NAU8825_CLK_FLL_FS, 0, SND_SOC_CLOCK_IN);
270
271 return snd_soc_component_set_jack(codec_dai->component, jack, NULL);
272}
273
274static int avs_nau8825_probe(struct platform_device *pdev)
275{
276 struct snd_soc_dapm_route *routes;

--- 64 unchanged lines hidden ---
270 snd_soc_dai_set_sysclk(codec_dai, NAU8825_CLK_FLL_FS, 0, SND_SOC_CLOCK_IN);
271
272 return snd_soc_component_set_jack(codec_dai->component, jack, NULL);
273}
274
275static int avs_nau8825_probe(struct platform_device *pdev)
276{
277 struct snd_soc_dapm_route *routes;

--- 64 unchanged lines hidden ---