All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [alsa-devel] [PATCH 34/44] ASoC: dwc: dwc-pcm: remove snd_pcm_ops
Date: 02 Oct 2019 14:34:15 +0900	[thread overview]
Message-ID: <87h84r90dk.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87v9t7af54.wl-kuninori.morimoto.gx@renesas.com>


From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

snd_pcm_ops is no longer needed.
Let's use component driver callback.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/dwc/dwc-pcm.c | 48 ++++++++++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 22 deletions(-)

diff --git a/sound/soc/dwc/dwc-pcm.c b/sound/soc/dwc/dwc-pcm.c
index a9ae91c..de6fcc8 100644
--- a/sound/soc/dwc/dwc-pcm.c
+++ b/sound/soc/dwc/dwc-pcm.c
@@ -135,7 +135,8 @@ void dw_pcm_pop_rx(struct dw_i2s_dev *dev)
 	dw_pcm_transfer(dev, false);
 }
 
-static int dw_pcm_open(struct snd_pcm_substream *substream)
+static int dw_pcm_open(struct snd_soc_component *component,
+		       struct snd_pcm_substream *substream)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -148,14 +149,16 @@ static int dw_pcm_open(struct snd_pcm_substream *substream)
 	return 0;
 }
 
-static int dw_pcm_close(struct snd_pcm_substream *substream)
+static int dw_pcm_close(struct snd_soc_component *component,
+			struct snd_pcm_substream *substream)
 {
 	synchronize_rcu();
 	return 0;
 }
 
-static int dw_pcm_hw_params(struct snd_pcm_substream *substream,
-		struct snd_pcm_hw_params *hw_params)
+static int dw_pcm_hw_params(struct snd_soc_component *component,
+			    struct snd_pcm_substream *substream,
+			    struct snd_pcm_hw_params *hw_params)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct dw_i2s_dev *dev = runtime->private_data;
@@ -192,12 +195,14 @@ static int dw_pcm_hw_params(struct snd_pcm_substream *substream,
 		return 0;
 }
 
-static int dw_pcm_hw_free(struct snd_pcm_substream *substream)
+static int dw_pcm_hw_free(struct snd_soc_component *component,
+			  struct snd_pcm_substream *substream)
 {
 	return snd_pcm_lib_free_pages(substream);
 }
 
-static int dw_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
+static int dw_pcm_trigger(struct snd_soc_component *component,
+			  struct snd_pcm_substream *substream, int cmd)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct dw_i2s_dev *dev = runtime->private_data;
@@ -231,7 +236,8 @@ static int dw_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
 	return ret;
 }
 
-static snd_pcm_uframes_t dw_pcm_pointer(struct snd_pcm_substream *substream)
+static snd_pcm_uframes_t dw_pcm_pointer(struct snd_soc_component *component,
+					struct snd_pcm_substream *substream)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct dw_i2s_dev *dev = runtime->private_data;
@@ -245,7 +251,8 @@ static snd_pcm_uframes_t dw_pcm_pointer(struct snd_pcm_substream *substream)
 	return pos < runtime->buffer_size ? pos : 0;
 }
 
-static int dw_pcm_new(struct snd_soc_pcm_runtime *rtd)
+static int dw_pcm_new(struct snd_soc_component *component,
+		      struct snd_soc_pcm_runtime *rtd)
 {
 	size_t size = dw_pcm_hardware.buffer_bytes_max;
 
@@ -255,25 +262,22 @@ static int dw_pcm_new(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
-static void dw_pcm_free(struct snd_pcm *pcm)
+static void dw_pcm_free(struct snd_soc_component *component,
+			struct snd_pcm *pcm)
 {
 	snd_pcm_lib_preallocate_free_for_all(pcm);
 }
 
-static const struct snd_pcm_ops dw_pcm_ops = {
-	.open = dw_pcm_open,
-	.close = dw_pcm_close,
-	.ioctl = snd_pcm_lib_ioctl,
-	.hw_params = dw_pcm_hw_params,
-	.hw_free = dw_pcm_hw_free,
-	.trigger = dw_pcm_trigger,
-	.pointer = dw_pcm_pointer,
-};
-
 static const struct snd_soc_component_driver dw_pcm_component = {
-	.pcm_new = dw_pcm_new,
-	.pcm_free = dw_pcm_free,
-	.ops = &dw_pcm_ops,
+	.open		= dw_pcm_open,
+	.close		= dw_pcm_close,
+	.ioctl		= snd_soc_pcm_lib_ioctl,
+	.hw_params	= dw_pcm_hw_params,
+	.hw_free	= dw_pcm_hw_free,
+	.trigger	= dw_pcm_trigger,
+	.pointer	= dw_pcm_pointer,
+	.pcm_construct	= dw_pcm_new,
+	.pcm_destruct	= dw_pcm_free,
 };
 
 int dw_pcm_register(struct platform_device *pdev)
-- 
2.7.4

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2019-10-02  6:02 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02  5:29 [alsa-devel] [PATCH 00/44] ASoC: don't use snd_pcm_ops Kuninori Morimoto
2019-10-02  5:30 ` [alsa-devel] [PATCH 01/44] ASoC: soc-core: merge snd_pcm_ops member to component driver Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: soc-core: merge snd_pcm_ops member to component driver" to the asoc tree Mark Brown
2019-10-02  5:30 ` [alsa-devel] [PATCH 02/44] ASoC: soc-core: add new pcm_construct/pcm_destruct Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: soc-core: add new pcm_construct/pcm_destruct" to the asoc tree Mark Brown
2019-10-02  5:31 ` [alsa-devel] [PATCH 03/44] ASoC: soc-core: add snd_soc_pcm_lib_ioctl() Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: soc-core: add snd_soc_pcm_lib_ioctl()" to the asoc tree Mark Brown
2019-10-02  5:31 ` [alsa-devel] [PATCH 04/44] ASoC: intel: sst-haswell-pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: intel: sst-haswell-pcm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:31 ` [alsa-devel] [PATCH 05/44] ASoC: intel: skl-pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: intel: skl-pcm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:31 ` [alsa-devel] [PATCH 06/44] ASoC: intel: sst-mfld-platform-pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: intel: sst-mfld-platform-pcm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:31 ` [alsa-devel] [PATCH 07/44] ASoC: intel: sst-baytrail-pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: intel: sst-baytrail-pcm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:31 ` [alsa-devel] [PATCH 08/44] ASoC: amd: acp3x-pcm-dma: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: amd: acp3x-pcm-dma: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:31 ` [alsa-devel] [PATCH 09/44] ASoC: amd: acp-pcm-dma: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: amd: acp-pcm-dma: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:32 ` [alsa-devel] [PATCH 10/44] ASoC: atmel: atmel-pcm-pdc: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: atmel: atmel-pcm-pdc: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:32 ` [alsa-devel] [PATCH 11/44] ASoC: au1x: dbdma2: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: au1x: dbdma2: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:32 ` [alsa-devel] [PATCH 12/44] ASoC: au1x: dma: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: au1x: dma: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:32 ` [alsa-devel] [PATCH 13/44] ASoC: xtensa: xtfpga-i2s: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: xtensa: xtfpga-i2s: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:32 ` [alsa-devel] [PATCH 14/44] ASoC: xilinx: xlnx_formatter_pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: xilinx: xlnx_formatter_pcm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:32 ` [alsa-devel] [PATCH 14/44] ASoC: xilinx: xlnx_formatter_pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-02  5:32 ` [alsa-devel] [PATCH 15/44] ASoC: uniphier: aio-dma: " Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: uniphier: aio-dma: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:32 ` [alsa-devel] [PATCH 16/44] ASoC: txx9: txx9aclc: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: txx9: txx9aclc: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:32 ` [alsa-devel] [PATCH 17/44] ASoC: stm: stm32_adfsdm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: stm: stm32_adfsdm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:32 ` [alsa-devel] [PATCH 18/44] ASoC: sprd: sprd-pcm-dma: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: sprd: sprd-pcm-dma: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:32 ` [alsa-devel] [PATCH 19/44] ASoC: sof: pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: sof: pcm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 20/44] ASoC: sh: rsnd: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: sh: rsnd: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 21/44] ASoC: sh: fsi: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: sh: fsi: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 22/44] ASoC: sh: dma-sh7760: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: sh: dma-sh7760: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 23/44] ASoC: sh: siu_pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: sh: siu_pcm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 24/44] ASoC: samsung: idma: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: samsung: idma: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 25/44] ASoC: qcom: lpass-platform: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: qcom: lpass-platform: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 26/44] ASoC: qcom: q6routing: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: qcom: q6routing: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 27/44] ASoC: qcom: q6asm-dai: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: qcom: q6asm-dai: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 28/44] ASoC: pxa: mmp-pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: pxa: mmp-pcm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 29/44] ASoC: pxa: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: pxa: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:33 ` [alsa-devel] [PATCH 30/44] ASoC: meson: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: meson: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:34 ` [alsa-devel] [PATCH 31/44] ASoC: mediatek: mtk-btcvsd: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: mediatek: mtk-btcvsd: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:34 ` [alsa-devel] [PATCH 32/44] ASoC: mediatek: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: mediatek: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:34 ` [alsa-devel] [PATCH 33/44] ASoC: kirkwood: kirkwood-dma: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: kirkwood: kirkwood-dma: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:34 ` Kuninori Morimoto [this message]
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: dwc: dwc-pcm: " Mark Brown
2019-10-02  5:34 ` [alsa-devel] [PATCH 35/44] ASoC: rt5514-spi: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: rt5514-spi: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:34 ` [alsa-devel] [PATCH 36/44] ASoC: bcm: cygnus-pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: bcm: cygnus-pcm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:34 ` [alsa-devel] [PATCH 37/44] ASoC: fsl: imx-pcm-fiq: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: fsl: imx-pcm-fiq: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:34 ` [alsa-devel] [PATCH 38/44] ASoC: fsl: fsl_dma: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: fsl: fsl_dma: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:34 ` [alsa-devel] [PATCH 39/44] ASoC: fsl: mpc5200_dma: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: fsl: mpc5200_dma: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:34 ` [alsa-devel] [PATCH 40/44] ASoC: fsl: fsl_asrc_dma: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: fsl: fsl_asrc_dma: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:34 ` [alsa-devel] [PATCH 41/44] ASoC: fsl: fsl_dma: don't use snd_soc_rtdcom_lookup() Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: fsl: fsl_dma: don't use snd_soc_rtdcom_lookup()" to the asoc tree Mark Brown
2019-10-02  5:35 ` [alsa-devel] [PATCH 42/44] ASoC: soc-generic-dmaengine-pcm: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: soc-generic-dmaengine-pcm: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:35 ` [alsa-devel] [PATCH 43/44] ASoC: soc-utils: remove snd_pcm_ops Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: soc-utils: remove snd_pcm_ops" to the asoc tree Mark Brown
2019-10-02  5:35 ` [alsa-devel] [PATCH 44/44] ASoC: soc-component: remove snd_pcm_ops from component driver Kuninori Morimoto
2019-10-08 12:53   ` [alsa-devel] Applied "ASoC: soc-component: remove snd_pcm_ops from component driver" to the asoc tree 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=87h84r90dk.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /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.