jassisinghbrar | 2 Nov 2009 03:09
Picon

[PATCH 2/4] S3C64XX DSP: Added PCLK clock source for the PCM controllers

From: Jassi Brar <jassi.brar <at> samsung.com>

Signed-off-by: Jassi Brar <jassi.brar <at> samsung.com>
---
 arch/arm/plat-s3c64xx/clock.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-s3c64xx/clock.c b/arch/arm/plat-s3c64xx/clock.c
index 7a36e89..3ab564e 100644
--- a/arch/arm/plat-s3c64xx/clock.c
+++ b/arch/arm/plat-s3c64xx/clock.c
 <at>  <at>  -129,6 +129,18  <at>  <at>  static struct clk init_clocks_disable[] = {
 		.enable		= s3c64xx_pclk_ctrl,
 		.ctrlbit	= S3C_CLKCON_PCLK_IIS1,
 	}, {
+		.name		= "pcm",
+		.id		= 0,
+		.parent		= &clk_p,
+		.enable		= s3c64xx_pclk_ctrl,
+		.ctrlbit	= S3C_CLKCON_PCLK_PCM0,
+	}, {
+		.name		= "pcm",
+		.id		= 1,
+		.parent		= &clk_p,
+		.enable		= s3c64xx_pclk_ctrl,
+		.ctrlbit	= S3C_CLKCON_PCLK_PCM1,
+	}, {
 		.name		= "spi",
 		.id		= 0,
 		.parent		= &clk_p,
(Continue reading)

jassisinghbrar | 2 Nov 2009 03:09
Picon

[PATCH 4/4] S3C64XX DSP: Added the CPU driver for PCM controllers

From: Jassi Brar <jassi.brar <at> samsung.com>

Signed-off-by: Jassi Brar <jassi.brar <at> samsung.com>
---
 sound/soc/s3c24xx/Kconfig       |    4 +
 sound/soc/s3c24xx/Makefile      |    2 +
 sound/soc/s3c24xx/s3c64xx-dsp.c |  537 +++++++++++++++++++++++++++++++++++++++
 sound/soc/s3c24xx/s3c64xx-dsp.h |   41 +++
 4 files changed, 584 insertions(+), 0 deletions(-)
 create mode 100644 sound/soc/s3c24xx/s3c64xx-dsp.c
 create mode 100644 sound/soc/s3c24xx/s3c64xx-dsp.h

diff --git a/sound/soc/s3c24xx/Kconfig b/sound/soc/s3c24xx/Kconfig
index d7912f1..ea00f8a 100644
--- a/sound/soc/s3c24xx/Kconfig
+++ b/sound/soc/s3c24xx/Kconfig
 <at>  <at>  -24,6 +24,10  <at>  <at>  config SND_S3C64XX_SOC_I2S
 	select SND_S3C_I2SV2_SOC
 	select S3C64XX_DMA

+config SND_S3C64XX_SOC_DSP
+	tristate
+	select S3C64XX_DMA
+
 config SND_S3C2443_SOC_AC97
 	tristate
 	select S3C2410_DMA
diff --git a/sound/soc/s3c24xx/Makefile b/sound/soc/s3c24xx/Makefile
index 7790406..4241593 100644
--- a/sound/soc/s3c24xx/Makefile
(Continue reading)

jassisinghbrar | 2 Nov 2009 03:09
Picon

S3C64XX DSP support added

From: Jassi Brar <jassi.brar <at> samsung.com>

next coming are patches for review before I submit them mainline.
thanks.

jassisinghbrar | 2 Nov 2009 03:09
Picon

[PATCH 3/4] S3C64XX DSP: Defined PCM controller platform devices

From: Jassi Brar <jassi.brar <at> samsung.com>

Signed-off-by: Jassi Brar <jassi.brar <at> samsung.com>
---
 arch/arm/plat-s3c64xx/Makefile                    |    1 +
 arch/arm/plat-s3c64xx/dev-pcm.c                   |   50 +++++++++++++++++++++
 arch/arm/plat-s3c64xx/include/plat/s3c64xx-devs.h |   18 +++++++
 3 files changed, 69 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-s3c64xx/dev-pcm.c
 create mode 100644 arch/arm/plat-s3c64xx/include/plat/s3c64xx-devs.h

diff --git a/arch/arm/plat-s3c64xx/Makefile b/arch/arm/plat-s3c64xx/Makefile
index b85b435..83c5bf1 100644
--- a/arch/arm/plat-s3c64xx/Makefile
+++ b/arch/arm/plat-s3c64xx/Makefile
 <at>  <at>  -42,3 +42,4  <at>  <at>  obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o
 obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o
 obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
 obj-$(CONFIG_SND_S3C24XX_SOC) += dev-audio.o
+obj-$(CONFIG_SND_S3C64XX_SOC_DSP) += dev-pcm.o
diff --git a/arch/arm/plat-s3c64xx/dev-pcm.c b/arch/arm/plat-s3c64xx/dev-pcm.c
new file mode 100644
index 0000000..f8f483a
--- /dev/null
+++ b/arch/arm/plat-s3c64xx/dev-pcm.c
 <at>  <at>  -0,0 +1,50  <at>  <at> 
+/* linux/arch/arm/plat-s3c64xx/dev-pcm.c
+ *
+ *  Copyright (c) 2009 Samsung Electronics Co. Ltd
+ *  Author: Jaswinder Singh <jassi.brar <at> samsung.com>
(Continue reading)

jassisinghbrar | 2 Nov 2009 03:09
Picon

[PATCH 1/4] S3C64XX DSP: Added base and register defines for PCM controllers

From: Jassi Brar <jassi.brar <at> samsung.com>

Signed-off-by: Jassi Brar <jassi.brar <at> samsung.com>
---
 arch/arm/mach-s3c6400/include/mach/map.h      |    2 +
 arch/arm/plat-s3c64xx/include/plat/regs-pcm.h |   94 +++++++++++++++++++++++++
 2 files changed, 96 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-s3c64xx/include/plat/regs-pcm.h

diff --git a/arch/arm/mach-s3c6400/include/mach/map.h b/arch/arm/mach-s3c6400/include/mach/map.h
index fc8b223..866be31 100644
--- a/arch/arm/mach-s3c6400/include/mach/map.h
+++ b/arch/arm/mach-s3c6400/include/mach/map.h
 <at>  <at>  -48,6 +48,8  <at>  <at> 
 #define S3C64XX_PA_IIS1		(0x7F003000)
 #define S3C64XX_PA_TIMER	(0x7F006000)
 #define S3C64XX_PA_IIC0		(0x7F004000)
+#define S3C64XX_PA_PCM0		(0x7F009000)
+#define S3C64XX_PA_PCM1		(0x7F00A000)
 #define S3C64XX_PA_IISV4	(0x7F00D000)
 #define S3C64XX_PA_IIC1		(0x7F00F000)

diff --git a/arch/arm/plat-s3c64xx/include/plat/regs-pcm.h b/arch/arm/plat-s3c64xx/include/plat/regs-pcm.h
new file mode 100644
index 0000000..2a5fec9
--- /dev/null
+++ b/arch/arm/plat-s3c64xx/include/plat/regs-pcm.h
 <at>  <at>  -0,0 +1,95  <at>  <at> 
+/* linux/arch/arm/plat-s3c64xx/include/plat/regs-pcm.h
+ *
(Continue reading)

Harald Welte | 2 Nov 2009 08:05

Ben Dooks' git tree location

Hi all!

As Ben has announced some time ago, and some folks like Jassi have noted:

Ben's s3c-linux git tree has moved its location some time ago.

you can find a gitweb interface at
	http://git.fluff.org/gitweb?p=bjdooks/linux.git;a=summary

you can clone it from the following URL:
	git clone git://git.fluff.org/bjdooks/linux.git

I don't know if there is any http URL available.  In any case,
even from inside Samsung, you can use the socat based method
to access a git:// style URL, as per instructions from:
http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/

Regards,
	Harald
--

-- 
- Harald Welte <laforge <at> gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)
Mark Brown | 2 Nov 2009 11:42
Favicon
Gravatar

Re: S3C64XX DSP support added

On Mon, Nov 02, 2009 at 11:09:34AM +0900, jassisinghbrar <at> gmail.com wrote:
> From: Jassi Brar <jassi.brar <at> samsung.com>
> 
> next coming are patches for review before I submit them mainline.
> thanks.

If nothing else these need a better name - the name suggests that
they're a DSP when in fact they are actually implementing support for
the PCM interface.  You might want to rename the existing PCM driver to
DMA.
jassi brar | 2 Nov 2009 12:10
Picon

Re: S3C64XX DSP support added

On Mon, Nov 2, 2009 at 7:42 PM, Mark Brown
<broonie <at> opensource.wolfsonmicro.com> wrote:
> On Mon, Nov 02, 2009 at 11:09:34AM +0900, jassisinghbrar <at> gmail.com wrote:
>> From: Jassi Brar <jassi.brar <at> samsung.com>
>>
>> next coming are patches for review before I submit them mainline.
>> thanks.
>
> If nothing else these need a better name - the name suggests that
> they're a DSP when in fact they are actually implementing support for
> the PCM interface.

I saw that coming...
The codec drivers use the term DSP (DSP_A/DSP_B) for what our PCM
controller does.
I used 'DSP' for things related to ALSA and 'PCM' for h/w specific things.

> You might want to rename the existing PCM driver to DMA.
Could do that, but still 'PCM' is used at other places in the stack as well.
Would that be fine?
Mark Brown | 2 Nov 2009 12:17
Favicon
Gravatar

Re: [PATCH 4/4] S3C64XX DSP: Added the CPU driver for PCM controllers

On Mon, Nov 02, 2009 at 11:09:51AM +0900, jassisinghbrar <at> gmail.com wrote:

> +static int s3c64xx_dsp_trigger(struct snd_pcm_substream *substream, int cmd,
> +			       struct snd_soc_dai *dai)
> +{
> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> +	struct s3c_dsp_info *dsp = to_info(rtd->dai->cpu_dai);
> +	unsigned long irqs;
> +
> +	pr_debug("Entered %s\n", __func__);
> +
> +	switch (cmd) {
> +	case SNDRV_PCM_TRIGGER_START:
> +	case SNDRV_PCM_TRIGGER_RESUME:
> +	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
> +		local_irq_save(irqs);

Why local_irq_save()?  On existing uniprocessor systems they should be
equivalent to a regular IRQ save and if there are future multi core
chips using the driver I can't imagine that a local IRQ save will be
enough.

> +	default:
> +		pr_err("Unsupported data format!\n");
> +		return -EINVAL;

Pretty much all the prints in the driver could be dev_ versions.

> +static int s3c64xx_dsp_set_clkdiv(struct snd_soc_dai *cpu_dai,
> +				  int div_id, int div)
(Continue reading)

Mark Brown | 2 Nov 2009 12:23
Favicon
Gravatar

Re: S3C64XX DSP support added

On Mon, Nov 02, 2009 at 08:10:07PM +0900, jassi brar wrote:

> The codec drivers use the term DSP (DSP_A/DSP_B) for what our PCM
> controller does.

I know; this is a bit unfortunate but not too much of an issue since
it's only ever mentioned in the context of a DAIFMT constant so it's
clear what's being talked about.  In this case it's particularly
confusing because the hardware is always talked about as being PCM and
from the sounds of it some of the current S5P processors already have
some basic DSP stuff in them.

> I used 'DSP' for things related to ALSA and 'PCM' for h/w specific things.

I'm having a hard time following your logic here?  This is a hardware
driver after all.

> > You might want to rename the existing PCM driver to DMA.
> Could do that, but still 'PCM' is used at other places in the stack as well.
> Would that be fine?

Probably, yes.  The use of PCM for DMA drivers is there mostly because
in older systems the PCM interface offered no software control at all so
all you needed to drive them was the DMA driver.

Gmane