mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-08 21:53:54 +08:00
ASoC: stm: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pn8r0yus.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c09e34b799
commit
ddb4f06d62
@ -168,7 +168,7 @@ static void stm32_memcpy_32to16(void *dest, const void *src, size_t n)
|
||||
static int stm32_afsdm_pcm_cb(const void *data, size_t size, void *private)
|
||||
{
|
||||
struct stm32_adfsdm_priv *priv = private;
|
||||
struct snd_soc_pcm_runtime *rtd = priv->substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(priv->substream);
|
||||
u8 *pcm_buff = priv->pcm_buff;
|
||||
u8 *src_buff = (u8 *)data;
|
||||
unsigned int old_pos = priv->pos;
|
||||
@ -213,7 +213,7 @@ static int stm32_afsdm_pcm_cb(const void *data, size_t size, void *private)
|
||||
static int stm32_adfsdm_trigger(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream, int cmd)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct stm32_adfsdm_priv *priv =
|
||||
snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
|
||||
@ -234,7 +234,7 @@ static int stm32_adfsdm_trigger(struct snd_soc_component *component,
|
||||
static int stm32_adfsdm_pcm_open(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct stm32_adfsdm_priv *priv = snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
int ret;
|
||||
|
||||
@ -248,7 +248,7 @@ static int stm32_adfsdm_pcm_open(struct snd_soc_component *component,
|
||||
static int stm32_adfsdm_pcm_close(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct stm32_adfsdm_priv *priv =
|
||||
snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
|
||||
@ -261,7 +261,7 @@ static snd_pcm_uframes_t stm32_adfsdm_pcm_pointer(
|
||||
struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct stm32_adfsdm_priv *priv =
|
||||
snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
|
||||
@ -272,7 +272,7 @@ static int stm32_adfsdm_pcm_hw_params(struct snd_soc_component *component,
|
||||
struct snd_pcm_substream *substream,
|
||||
struct snd_pcm_hw_params *params)
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct stm32_adfsdm_priv *priv =
|
||||
snd_soc_dai_get_drvdata(asoc_rtd_to_cpu(rtd, 0));
|
||||
|
||||
|
@ -1237,7 +1237,7 @@ static int stm32_sai_pcm_process_spdif(struct snd_pcm_substream *substream,
|
||||
void *buf, unsigned long bytes)
|
||||
{
|
||||
struct snd_pcm_runtime *runtime = substream->runtime;
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
|
||||
struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
|
||||
struct stm32_sai_sub_data *sai = dev_get_drvdata(cpu_dai->dev);
|
||||
int *ptr = (int *)(runtime->dma_area + hwoff +
|
||||
|
Loading…
Reference in New Issue
Block a user