* [PATCH] ASoC: intel: use asoc_substream_to_rtd()
@ 2022-03-05 12:51 zhanglianjie
2022-03-07 14:17 ` Cezary Rojewski
0 siblings, 1 reply; 2+ messages in thread
From: zhanglianjie @ 2022-03-05 12:51 UTC (permalink / raw)
To: Jaroslav Kysela
Cc: Cezary Rojewski, Pierre-Louis Bossart, Liam Girdwood, Jie Yang,
Mark Brown, Takashi Iwai, alsa-devel, linux-kernel, zhanglianjie
Now we can use asoc_substream_to_rtd() macro,
let's use it.
Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c
index 939a9b801dec..a26000cd5ceb 100644
--- a/sound/soc/intel/catpt/pcm.c
+++ b/sound/soc/intel/catpt/pcm.c
@@ -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);
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ASoC: intel: use asoc_substream_to_rtd()
2022-03-05 12:51 [PATCH] ASoC: intel: use asoc_substream_to_rtd() zhanglianjie
@ 2022-03-07 14:17 ` Cezary Rojewski
0 siblings, 0 replies; 2+ messages in thread
From: Cezary Rojewski @ 2022-03-07 14:17 UTC (permalink / raw)
To: zhanglianjie, Jaroslav Kysela
Cc: Pierre-Louis Bossart, Liam Girdwood, Jie Yang, Mark Brown,
Takashi Iwai, alsa-devel, linux-kernel
On 2022-03-05 1:51 PM, zhanglianjie wrote:
> Now we can use asoc_substream_to_rtd() macro,
> let's use it.
>
> Signed-off-by: zhanglianjie <zhanglianjie@uniontech.com>
Hello,
Thanks for your contribution!
Commit's title does not match the requirements, though. Please see git
log of catpt-driver and align with the pattern found there.
Regards,
Czarek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-07 14:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-05 12:51 [PATCH] ASoC: intel: use asoc_substream_to_rtd() zhanglianjie
2022-03-07 14:17 ` Cezary Rojewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®