v5.8: snd_soc_pcm_runtime->cpu_dai/codec_dai/cpu_dais/codec_dais removed
perl -pi -e 's/rtd->cpu_dai/asoc_rtd_to_cpu\(rtd, 0\)/' seeed-voicecard.c perl -pi -e 's/rtd->codec_dai/asoc_rtd_to_codec\(rtd, 0\)/' seeed-voicecard.c commit 1729025b04b9f242dca37f50dba8dd3705eb1ea1 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Mon Mar 30 10:48:27 2020 +0900 ASoC: soc-core: remove cpu_dai/codec_dai/cpu_dais/codec_dais No-one is using cpu_dai/codec_dai/cpu_dais/codec_dais. Let's remove these from snd_soc_pcm_runtime commit c2233a266178f8937cc26a84cd7672334b5424b7 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Mon Mar 30 10:47:37 2020 +0900 ASoC: soc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
This commit is contained in:
parent
c3adcde556
commit
a24da444df
1 changed files with 17 additions and 17 deletions
|
@ -96,16 +96,16 @@ static int seeed_voice_card_startup(struct snd_pcm_substream *substream)
|
|||
if (ret)
|
||||
clk_disable_unprepare(dai_props->cpu_dai.clk);
|
||||
|
||||
if (rtd->cpu_dai->driver->playback.channels_min) {
|
||||
priv->channels_playback_default = rtd->cpu_dai->driver->playback.channels_min;
|
||||
if (asoc_rtd_to_cpu(rtd, 0)->driver->playback.channels_min) {
|
||||
priv->channels_playback_default = asoc_rtd_to_cpu(rtd, 0)->driver->playback.channels_min;
|
||||
}
|
||||
if (rtd->cpu_dai->driver->capture.channels_min) {
|
||||
priv->channels_capture_default = rtd->cpu_dai->driver->capture.channels_min;
|
||||
if (asoc_rtd_to_cpu(rtd, 0)->driver->capture.channels_min) {
|
||||
priv->channels_capture_default = asoc_rtd_to_cpu(rtd, 0)->driver->capture.channels_min;
|
||||
}
|
||||
rtd->cpu_dai->driver->playback.channels_min = priv->channels_playback_override;
|
||||
rtd->cpu_dai->driver->playback.channels_max = priv->channels_playback_override;
|
||||
rtd->cpu_dai->driver->capture.channels_min = priv->channels_capture_override;
|
||||
rtd->cpu_dai->driver->capture.channels_max = priv->channels_capture_override;
|
||||
asoc_rtd_to_cpu(rtd, 0)->driver->playback.channels_min = priv->channels_playback_override;
|
||||
asoc_rtd_to_cpu(rtd, 0)->driver->playback.channels_max = priv->channels_playback_override;
|
||||
asoc_rtd_to_cpu(rtd, 0)->driver->capture.channels_min = priv->channels_capture_override;
|
||||
asoc_rtd_to_cpu(rtd, 0)->driver->capture.channels_max = priv->channels_capture_override;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -117,10 +117,10 @@ static void seeed_voice_card_shutdown(struct snd_pcm_substream *substream)
|
|||
struct seeed_dai_props *dai_props =
|
||||
seeed_priv_to_props(priv, rtd->num);
|
||||
|
||||
rtd->cpu_dai->driver->playback.channels_min = priv->channels_playback_default;
|
||||
rtd->cpu_dai->driver->playback.channels_max = priv->channels_playback_default;
|
||||
rtd->cpu_dai->driver->capture.channels_min = priv->channels_capture_default;
|
||||
rtd->cpu_dai->driver->capture.channels_max = priv->channels_capture_default;
|
||||
asoc_rtd_to_cpu(rtd, 0)->driver->playback.channels_min = priv->channels_playback_default;
|
||||
asoc_rtd_to_cpu(rtd, 0)->driver->playback.channels_max = priv->channels_playback_default;
|
||||
asoc_rtd_to_cpu(rtd, 0)->driver->capture.channels_min = priv->channels_capture_default;
|
||||
asoc_rtd_to_cpu(rtd, 0)->driver->capture.channels_max = priv->channels_capture_default;
|
||||
|
||||
clk_disable_unprepare(dai_props->cpu_dai.clk);
|
||||
|
||||
|
@ -131,8 +131,8 @@ static int seeed_voice_card_hw_params(struct snd_pcm_substream *substream,
|
|||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_dai *codec_dai = rtd->codec_dai;
|
||||
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
||||
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
struct seeed_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct seeed_dai_props *dai_props =
|
||||
seeed_priv_to_props(priv, rtd->num);
|
||||
|
@ -196,7 +196,7 @@ static void work_cb_codec_clk(struct work_struct *work)
|
|||
static int seeed_voice_card_trigger(struct snd_pcm_substream *substream, int cmd)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_dai *dai = rtd->codec_dai;
|
||||
struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
|
||||
struct seeed_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
#if CONFIG_AC10X_TRIG_LOCK
|
||||
unsigned long flags;
|
||||
|
@ -339,8 +339,8 @@ static int asoc_simple_init_dai(struct snd_soc_dai *dai,
|
|||
static int seeed_voice_card_dai_init(struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
struct seeed_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct snd_soc_dai *codec = rtd->codec_dai;
|
||||
struct snd_soc_dai *cpu = rtd->cpu_dai;
|
||||
struct snd_soc_dai *codec = asoc_rtd_to_codec(rtd, 0);
|
||||
struct snd_soc_dai *cpu = asoc_rtd_to_cpu(rtd, 0);
|
||||
struct seeed_dai_props *dai_props =
|
||||
seeed_priv_to_props(priv, rtd->num);
|
||||
int ret;
|
||||
|
|
Loading…
Reference in a new issue