diff --git a/seeed-voicecard.c b/seeed-voicecard.c index 8ddf691..dcd0c20 100644 --- a/seeed-voicecard.c +++ b/seeed-voicecard.c @@ -111,16 +111,16 @@ static int seeed_voice_card_startup(struct snd_pcm_substream *substream) if (ret) clk_disable_unprepare(dai_props->cpu_dai.clk); - 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 (snd_soc_rtd_to_cpu(rtd, 0)->driver->playback.channels_min) { + priv->channels_playback_default = snd_soc_rtd_to_cpu(rtd, 0)->driver->playback.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; + if (snd_soc_rtd_to_cpu(rtd, 0)->driver->capture.channels_min) { + priv->channels_capture_default = snd_soc_rtd_to_cpu(rtd, 0)->driver->capture.channels_min; } - 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; + snd_soc_rtd_to_cpu(rtd, 0)->driver->playback.channels_min = priv->channels_playback_override; + snd_soc_rtd_to_cpu(rtd, 0)->driver->playback.channels_max = priv->channels_playback_override; + snd_soc_rtd_to_cpu(rtd, 0)->driver->capture.channels_min = priv->channels_capture_override; + snd_soc_rtd_to_cpu(rtd, 0)->driver->capture.channels_max = priv->channels_capture_override; return ret; } @@ -132,10 +132,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); - 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; + snd_soc_rtd_to_cpu(rtd, 0)->driver->playback.channels_min = priv->channels_playback_default; + snd_soc_rtd_to_cpu(rtd, 0)->driver->playback.channels_max = priv->channels_playback_default; + snd_soc_rtd_to_cpu(rtd, 0)->driver->capture.channels_min = priv->channels_capture_default; + snd_soc_rtd_to_cpu(rtd, 0)->driver->capture.channels_max = priv->channels_capture_default; clk_disable_unprepare(dai_props->cpu_dai.clk); @@ -146,8 +146,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 = asoc_rtd_to_codec(rtd, 0); - struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); + struct snd_soc_dai *codec_dai = snd_soc_rtd_to_codec(rtd, 0); + struct snd_soc_dai *cpu_dai = snd_soc_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); @@ -211,7 +211,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 = asoc_rtd_to_codec(rtd, 0); + struct snd_soc_dai *dai = snd_soc_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; @@ -412,8 +412,8 @@ static int asoc_simple_init_dai_link_params(struct snd_soc_pcm_runtime *rtd) 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 = asoc_rtd_to_codec(rtd, 0); - struct snd_soc_dai *cpu = asoc_rtd_to_cpu(rtd, 0); + struct snd_soc_dai *codec = snd_soc_rtd_to_codec(rtd, 0); + struct snd_soc_dai *cpu = snd_soc_rtd_to_cpu(rtd, 0); struct seeed_dai_props *dai_props = seeed_priv_to_props(priv, rtd->num); int ret;