From dc50eab76b709d68175a358d6e23a5a3890764d3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 19:39:57 +0200 Subject: Merging upstream version 6.7.7. Signed-off-by: Daniel Baumann --- sound/soc/fsl/fsl-asoc-card.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'sound/soc/fsl/fsl-asoc-card.c') diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 5f181b8983..7518ab9d76 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -95,8 +95,8 @@ struct cpu_priv { struct fsl_asoc_card_priv { struct snd_soc_dai_link dai_link[3]; - struct asoc_simple_jack hp_jack; - struct asoc_simple_jack mic_jack; + struct simple_util_jack hp_jack; + struct simple_util_jack mic_jack; struct platform_device *pdev; struct codec_priv codec_priv; struct cpu_priv cpu_priv; @@ -168,7 +168,7 @@ static bool fsl_asoc_card_is_ac97(struct fsl_asoc_card_priv *priv) static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { - struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(rtd->card); bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; struct codec_priv *codec_priv = &priv->codec_priv; @@ -185,7 +185,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream, return 0; /* Specific configurations of DAIs starts from here */ - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_cpu(rtd, 0), cpu_priv->sysclk_id[tx], + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_cpu(rtd, 0), cpu_priv->sysclk_id[tx], cpu_priv->sysclk_freq[tx], cpu_priv->sysclk_dir[tx]); if (ret && ret != -ENOTSUPP) { @@ -197,7 +197,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream, if (!cpu_priv->slot_num) cpu_priv->slot_num = 2; - ret = snd_soc_dai_set_tdm_slot(asoc_rtd_to_cpu(rtd, 0), 0x3, 0x3, + ret = snd_soc_dai_set_tdm_slot(snd_soc_rtd_to_cpu(rtd, 0), 0x3, 0x3, cpu_priv->slot_num, cpu_priv->slot_width); if (ret && ret != -ENOTSUPP) { @@ -213,7 +213,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream, else pll_out = priv->sample_rate * 256; - ret = snd_soc_dai_set_pll(asoc_rtd_to_codec(rtd, 0), + ret = snd_soc_dai_set_pll(snd_soc_rtd_to_codec(rtd, 0), codec_priv->pll_id, codec_priv->mclk_id, codec_priv->mclk_freq, pll_out); @@ -222,7 +222,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream, goto fail; } - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), codec_priv->fll_id, pll_out, SND_SOC_CLOCK_IN); @@ -251,7 +251,7 @@ static int fsl_asoc_card_hw_free(struct snd_pcm_substream *substream) if (!priv->streams && codec_priv->pll_id >= 0 && codec_priv->fll_id >= 0) { /* Force freq to be free_freq to avoid error message in codec */ - ret = snd_soc_dai_set_sysclk(asoc_rtd_to_codec(rtd, 0), + ret = snd_soc_dai_set_sysclk(snd_soc_rtd_to_codec(rtd, 0), codec_priv->mclk_id, codec_priv->free_freq, SND_SOC_CLOCK_IN); @@ -260,7 +260,7 @@ static int fsl_asoc_card_hw_free(struct snd_pcm_substream *substream) return ret; } - ret = snd_soc_dai_set_pll(asoc_rtd_to_codec(rtd, 0), + ret = snd_soc_dai_set_pll(snd_soc_rtd_to_codec(rtd, 0), codec_priv->pll_id, 0, 0, 0); if (ret && ret != -ENOTSUPP) { dev_err(dev, "failed to stop FLL: %d\n", ret); @@ -504,14 +504,14 @@ static int fsl_asoc_card_late_probe(struct snd_soc_card *card) struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(card); struct snd_soc_pcm_runtime *rtd = list_first_entry( &card->rtd_list, struct snd_soc_pcm_runtime, list); - struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); struct codec_priv *codec_priv = &priv->codec_priv; struct device *dev = card->dev; int ret; if (fsl_asoc_card_is_ac97(priv)) { #if IS_ENABLED(CONFIG_SND_AC97_CODEC) - struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component; + struct snd_soc_component *component = snd_soc_rtd_to_codec(rtd, 0)->component; struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); /* @@ -888,14 +888,14 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) /* * Properties "hp-det-gpio" and "mic-det-gpio" are optional, and - * asoc_simple_init_jack uses these properties for creating + * simple_util_init_jack() uses these properties for creating * Headphone Jack and Microphone Jack. * * The notifier is initialized in snd_soc_card_jack_new(), then * snd_soc_jack_notifier_register can be called. */ if (of_property_read_bool(np, "hp-det-gpio")) { - ret = asoc_simple_init_jack(&priv->card, &priv->hp_jack, + ret = simple_util_init_jack(&priv->card, &priv->hp_jack, 1, NULL, "Headphone Jack"); if (ret) goto asrc_fail; @@ -904,7 +904,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) } if (of_property_read_bool(np, "mic-det-gpio")) { - ret = asoc_simple_init_jack(&priv->card, &priv->mic_jack, + ret = simple_util_init_jack(&priv->card, &priv->mic_jack, 0, NULL, "Mic Jack"); if (ret) goto asrc_fail; -- cgit v1.2.3