All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Jaroslav Kysela <perex@perex.cz>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>,
	Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Subject: [PATCH 07/54] ASoC: bcm: convert not to use asoc_xxx()
Date: Mon, 11 Sep 2023 23:47:51 +0000	[thread overview]
Message-ID: <877cows255.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87h6o0s275.wl-kuninori.morimoto.gx@renesas.com>

ASoC is now unified asoc_xxx() into snd_soc_xxx().
This patch convert asoc_xxx() to snd_soc_xxx().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/bcm/bcm63xx-pcm-whistler.c | 28 ++++++++++++++--------------
 sound/soc/bcm/cygnus-pcm.c           | 24 ++++++++++++------------
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/sound/soc/bcm/bcm63xx-pcm-whistler.c b/sound/soc/bcm/bcm63xx-pcm-whistler.c
index 2c600b017524f..018f2372e892c 100644
--- a/sound/soc/bcm/bcm63xx-pcm-whistler.c
+++ b/sound/soc/bcm/bcm63xx-pcm-whistler.c
@@ -46,13 +46,13 @@ static int bcm63xx_pcm_hw_params(struct snd_soc_component *component,
 				 struct snd_pcm_hw_params *params)
 {
 	struct i2s_dma_desc *dma_desc;
-	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 
 	dma_desc = kzalloc(sizeof(*dma_desc), GFP_NOWAIT);
 	if (!dma_desc)
 		return -ENOMEM;
 
-	snd_soc_dai_set_dma_data(asoc_rtd_to_cpu(rtd, 0), substream, dma_desc);
+	snd_soc_dai_set_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream, dma_desc);
 
 	return 0;
 }
@@ -61,9 +61,9 @@ static int bcm63xx_pcm_hw_free(struct snd_soc_component *component,
 			struct snd_pcm_substream *substream)
 {
 	struct i2s_dma_desc	*dma_desc;
-	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 
-	dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
+	dma_desc = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream);
 	kfree(dma_desc);
 
 	return 0;
@@ -77,8 +77,8 @@ static int bcm63xx_pcm_trigger(struct snd_soc_component *component,
 	struct bcm_i2s_priv *i2s_priv;
 	struct regmap   *regmap_i2s;
 
-	rtd = asoc_substream_to_rtd(substream);
-	i2s_priv = dev_get_drvdata(asoc_rtd_to_cpu(rtd, 0)->dev);
+	rtd = snd_soc_substream_to_rtd(substream);
+	i2s_priv = dev_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)->dev);
 	regmap_i2s = i2s_priv->regmap_i2s;
 
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
@@ -144,11 +144,11 @@ static int bcm63xx_pcm_prepare(struct snd_soc_component *component,
 	struct i2s_dma_desc	*dma_desc;
 	struct regmap		*regmap_i2s;
 	struct bcm_i2s_priv	*i2s_priv;
-	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	uint32_t regaddr_desclen, regaddr_descaddr;
 
-	dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
+	dma_desc = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream);
 	dma_desc->dma_len  = snd_pcm_lib_period_bytes(substream);
 	dma_desc->dma_addr = runtime->dma_addr;
 	dma_desc->dma_area = runtime->dma_area;
@@ -161,7 +161,7 @@ static int bcm63xx_pcm_prepare(struct snd_soc_component *component,
 		regaddr_descaddr = I2S_RX_DESC_IFF_ADDR;
 	}
 
-	i2s_priv = dev_get_drvdata(asoc_rtd_to_cpu(rtd, 0)->dev);
+	i2s_priv = dev_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)->dev);
 	regmap_i2s = i2s_priv->regmap_i2s;
 
 	regmap_write(regmap_i2s, regaddr_desclen, dma_desc->dma_len);
@@ -250,9 +250,9 @@ static irqreturn_t i2s_dma_isr(int irq, void *bcm_i2s_priv)
 	if (int_status & I2S_RX_DESC_OFF_INTR_EN_MSK) {
 		substream = i2s_priv->capture_substream;
 		runtime = substream->runtime;
-		rtd = asoc_substream_to_rtd(substream);
+		rtd = snd_soc_substream_to_rtd(substream);
 		prtd = runtime->private_data;
-		dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
+		dma_desc = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream);
 
 		offlevel = (int_status & I2S_RX_DESC_OFF_LEVEL_MASK) >>
 			   I2S_RX_DESC_OFF_LEVEL_SHIFT;
@@ -298,9 +298,9 @@ static irqreturn_t i2s_dma_isr(int irq, void *bcm_i2s_priv)
 	if (int_status & I2S_TX_DESC_OFF_INTR_EN_MSK) {
 		substream = i2s_priv->play_substream;
 		runtime = substream->runtime;
-		rtd = asoc_substream_to_rtd(substream);
+		rtd = snd_soc_substream_to_rtd(substream);
 		prtd = runtime->private_data;
-		dma_desc = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
+		dma_desc = snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(rtd, 0), substream);
 
 		offlevel = (int_status & I2S_TX_DESC_OFF_LEVEL_MASK) >>
 			   I2S_TX_DESC_OFF_LEVEL_SHIFT;
@@ -352,7 +352,7 @@ static int bcm63xx_soc_pcm_new(struct snd_soc_component *component,
 	struct bcm_i2s_priv *i2s_priv;
 	int ret;
 
-	i2s_priv = dev_get_drvdata(asoc_rtd_to_cpu(rtd, 0)->dev);
+	i2s_priv = dev_get_drvdata(snd_soc_rtd_to_cpu(rtd, 0)->dev);
 
 	of_dma_configure(pcm->card->dev, pcm->card->dev->of_node, 1);
 
diff --git a/sound/soc/bcm/cygnus-pcm.c b/sound/soc/bcm/cygnus-pcm.c
index 8f488f92936b1..2d1e241d83673 100644
--- a/sound/soc/bcm/cygnus-pcm.c
+++ b/sound/soc/bcm/cygnus-pcm.c
@@ -197,9 +197,9 @@ static u64 cygnus_dma_dmamask = DMA_BIT_MASK(32);
 static struct cygnus_aio_port *cygnus_dai_get_dma_data(
 				struct snd_pcm_substream *substream)
 {
-	struct snd_soc_pcm_runtime *soc_runtime = asoc_substream_to_rtd(substream);
+	struct snd_soc_pcm_runtime *soc_runtime = snd_soc_substream_to_rtd(substream);
 
-	return snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(soc_runtime, 0), substream);
+	return snd_soc_dai_get_dma_data(snd_soc_rtd_to_cpu(soc_runtime, 0), substream);
 }
 
 static void ringbuf_set_initial(void __iomem *audio_io,
@@ -343,13 +343,13 @@ static void enable_intr(struct snd_pcm_substream *substream)
 
 static void disable_intr(struct snd_pcm_substream *substream)
 {
-	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 	struct cygnus_aio_port *aio;
 	u32 set_mask;
 
 	aio = cygnus_dai_get_dma_data(substream);
 
-	dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "%s on port %d\n", __func__, aio->portnum);
+	dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "%s on port %d\n", __func__, aio->portnum);
 
 	/* The port number maps to the bit position to be set */
 	set_mask = BIT(aio->portnum);
@@ -571,7 +571,7 @@ static irqreturn_t cygnus_dma_irq(int irq, void *data)
 static int cygnus_pcm_open(struct snd_soc_component *component,
 			   struct snd_pcm_substream *substream)
 {
-	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct cygnus_aio_port *aio;
 	int ret;
@@ -580,7 +580,7 @@ static int cygnus_pcm_open(struct snd_soc_component *component,
 	if (!aio)
 		return -ENODEV;
 
-	dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "%s port %d\n", __func__, aio->portnum);
+	dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "%s port %d\n", __func__, aio->portnum);
 
 	snd_soc_set_runtime_hwparams(substream, &cygnus_pcm_hw);
 
@@ -608,12 +608,12 @@ static int cygnus_pcm_open(struct snd_soc_component *component,
 static int cygnus_pcm_close(struct snd_soc_component *component,
 			    struct snd_pcm_substream *substream)
 {
-	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 	struct cygnus_aio_port *aio;
 
 	aio = cygnus_dai_get_dma_data(substream);
 
-	dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "%s  port %d\n", __func__, aio->portnum);
+	dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "%s  port %d\n", __func__, aio->portnum);
 
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
 		aio->play_stream = NULL;
@@ -621,7 +621,7 @@ static int cygnus_pcm_close(struct snd_soc_component *component,
 		aio->capture_stream = NULL;
 
 	if (!aio->play_stream && !aio->capture_stream)
-		dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "freed  port %d\n", aio->portnum);
+		dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "freed  port %d\n", aio->portnum);
 
 	return 0;
 }
@@ -629,7 +629,7 @@ static int cygnus_pcm_close(struct snd_soc_component *component,
 static int cygnus_pcm_prepare(struct snd_soc_component *component,
 			      struct snd_pcm_substream *substream)
 {
-	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
+	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct cygnus_aio_port *aio;
 	unsigned long bufsize, periodsize;
@@ -638,12 +638,12 @@ static int cygnus_pcm_prepare(struct snd_soc_component *component,
 	struct ringbuf_regs *p_rbuf = NULL;
 
 	aio = cygnus_dai_get_dma_data(substream);
-	dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "%s port %d\n", __func__, aio->portnum);
+	dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "%s port %d\n", __func__, aio->portnum);
 
 	bufsize = snd_pcm_lib_buffer_bytes(substream);
 	periodsize = snd_pcm_lib_period_bytes(substream);
 
-	dev_dbg(asoc_rtd_to_cpu(rtd, 0)->dev, "%s (buf_size %lu) (period_size %lu)\n",
+	dev_dbg(snd_soc_rtd_to_cpu(rtd, 0)->dev, "%s (buf_size %lu) (period_size %lu)\n",
 			__func__, bufsize, periodsize);
 
 	configure_ringbuf_regs(substream);
-- 
2.25.1


  parent reply	other threads:[~2023-09-11 23:50 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11 23:46 [PATCH 00/54] ASoC: convert asoc_xxx() to snd_soc_xxx() Kuninori Morimoto
2023-09-11 23:47 ` [PATCH 01/54] ASoC: soc.h: " Kuninori Morimoto
2023-09-11 23:47 ` [PATCH 02/54] ASoC: simple_card_utils.h: convert not to use asoc_xxx() Kuninori Morimoto
2023-09-14  9:42   ` Dan Carpenter
2023-09-14 22:59     ` Kuninori Morimoto
2023-09-11 23:47 ` [PATCH 03/54] ASoC: sh: " Kuninori Morimoto
2023-09-11 23:47 ` [PATCH 04/54] ASoC: ti: " Kuninori Morimoto
2023-09-11 23:47 ` [PATCH 05/54] ASoC: arm: " Kuninori Morimoto
2023-09-11 23:47 ` [PATCH 06/54] ASoC: amd: " Kuninori Morimoto
2023-09-11 23:47 ` Kuninori Morimoto [this message]
2023-09-11 23:47 ` [PATCH 08/54] ASoC: dwc: " Kuninori Morimoto
2023-09-11 23:48 ` [PATCH 09/54] ASoC: fsl: " Kuninori Morimoto
2023-09-11 23:48 ` [PATCH 10/54] ASoC: img: " Kuninori Morimoto
2023-09-11 23:48 ` [PATCH 11/54] ASoC: mxs: " Kuninori Morimoto
2023-09-11 23:48 ` [PATCH 12/54] ASoC: pxa: " Kuninori Morimoto
2023-09-11 23:48 ` [PATCH 13/54] ASoC: stm: " Kuninori Morimoto
2023-09-11 23:48 ` [PATCH 14/54] ASoC: au1x: " Kuninori Morimoto
2023-09-11 23:48 ` [PATCH 15/54] ASoC: qcom: " Kuninori Morimoto
2023-09-11 23:48 ` [PATCH 16/54] ASoC: sprd: " Kuninori Morimoto
2023-09-11 23:48 ` [PATCH 17/54] ASoC: apple: " Kuninori Morimoto
2023-09-11 23:49 ` [PATCH 18/54] ASoC: atmel: " Kuninori Morimoto
2023-09-11 23:49 ` [PATCH 19/54] ASoC: meson: " Kuninori Morimoto
2023-09-11 23:49 ` [PATCH 20/54] ASoC: sunxi: " Kuninori Morimoto
2023-09-12  4:06   ` Jernej Škrabec
2023-09-11 23:49 ` [PATCH 21/54] ASoC: tegra: " Kuninori Morimoto
2023-09-11 23:49 ` [PATCH 22/54] ASoC: ux500: " Kuninori Morimoto
2023-09-11 23:49 ` [PATCH 23/54] ASoC: google: " Kuninori Morimoto
2023-09-11 23:49 ` [PATCH 24/54] ASoC: cirrus: " Kuninori Morimoto
2023-09-11 23:49 ` [PATCH 25/54] ASoC: generic: " Kuninori Morimoto
2023-09-14 10:03   ` Dan Carpenter
2023-09-14 23:03     ` Kuninori Morimoto
2023-09-15  6:39       ` Dan Carpenter
2023-09-19  0:19         ` Kuninori Morimoto
2023-09-11 23:49 ` [PATCH 26/54] ASoC: samsung: " Kuninori Morimoto
2023-09-11 23:49 ` [PATCH 27/54] ASoC: extensa: " Kuninori Morimoto
2023-09-11 23:49 ` [PATCH 28/54] ASoC: kirkwood: " Kuninori Morimoto
2023-09-11 23:50 ` [PATCH 29/54] ASoC: loongson: " Kuninori Morimoto
2023-09-11 23:50 ` [PATCH 30/54] ASoC: mediatek: " Kuninori Morimoto
2023-09-25 12:12   ` Mark Brown
2023-09-11 23:50 ` [PATCH 31/54] ASoC: rockchip: " Kuninori Morimoto
2023-09-11 23:50 ` [PATCH 32/54] ASoC: starfive: " Kuninori Morimoto
2023-09-11 23:50 ` [PATCH 33/54] ASoC: uniphier: " Kuninori Morimoto
2023-09-11 23:50 ` [PATCH 34/54] ASoC: soundwire: " Kuninori Morimoto
2023-09-20  7:22   ` Vinod Koul
2023-09-11 23:50 ` [PATCH 35/54] ASoC: intel: " Kuninori Morimoto
2023-09-25 12:14   ` Mark Brown
2023-09-11 23:50 ` [PATCH 36/54] ASoC: intel: avs: " Kuninori Morimoto
2023-09-11 23:50 ` [PATCH 37/54] ASoC: codec: wm: " Kuninori Morimoto
2023-09-11 23:50 ` [PATCH 38/54] ASoC: codec: rt5677: " Kuninori Morimoto
2023-09-11 23:50 ` [PATCH 39/54] ASoC: codec: cs47lxx: " Kuninori Morimoto
2023-09-11 23:51 ` [PATCH 40/54] ASoC: sof: " Kuninori Morimoto
2023-09-25 12:15   ` Mark Brown
2023-09-11 23:51 ` [PATCH 41/54] ASoC: sof: amd: " Kuninori Morimoto
2023-09-11 23:51 ` [PATCH 42/54] ASoC: sof: intel: " Kuninori Morimoto
2023-09-11 23:51 ` [PATCH 43/54] ASoC: sof: mediatek: " Kuninori Morimoto
2023-09-11 23:51 ` [PATCH 44/54] ASoC: soc-dai: " Kuninori Morimoto
2023-09-11 23:51 ` [PATCH 45/54] ASoC: soc-pcm: " Kuninori Morimoto
2023-09-11 23:51 ` [PATCH 46/54] ASoC: soc-core: " Kuninori Morimoto
2023-09-11 23:51 ` [PATCH 47/54] ASoC: soc-dapm: " Kuninori Morimoto
2023-09-11 23:51 ` [PATCH 48/54] ASoC: soc-link: " Kuninori Morimoto
2023-09-11 23:52 ` [PATCH 49/54] ASoC: soc-utils: " Kuninori Morimoto
2023-09-11 23:52 ` [PATCH 50/54] ASoC: soc-topology: " Kuninori Morimoto
2023-09-11 23:52 ` [PATCH 51/54] ASoC: soc-compress: " Kuninori Morimoto
2023-09-20  7:22   ` Vinod Koul
2023-09-11 23:52 ` [PATCH 52/54] ASoC: soc-component: " Kuninori Morimoto
2023-09-11 23:52 ` [PATCH 53/54] ASoC: soc-generic-dmaengine-pcm: " Kuninori Morimoto
2023-09-11 23:52 ` [PATCH 54/54] ASoC: remove asoc_xxx() compatible macro Kuninori Morimoto
2023-09-26 15:06 ` [PATCH 00/54] ASoC: convert asoc_xxx() to snd_soc_xxx() Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877cows255.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=perex@perex.cz \
    --cc=rjui@broadcom.com \
    --cc=sbranden@broadcom.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.