Commit 51996ca2 authored by Lianjie Zhang's avatar Lianjie Zhang Committed by Mark Brown

ASoC: Intel: catpt: use asoc_substream_to_rtd()

Now we can use asoc_substream_to_rtd() macro,
let's use it.
Signed-off-by: default avatarLianjie Zhang <zhanglianjie@uniontech.com>
Reviewed-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220307151939.32870-1-zhanglianjie@uniontech.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b0bfaf05
......@@ -74,7 +74,7 @@ static struct catpt_stream_template *catpt_topology[] = {
static struct catpt_stream_template *
catpt_get_stream_template(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtm = substream->private_data;
struct snd_soc_pcm_runtime *rtm = asoc_substream_to_rtd(substream);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtm, 0);
enum catpt_stream_type type;
......@@ -593,7 +593,7 @@ static int catpt_component_pcm_construct(struct snd_soc_component *component,
static int catpt_component_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtm = substream->private_data;
struct snd_soc_pcm_runtime *rtm = asoc_substream_to_rtd(substream);
if (!rtm->dai_link->no_pcm)
snd_soc_set_runtime_hwparams(substream, &catpt_pcm_hardware);
......@@ -604,7 +604,7 @@ static snd_pcm_uframes_t
catpt_component_pointer(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtm = substream->private_data;
struct snd_soc_pcm_runtime *rtm = asoc_substream_to_rtd(substream);
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtm, 0);
struct catpt_stream_runtime *stream;
struct catpt_dev *cdev = dev_get_drvdata(component->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment