All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	Heiko Stuebner <heiko@sntech.de>,
	Sangbeom Kim <sbkim73@samsung.com>,
	Ben Dooks <ben-linux@fluff.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	lgirdwood@gmail.com, Russell Linux <linux@arm.linux.org.uk>
Subject: Re: [PATCH 1/2] [RFC] ASoC: samsung: move s3c24xx over to dmaengine
Date: Thu, 12 Jun 2014 15:16:27 +0200	[thread overview]
Message-ID: <5498575.LeGAfDJTRA@wuerfel> (raw)
In-Reply-To: <4306380.m7SZhHfhaK@wuerfel>

On Thursday 05 June 2014 16:04:03 Arnd Bergmann wrote:
> On Thursday 05 June 2014 14:36:06 Mark Brown wrote:
> > On Thu, Jun 05, 2014 at 03:20:50PM +0200, Arnd Bergmann wrote:
> > > The s3c24xx sound support keeps giving randconfig build errors, this
> > > is a new attempt to solve it by moving the driver over to use dmaengine
> > > exclusively.
> > 
> > We already have a patch pending for this, it's just waiting until after
> > the merge window to avoid bisection breakage since it depends on
> > dmaengine changes.
> 
> Ok, very good.

Actually, I think it would still be good to do something about the
samsung/ac97.c file, which is the only reason we are keeping the
SAMSUNG_DMADEV code around that is part of the dependency chain
Russell posted, and it's definitely broken on anything but s3c24xx.

If we do something like the patch below, we can just disable
SAMSUNG_DMADEV already, which simplifies the dependency chains
a lot. We can then remove that code entirely in 3.17.

Note that for !CONFIG_S3C24XX_DMA, the code is currently broken,
as samsung_dma_get_ops()->started is a NULL pointer for dmadev.

	Arnd

diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index 68d9303..1db1028 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -225,9 +225,11 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
 				struct snd_soc_dai *dai)
 {
 	u32 ac_glbctrl;
+#ifdef CONFIG_S3C24XX_DMA
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct s3c_dma_params *dma_data =
 		snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
+#endif
 
 	ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL);
 	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
@@ -253,10 +255,9 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
 
 	writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
 
-	if (!dma_data->ops)
-		dma_data->ops = samsung_dma_get_ops();
-
-	dma_data->ops->started(dma_data->channel);
+#ifdef CONFIG_S3C24XX_DMA
+	s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED);
+#endif
 
 	return 0;
 }
@@ -265,9 +266,11 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream,
 				    int cmd, struct snd_soc_dai *dai)
 {
 	u32 ac_glbctrl;
+#ifdef CONFIG_S3C24XX_DMA
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct s3c_dma_params *dma_data =
 		snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
+#endif
 
 	ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL);
 	ac_glbctrl &= ~S3C_AC97_GLBCTRL_MICINTM_MASK;
@@ -287,10 +290,9 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream,
 
 	writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
 
-	if (!dma_data->ops)
-		dma_data->ops = samsung_dma_get_ops();
-
-	dma_data->ops->started(dma_data->channel);
+#ifdef CONFIG_S3C24XX_DMA
+	s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED);
+#endif
 
 	return 0;
 }

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] [RFC] ASoC: samsung: move s3c24xx over to dmaengine
Date: Thu, 12 Jun 2014 15:16:27 +0200	[thread overview]
Message-ID: <5498575.LeGAfDJTRA@wuerfel> (raw)
In-Reply-To: <4306380.m7SZhHfhaK@wuerfel>

On Thursday 05 June 2014 16:04:03 Arnd Bergmann wrote:
> On Thursday 05 June 2014 14:36:06 Mark Brown wrote:
> > On Thu, Jun 05, 2014 at 03:20:50PM +0200, Arnd Bergmann wrote:
> > > The s3c24xx sound support keeps giving randconfig build errors, this
> > > is a new attempt to solve it by moving the driver over to use dmaengine
> > > exclusively.
> > 
> > We already have a patch pending for this, it's just waiting until after
> > the merge window to avoid bisection breakage since it depends on
> > dmaengine changes.
> 
> Ok, very good.

Actually, I think it would still be good to do something about the
samsung/ac97.c file, which is the only reason we are keeping the
SAMSUNG_DMADEV code around that is part of the dependency chain
Russell posted, and it's definitely broken on anything but s3c24xx.

If we do something like the patch below, we can just disable
SAMSUNG_DMADEV already, which simplifies the dependency chains
a lot. We can then remove that code entirely in 3.17.

Note that for !CONFIG_S3C24XX_DMA, the code is currently broken,
as samsung_dma_get_ops()->started is a NULL pointer for dmadev.

	Arnd

diff --git a/sound/soc/samsung/ac97.c b/sound/soc/samsung/ac97.c
index 68d9303..1db1028 100644
--- a/sound/soc/samsung/ac97.c
+++ b/sound/soc/samsung/ac97.c
@@ -225,9 +225,11 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
 				struct snd_soc_dai *dai)
 {
 	u32 ac_glbctrl;
+#ifdef CONFIG_S3C24XX_DMA
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct s3c_dma_params *dma_data =
 		snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
+#endif
 
 	ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL);
 	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
@@ -253,10 +255,9 @@ static int s3c_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
 
 	writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
 
-	if (!dma_data->ops)
-		dma_data->ops = samsung_dma_get_ops();
-
-	dma_data->ops->started(dma_data->channel);
+#ifdef CONFIG_S3C24XX_DMA
+	s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED);
+#endif
 
 	return 0;
 }
@@ -265,9 +266,11 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream,
 				    int cmd, struct snd_soc_dai *dai)
 {
 	u32 ac_glbctrl;
+#ifdef CONFIG_S3C24XX_DMA
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
 	struct s3c_dma_params *dma_data =
 		snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
+#endif
 
 	ac_glbctrl = readl(s3c_ac97.regs + S3C_AC97_GLBCTRL);
 	ac_glbctrl &= ~S3C_AC97_GLBCTRL_MICINTM_MASK;
@@ -287,10 +290,9 @@ static int s3c_ac97_mic_trigger(struct snd_pcm_substream *substream,
 
 	writel(ac_glbctrl, s3c_ac97.regs + S3C_AC97_GLBCTRL);
 
-	if (!dma_data->ops)
-		dma_data->ops = samsung_dma_get_ops();
-
-	dma_data->ops->started(dma_data->channel);
+#ifdef CONFIG_S3C24XX_DMA
+	s3c2410_dma_ctrl(dma_data->channel, S3C2410_DMAOP_STARTED);
+#endif
 
 	return 0;
 }

  reply	other threads:[~2014-06-12 13:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 13:20 [PATCH 1/2] [RFC] ASoC: samsung: move s3c24xx over to dmaengine Arnd Bergmann
2014-06-05 13:20 ` Arnd Bergmann
2014-06-05 13:23 ` [PATCH 2/2] [RFC] ASoC: samsung: remove unused DMA data Arnd Bergmann
2014-06-05 13:23   ` Arnd Bergmann
2014-06-05 13:29 ` [alsa-devel] [PATCH 1/2] [RFC] ASoC: samsung: move s3c24xx over to dmaengine Lars-Peter Clausen
2014-06-05 13:29   ` Lars-Peter Clausen
2014-06-05 13:36 ` Mark Brown
2014-06-05 13:36   ` Mark Brown
2014-06-05 14:04   ` Arnd Bergmann
2014-06-05 14:04     ` Arnd Bergmann
2014-06-12 13:16     ` Arnd Bergmann [this message]
2014-06-12 13:16       ` Arnd Bergmann

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=5498575.LeGAfDJTRA@wuerfel \
    --to=arnd@arndb.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=ben-linux@fluff.org \
    --cc=broonie@kernel.org \
    --cc=heiko@sntech.de \
    --cc=kgene.kim@samsung.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=sbkim73@samsung.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.