forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/sound/soc/fsl/mpc5200_psc_i2s.c
....@@ -1,10 +1,10 @@
1
-/*
2
- * Freescale MPC5200 PSC in I2S mode
3
- * ALSA SoC Digital Audio Interface (DAI) driver
4
- *
5
- * Copyright (C) 2008 Secret Lab Technologies Ltd.
6
- * Copyright (C) 2009 Jon Smirl, Digispeaker
7
- */
1
+// SPDX-License-Identifier: GPL-2.0-only
2
+//
3
+// Freescale MPC5200 PSC in I2S mode
4
+// ALSA SoC Digital Audio Interface (DAI) driver
5
+//
6
+// Copyright (C) 2008 Secret Lab Technologies Ltd.
7
+// Copyright (C) 2009 Jon Smirl, Digispeaker
88
99 #include <linux/module.h>
1010 #include <linux/of_device.h>
....@@ -38,8 +38,8 @@
3838 struct snd_pcm_hw_params *params,
3939 struct snd_soc_dai *dai)
4040 {
41
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
42
- struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(rtd->cpu_dai);
41
+ struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
42
+ struct psc_dma *psc_dma = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
4343 u32 mode;
4444
4545 dev_dbg(psc_dma->dev, "%s(substream=%p) p_size=%i p_bytes=%i"