soc - Support PXA3xx AC97
Subsystems (3)
PATCH 1/5 soc - Support PXA3xx AC97
The PXA3xx does not support the use of interrupts during reset and access to the GPIO status requires similar handling to that for PXA27x.
--- sound/soc/pxa/pxa2xx-ac97.c | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-)
sound/soc/pxa/pxa2xx-ac97.c +27 -2
@@ -55,7 +55,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97,mutex_lock (&car_mutex);/* set up primary or secondary codec/modem space */ -#ifdef CONFIG_PXA27x +#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE ;#else if (reg ==AC97_GPIO_STATUS )
@@ -105,7 +105,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg,mutex_lock (&car_mutex);/* set up primary or secondary codec/modem space */ -#ifdef CONFIG_PXA27x +#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE ;#else if (reg ==AC97_GPIO_STATUS )
@@ -128,6 +128,9 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg,static void pxa2xx_ac97_warm_reset (struct snd_ac97 *ac97) { +#ifdef CONFIG_PXA3xx +int timeout =100 ; +#endif gsr_bits =0 ;#ifdef CONFIG_PXA27x
@@ -138,6 +141,11 @@ static void pxa2xx_ac97_warm_reset(struct snd_ac97 *ac97)GCR |=GCR_WARM_RST ;pxa_gpio_mode (113 |GPIO_ALT_FN_2_OUT );udelay (500 ); +#elif defined(CONFIG_PXA3xx) +/* Can't use interrupts */ +GCR |=GCR_WARM_RST ; +while (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR )) && timeout--) +mdelay (1 );#else GCR |=GCR_WARM_RST |GCR_PRIRDY_IEN |GCR_SECRDY_IEN ;wait_event_timeout (gsr_wq, gsr_bits & (GSR_PCR |GSR_SCR ),1 );
@@ -153,6 +161,16 @@ static void pxa2xx_ac97_warm_reset(struct snd_ac97 *ac97)static void pxa2xx_ac97_cold_reset (struct snd_ac97 *ac97) { +#ifdef CONFIG_PXA3xx +int timeout =1000 ; + +/* Hold CLKBPB for 100us */ +GCR =0 ; +GCR =GCR_CLKBPB ; +udelay (100 ); +GCR =0 ; +#endif +GCR &=GCR_COLD_RST ;/* clear everything but nCRST */ GCR &= ~GCR_COLD_RST ;/* then assert nCRST */
@@ -164,6 +182,13 @@ static void pxa2xx_ac97_cold_reset(struct snd_ac97 *ac97)pxa_set_cken (CKEN_AC97CONF ,0 );GCR =GCR_COLD_RST ;udelay (50 ); +#elif defined(CONFIG_PXA3xx) +/* Can't use interrupts on PXA3xx */ +GCR &= ~(GCR_PRIRDY_IEN |GCR_SECRDY_IEN ); + +GCR =GCR_WARM_RST |GCR_COLD_RST ; +while (!(GSR & (GSR_PCR |GSR_SCR )) && timeout--) +mdelay (10 );#else GCR =GCR_COLD_RST ;GCR |=GCR_CDONE_IE |GCR_SDONE_IE ;
Signature · 1 line
1.5.5
PATCH 2/5 pxa2xx-ac97: Support PXA3xx AC97
--- sound/arm/pxa2xx-ac97.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-)
sound/arm/pxa2xx-ac97.c +24 -0
@@ -106,6 +106,16 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsignestatic void pxa2xx_ac97_reset (struct snd_ac97 *ac97) {/* First, try cold reset */ +#ifdef CONFIG_PXA3xx +int timeout; + +/* Hold CLKBPB for 100us */ +GCR =0 ; +GCR =GCR_CLKBPB ; +udelay (100 ); +GCR =0 ; +#endif +GCR &=GCR_COLD_RST ;/* clear everything but nCRST */ GCR &= ~GCR_COLD_RST ;/* then assert nCRST */
@@ -117,6 +127,14 @@ static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)pxa_set_cken (CKEN_AC97CONF ,0 );GCR =GCR_COLD_RST ;udelay (50 ); +#elif defined(CONFIG_PXA3xx) + timeout =1000 ; +/* Can't use interrupts on PXA3xx */ +GCR &= ~(GCR_PRIRDY_IEN |GCR_SECRDY_IEN ); + +GCR =GCR_WARM_RST |GCR_COLD_RST ; +while (!(GSR & (GSR_PCR |GSR_SCR )) && timeout--) +mdelay (10 );#else GCR =GCR_COLD_RST ;GCR |=GCR_CDONE_IE |GCR_SDONE_IE ;
@@ -137,6 +155,12 @@ static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)GCR |=GCR_WARM_RST ;pxa_gpio_mode (113 |GPIO_ALT_FN_2_OUT );udelay (500 ); +#elif defined(CONFIG_PXA3xx) + timeout =100 ; +/* Can't use interrupts */ +GCR |=GCR_WARM_RST ; +while (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR )) && timeout--) +mdelay (1 );#else GCR |=GCR_WARM_RST |GCR_PRIRDY_IEN |GCR_SECRDY_IEN ;wait_event_timeout (gsr_wq, gsr_bits & (GSR_PCR |GSR_SCR ),1 );
Signature · 1 line
1.5.5
PATCH 3/5 ASoC: Add drivers for the Texas Instruments OMAP processors
From: Jarkko Nikula <[email protected]>
Add common OMAP ASoC drivers and machine driver for Nokia N810. Currently supported features are:
- Covers OMAPs from 1510 to 2420
- Common DMA driver
- DAI link driver using McBSP port in I2S mode
- Basic machine driver for Nokia N810
--- sound/soc/Kconfig | 1 + sound/soc/Makefile | 2 +- sound/soc/omap/Kconfig | 19 ++ sound/soc/omap/Makefile | 11 ++ sound/soc/omap/n810.c | 336 +++++++++++++++++++++++++++++++++++ sound/soc/omap/omap-mcbsp.c | 414 +++++++++++++++++++++++++++++++++++++++++++ sound/soc/omap/omap-mcbsp.h | 49 +++++ sound/soc/omap/omap-pcm.c | 357 +++++++++++++++++++++++++++++++++++++ sound/soc/omap/omap-pcm.h | 35 ++++ 9 files changed, 1223 insertions(+), 1 deletions(-) create mode 100644 sound/soc/omap/Kconfig create mode 100644 sound/soc/omap/Makefile create mode 100644 sound/soc/omap/n810.c create mode 100644 sound/soc/omap/omap-mcbsp.c create mode 100644 sound/soc/omap/omap-mcbsp.h create mode 100644 sound/soc/omap/omap-pcm.c create mode 100644 sound/soc/omap/omap-pcm.h
sound/soc/Kconfig +1 -0
@@ -30,6 +30,7 @@ source "sound/soc/s3c24xx/Kconfig" source "sound/soc/sh/Kconfig" source "sound/soc/fsl/Kconfig" source "sound/soc/davinci/Kconfig" +source "sound/soc/omap/Kconfig" # Supported codecs source "sound/soc/codecs/Kconfig"
sound/soc/Makefile +1 -1
@@ -1,4 +1,4 @@ snd-soc-core-objs := soc-core.o soc-dapm.o obj-$(CONFIG_SND_SOC) += snd-soc-core.o -obj-$(CONFIG_SND_SOC) += codecs/ at91/ pxa/ s3c24xx/ sh/ fsl/ davinci/ +obj-$(CONFIG_SND_SOC) += codecs/ at91/ pxa/ s3c24xx/ sh/ fsl/ davinci/ omap/
sound/soc/omap/Kconfig new file +19 -0
@@ -0,0 +1,19 @@ +menu "SoC Audio for the Texas Instruments OMAP" + +config SND_OMAP_SOC + tristate "SoC Audio for the Texas Instruments OMAP chips" + depends on ARCH_OMAP && SND_SOC + +config SND_OMAP_SOC_MCBSP + tristate + select OMAP_MCBSP + +config SND_OMAP_SOC_N810 + tristate "SoC Audio support for Nokia N810" + depends on SND_OMAP_SOC && MACH_NOKIA_N810 + select SND_OMAP_SOC_MCBSP + select SND_SOC_TLV320AIC3X + help + Say Y if you want to add support for SoC audio on Nokia N810. + +endmenu
sound/soc/omap/Makefile new file +11 -0
@@ -0,0 +1,11 @@ +# OMAP Platform Support +snd-soc-omap-objs := omap-pcm.o +snd-soc-omap-mcbsp-objs := omap-mcbsp.o + +obj-$(CONFIG_SND_OMAP_SOC) += snd-soc-omap.o +obj-$(CONFIG_SND_OMAP_SOC_MCBSP) += snd-soc-omap-mcbsp.o + +# OMAP Machine Support +snd-soc-n810-objs := n810.o + +obj-$(CONFIG_SND_OMAP_SOC_N810) += snd-soc-n810.o
sound/soc/omap/n810.c new file +336 -0
336 lines not on this page · raw message
sound/soc/omap/omap-mcbsp.c new file +414 -0
414 lines not on this page · raw message
sound/soc/omap/omap-mcbsp.h new file +49 -0
49 lines not on this page · raw message
sound/soc/omap/omap-pcm.c new file +357 -0
357 lines not on this page · raw message
sound/soc/omap/omap-pcm.h new file +35 -0
@@ -0,0 +1,35 @@ +/* +* omap-pcm.h +* +* Copyright (C) 2008 Nokia Corporation +* +* Contact: Jarkko Nikula <[email protected]> +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* version 2 as published by the Free Software Foundation. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +* 02110-1301 USA +* +*/ + +#ifndef __OMAP_PCM_H__ +#define __OMAP_PCM_H__ + +struct omap_pcm_dma_data { +char *name;/* stream identifier */ +int dma_req;/* DMA request line */ +unsigned long port_addr;/* transmit/receive register */ +}; + +extern struct snd_soc_platform omap_soc_platform; + +#endif
Signature · 1 line
1.5.5
PATCH 4/5 soc - neo1973_wm8753 - Fix module unload
From: Tim Niemeyer <[email protected]>
--- sound/soc/s3c24xx/neo1973_wm8753.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
sound/soc/s3c24xx/neo1973_wm8753.c +1 -0
@@ -659,6 +659,7 @@ static int __init neo1973_init(void) static void __exit neo1973_exit(void) { +i2c_del_driver (&lm4857_i2c_driver);platform_device_unregister (neo1973_snd_device); }
Signature · 1 line
1.5.5
PATCH 5/5 soc - s3c24xx - Improve diagnostic output
From: Tim Niemeyer <[email protected]>
Add some debug messages for suspend/resume and to add a clear prefix to s3c24xx-i2s and s3c24xx-pcm.
--- sound/soc/s3c24xx/s3c24xx-i2s.c | 4 +++- sound/soc/s3c24xx/s3c24xx-pcm.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)
sound/soc/s3c24xx/s3c24xx-i2s.c +3 -1
@@ -46,7 +46,7 @@#define S3C24XX_I2S_DEBUG 0#if S3C24XX_I2S_DEBUG -#define DBG(x...) printk(KERN_DEBUG x) +#define DBG(x...) printk(KERN_DEBUG "s3c24xx-i2s: " x)#else #define DBG(x...)#endif
@@ -415,6 +415,7 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev)int s3c24xx_i2s_suspend (struct platform_device *pdev,struct snd_soc_cpu_dai *cpu_dai) { +DBG ("Entered %s\n" , __FUNCTION__); s3c24xx_i2s.iiscon =readl (s3c24xx_i2s.regs +S3C2410_IISCON ); s3c24xx_i2s.iismod =readl (s3c24xx_i2s.regs +S3C2410_IISMOD ); s3c24xx_i2s.iisfcon =readl (s3c24xx_i2s.regs +S3C2410_IISFCON );
@@ -428,6 +429,7 @@ int s3c24xx_i2s_suspend(struct platform_device *pdev,int s3c24xx_i2s_resume (struct platform_device *pdev,struct snd_soc_cpu_dai *cpu_dai) { +DBG ("Entered %s\n" , __FUNCTION__);clk_enable (s3c24xx_i2s.iis_clk);writel (s3c24xx_i2s.iiscon, s3c24xx_i2s.regs +S3C2410_IISCON );
sound/soc/s3c24xx/s3c24xx-pcm.c +1 -1
@@ -39,7 +39,7 @@#define S3C24XX_PCM_DEBUG 0#if S3C24XX_PCM_DEBUG -#define DBG(x...) printk(KERN_DEBUG x) +#define DBG(x...) printk(KERN_DEBUG "s3c24xx-pcm: " x)#else #define DBG(x...)#endif
Signature · 1 line
1.5.5
Re: [PATCH 5/5] soc - s3c24xx - Improve diagnostic output
At Tue, 22 Apr 2008 14:14:39 +0100,
Quoted 8 lines · Mark Brown
From: Tim Niemeyer <[email protected]>
Add some debug messages for suspend/resume and to add a clear prefix to s3c24xx-i2s and s3c24xx-pcm.
Signed-off-by Tim Niemeyer <[email protected]>Signed-off-by Mark Brown <[email protected]>
Got the following checkpatch warnings. Please fix.
WARNING: __func__ should be used instead of gcc specific __FUNCTION__ #17: FILE: soc/s3c24xx/s3c24xx-i2s.c:418:
+ DBG("Entered %s\n", __FUNCTION__);
WARNING: __func__ should be used instead of gcc specific __FUNCTION__ #25: FILE: soc/s3c24xx/s3c24xx-i2s.c:432:
+ DBG("Entered %s\n", __FUNCTION__);
thanks,
Takashi
Quoted 50 lines
--- sound/soc/s3c24xx/s3c24xx-i2s.c | 4 +++- sound/soc/s3c24xx/s3c24xx-pcm.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)sound/soc/s3c24xx/s3c24xx-i2s.c +3
-1@@ -46,7 +46,7 @@#define S3C24XX_I2S_DEBUG 0#if S3C24XX_I2S_DEBUG -#define DBG(x...) printk(KERN_DEBUG x) +#define DBG(x...) printk(KERN_DEBUG "s3c24xx-i2s: " x)#else #define DBG(x...)#endif @@ -415,6 +415,7 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev)int s3c24xx_i2s_suspend (struct platform_device *pdev,struct snd_soc_cpu_dai *cpu_dai) { +DBG ("Entered %s\n" , __FUNCTION__); s3c24xx_i2s.iiscon =readl (s3c24xx_i2s.regs +S3C2410_IISCON ); s3c24xx_i2s.iismod =readl (s3c24xx_i2s.regs +S3C2410_IISMOD ); s3c24xx_i2s.iisfcon =readl (s3c24xx_i2s.regs +S3C2410_IISFCON );@@ -428,6 +429,7 @@ int s3c24xx_i2s_suspend(struct platform_device *pdev,int s3c24xx_i2s_resume (struct platform_device *pdev,struct snd_soc_cpu_dai *cpu_dai) { +DBG ("Entered %s\n" , __FUNCTION__);clk_enable (s3c24xx_i2s.iis_clk);writel (s3c24xx_i2s.iiscon, s3c24xx_i2s.regs +S3C2410_IISCON );sound/soc/s3c24xx/s3c24xx-pcm.c +1
-1@@ -39,7 +39,7 @@#define S3C24XX_PCM_DEBUG 0#if S3C24XX_PCM_DEBUG -#define DBG(x...) printk(KERN_DEBUG x) +#define DBG(x...) printk(KERN_DEBUG "s3c24xx-pcm: " x)#else #define DBG(x...)#endif Signature · 1 line
1.5.5
Re: [PATCH 5/5] soc - s3c24xx - Improve diagnostic output
Hallo Takashi,
i think, if i change this, the other lines in the file, that use also the __FUNCTION__, should be changed also.
Later in the evening, i could do this, but at the moment i have to listen to my BWL-lesson.
Quoted 67 lines · Takashi Iwai
At Tue, 22 Apr 2008 14:14:39 +0100,
Quoted 8 lines · Mark Brown
From: Tim Niemeyer <[email protected]>
Add some debug messages for suspend/resume and to add a clear prefix to s3c24xx-i2s and s3c24xx-pcm.
Signed-off-by Tim Niemeyer <[email protected]>Signed-off-by Mark Brown <[email protected]>Got the following checkpatch warnings. Please fix.
WARNING:
__func__should be used instead of gcc specific__FUNCTION__#17: FILE:soc/s3c24xx/s3c24xx-i2s.c:418:(quoted diff) +1
-0+ DBG("Entered %s\n", __FUNCTION__);WARNING:
__func__should be used instead of gcc specific__FUNCTION__#25: FILE:soc/s3c24xx/s3c24xx-i2s.c:432:(quoted diff) +1
-0+ DBG("Entered %s\n", __FUNCTION__);thanks,
Takashi
Quoted 40 lines
--- sound/soc/s3c24xx/s3c24xx-i2s.c | 4 +++- sound/soc/s3c24xx/s3c24xx-pcm.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)sound/soc/s3c24xx/s3c24xx-i2s.c +3
-1@@ -46,7 +46,7 @@#define S3C24XX_I2S_DEBUG 0#if S3C24XX_I2S_DEBUG -#define DBG(x...) printk(KERN_DEBUG x) +#define DBG(x...) printk(KERN_DEBUG "s3c24xx-i2s: " x)#else #define DBG(x...)#endif @@ -415,6 +415,7 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev)int s3c24xx_i2s_suspend (struct platform_device *pdev,struct snd_soc_cpu_dai *cpu_dai) { +DBG ("Entered %s\n" , __FUNCTION__); s3c24xx_i2s.iiscon =readl (s3c24xx_i2s.regs +S3C2410_IISCON ); s3c24xx_i2s.iismod =readl (s3c24xx_i2s.regs +S3C2410_IISMOD ); s3c24xx_i2s.iisfcon =readl (s3c24xx_i2s.regs +S3C2410_IISFCON );@@ -428,6 +429,7 @@ int s3c24xx_i2s_suspend(struct platform_device *pdev,int s3c24xx_i2s_resume (struct platform_device *pdev,struct snd_soc_cpu_dai *cpu_dai) { +DBG ("Entered %s\n" , __FUNCTION__);clk_enable (s3c24xx_i2s.iis_clk);writel (s3c24xx_i2s.iiscon, s3c24xx_i2s.regs +S3C2410_IISCON );sound/soc/s3c24xx/s3c24xx-pcm.c +0
-0@@ -39,7 +39,7 @@
Quoted 11 lines
Quoted 10 lines
sound/soc/s3c24xx/s3c24xx-pcm.c +1
-1#define S3C24XX_PCM_DEBUG 0#if S3C24XX_PCM_DEBUG -#define DBG(x...) printk(KERN_DEBUG x) +#define DBG(x...) printk(KERN_DEBUG "s3c24xx-pcm: " x)#else #define DBG(x...)#endif Signature · 1 line
1.5.5
Tim Niemeyer
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Re: [PATCH 5/5] soc - s3c24xx - Improve diagnostic output
At Tue, 22 Apr 2008 16:26:15 +0200,
Quoted 5 lines · Tim Niemeyer
Hallo Takashi,
i think, if i change this, the other lines in the file, that use also the
__FUNCTION__, should be changed also.
Yes, but as a separate patch. At least, the new change should be free from checkpatch-complaints.
thanks,
Takashi
Quoted 85 lines
Later in the evening, i could do this, but at the moment i have to listen to my BWL-lesson.
Quoted 67 lines · Takashi Iwai
At Tue, 22 Apr 2008 14:14:39 +0100,
Quoted 8 lines · Mark Brown
From: Tim Niemeyer <[email protected]>
Add some debug messages for suspend/resume and to add a clear prefix to s3c24xx-i2s and s3c24xx-pcm.
Signed-off-by Tim Niemeyer <[email protected]>Signed-off-by Mark Brown <[email protected]>Got the following checkpatch warnings. Please fix.
WARNING:
__func__should be used instead of gcc specific__FUNCTION__#17: FILE:soc/s3c24xx/s3c24xx-i2s.c:418:(quoted diff) +1
-0+ DBG("Entered %s\n", __FUNCTION__);WARNING:
__func__should be used instead of gcc specific__FUNCTION__#25: FILE:soc/s3c24xx/s3c24xx-i2s.c:432:(quoted diff) +1
-0+ DBG("Entered %s\n", __FUNCTION__);thanks,
Takashi
Quoted 40 lines
--- sound/soc/s3c24xx/s3c24xx-i2s.c | 4 +++- sound/soc/s3c24xx/s3c24xx-pcm.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-)sound/soc/s3c24xx/s3c24xx-i2s.c +3
-1@@ -46,7 +46,7 @@#define S3C24XX_I2S_DEBUG 0#if S3C24XX_I2S_DEBUG -#define DBG(x...) printk(KERN_DEBUG x) +#define DBG(x...) printk(KERN_DEBUG "s3c24xx-i2s: " x)#else #define DBG(x...)#endif @@ -415,6 +415,7 @@ static int s3c24xx_i2s_probe(struct platform_device *pdev)int s3c24xx_i2s_suspend (struct platform_device *pdev,struct snd_soc_cpu_dai *cpu_dai) { +DBG ("Entered %s\n" , __FUNCTION__); s3c24xx_i2s.iiscon =readl (s3c24xx_i2s.regs +S3C2410_IISCON ); s3c24xx_i2s.iismod =readl (s3c24xx_i2s.regs +S3C2410_IISMOD ); s3c24xx_i2s.iisfcon =readl (s3c24xx_i2s.regs +S3C2410_IISFCON );@@ -428,6 +429,7 @@ int s3c24xx_i2s_suspend(struct platform_device *pdev,int s3c24xx_i2s_resume (struct platform_device *pdev,struct snd_soc_cpu_dai *cpu_dai) { +DBG ("Entered %s\n" , __FUNCTION__);clk_enable (s3c24xx_i2s.iis_clk);writel (s3c24xx_i2s.iiscon, s3c24xx_i2s.regs +S3C2410_IISCON );sound/soc/s3c24xx/s3c24xx-pcm.c +0
-0@@ -39,7 +39,7 @@Quoted 11 lines
Quoted 10 lines
sound/soc/s3c24xx/s3c24xx-pcm.c +1
-1#define S3C24XX_PCM_DEBUG 0#if S3C24XX_PCM_DEBUG -#define DBG(x...) printk(KERN_DEBUG x) +#define DBG(x...) printk(KERN_DEBUG "s3c24xx-pcm: " x)#else #define DBG(x...)#endif Signature · 1 line
1.5.5Tim Niemeyer
Takashi Iwai
AppliedRe: [PATCH 4/5] soc - neo1973_wm8753 - Fix module unload
In reply to Mark BrownAt Tue, 22 Apr 2008 14:14:38 +0100,
Quoted 5 lines · Mark Brown
From: Tim Niemeyer <[email protected]>
Signed-off-by Tim Niemeyer <[email protected]>Signed-off-by Mark Brown <[email protected]>
Applied to HG tree. Thanks.
Takashi
Quoted 19 lines
--- sound/soc/s3c24xx/neo1973_wm8753.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)sound/soc/s3c24xx/neo1973_wm8753.c +1
-0@@ -659,6 +659,7 @@ static int __init neo1973_init(void) static void __exit neo1973_exit(void) { +i2c_del_driver (&lm4857_i2c_driver);platform_device_unregister (neo1973_snd_device); }Signature · 1 line
1.5.5
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
In reply to Mark BrownAt Tue, 22 Apr 2008 14:14:37 +0100,
Quoted 6 lines · Mark Brown
From: Jarkko Nikula <[email protected]>
Add common OMAP ASoC drivers and machine driver for Nokia N810. Currently supported features are:
Quoted 7 lines
- Covers OMAPs from 1510 to 2420
- Common DMA driver
- DAI link driver using McBSP port in I2S mode
- Basic machine driver for Nokia N810Signed-off-by Jarkko Nikula <[email protected]>Signed-off-by Mark Brown <[email protected]>
I postpone this patch until 2.6.26 merge is closed.
This is obviously a new stuff and it must be cooked for a while in mm tree.
Thanks,
Takashi
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
Quoted 8 lines · Takashi Iwai
Quoted 2 lines · Mark Brown
Add common OMAP ASoC drivers and machine driver for Nokia N810. Currently supported features are:
I postpone this patch until 2.6.26 merge is closed.
This is obviously a new stuff and it must be cooked for a while in mm tree.
The main reason why this is new is that it depends on the architecture being added via the ARM tree - as with the PXA3xx AC97 changes it had been waiting for the required patches to be submitted by rmk, which just happened. Given this it seems safe to merge it as-is - the entire machine shares the same sort of testing status and the patch isn't new in itself.
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
At Tue, 22 Apr 2008 15:43:31 +0100,
Quoted 11 lines · Mark Brown
Quoted 8 lines · Takashi Iwai
Quoted 2 lines · Mark Brown
Add common OMAP ASoC drivers and machine driver for Nokia N810. Currently supported features are:
I postpone this patch until 2.6.26 merge is closed.
This is obviously a new stuff and it must be cooked for a while in mm tree.
Quoted 6 lines
The main reason why this is new is that it depends on the architecture being added via the ARM tree - as with the PXA3xx AC97 changes it had been waiting for the required patches to be submitted by rmk, which just happened. Given this it seems safe to merge it as-is - the entire machine shares the same sort of testing status and the patch isn't new in itself.
The problem is that it wasn't passed through mm tree at all. It's a generic rule for merging a new stuff to the upstream tree.
If the stuff has to cooperate with the changes in other trees, pass it seprately to Andrew (or give me a hint) so that it's put to mm tree rightly at the next time.
Takashi
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
Quoted 1 line · Takashi Iwai
The problem is that it wasn't passed through mm tree at all.
Oh, I see. I had thought that you already maintained a separate -mm tree. Looking again it seems your linus tree is actually just for backported fixes rather than a general submission to Linus tree. I must've looked at it at the wrong point in the cycle when figuring these things out.
Quoted 3 lines
If the stuff has to cooperate with the changes in other trees, pass it seprately to Andrew (or give me a hint) so that it's put to mm tree rightly at the next time.
I could also ask Andrew to pull the ASoC upstream branch (which is based off the ALSA -mm branch) and keep any dodgy commits there without e-mailing you. I'm not sure if having a branch rebased off another branch he's pulling would be too clever, though, but that would probably be the lowest maintinence option.
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
At Tue, 22 Apr 2008 19:38:42 +0100,
Quoted 8 lines · Mark Brown
Quoted 1 line · Takashi Iwai
The problem is that it wasn't passed through mm tree at all.
Oh, I see. I had thought that you already maintained a separate -mm tree. Looking again it seems your linus tree is actually just for backported fixes rather than a general submission to Linus tree.
Hm? No, right now it's identical with the master branch, too.
Quoted 2 lines
I must've looked at it at the wrong point in the cycle when figuring these
things out.
Actually I have a separate branch on my git tree. The master is for mm tree and for-linus is for Linus. The appropriate patches are copied (and rebased) to for-linus branch once after the merge window is opened. So, it's no no problem at all to have patches that are only for mm.
Quoted 7 lines
Quoted 3 lines
If the stuff has to cooperate with the changes in other trees, pass it seprately to Andrew (or give me a hint) so that it's put to mm tree rightly at the next time.
I could also ask Andrew to pull the ASoC upstream branch (which is based off the ALSA -mm branch) and keep any dodgy commits there without e-mailing you.
Well, Andrew prefers patches merged into the subsystem tree, so it's better to just mail me as before. Then we have one more review automatically.
My previous comment was about the patch that affects several subsystem / arch changes. In this case, the change isn't only in the subsystem tree. So, we'd need to cope with others anyway. Keeping such a patch in mm tree separately is one option.
thanks,
Takashi
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
Quoted 2 lines · Takashi Iwai
Actually I have a separate branch on my git tree. The master is for mm tree and for-linus is for Linus. The appropriate patches are
what's the current status of the git trees? There was some talk about moving the primary revision control system for the kernel bits over to git during the 2.6.26 cycle.
Quoted 4 lines
My previous comment was about the patch that affects several subsystem / arch changes. In this case, the change isn't only in the subsystem tree. So, we'd need to cope with others anyway. Keeping such a patch in mm tree separately is one option.
I think that just putting the patches into ALSA is a better bet - it's more in tune with what most of the other subsystems are doing and it avoids possible confusion about what's actually made it into -mm.
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
At Wed, 23 Apr 2008 11:15:11 +0100,
Quoted 9 lines · Mark Brown
Quoted 2 lines · Takashi Iwai
Actually I have a separate branch on my git tree. The master is for mm tree and for-linus is for Linus. The appropriate patches are
what's the current status of the git trees? There was some talk about moving the primary revision control system for the kernel bits over to git during the 2.6.26 cycle.
No advance since then unfortuantely. Instead I'm keeping my own git tree for maintenance purpose too:
http://git.kernel.org/?p=linux/kernel/git/tiwai/sound-2.6.git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Quoted 8 lines
Quoted 4 lines
My previous comment was about the patch that affects several subsystem / arch changes. In this case, the change isn't only in the subsystem tree. So, we'd need to cope with others anyway. Keeping such a patch in mm tree separately is one option.
I think that just putting the patches into ALSA is a better bet - it's more in tune with what most of the other subsystems are doing and it avoids possible confusion about what's actually made it into -mm.
It should be case-by-case, but yes, as long as the patch doesn't break builds, it's no problem to keep it in ALSA tree in general.
Takashi
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
In reply to Takashi IwaiQuoted 4 lines · On Tue, 22 Apr 2008 16:56:21 +0200 "ext Takashi Iwai" <[email protected]> wrote:
If the stuff has to cooperate with the changes in other trees, pass it seprately to Andrew (or give me a hint) so that it's put to mm tree rightly at the next time.
That's a good idea. There is a work in progress in linux-omap to update low-level OMAP McBSP driver and to have support for newer OMAPs and I would like to update my driver as soon as that work is ready without waiting over one release cycle :-)
Jarkko
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
At Wed, 23 Apr 2008 08:57:31 +0300,
Quoted 4 lines · Jarkko Nikula
On Tue, 22 Apr 2008 16:56:21 +0200
"ext Takashi Iwai" <[email protected]> wrote:
Quoted 8 lines
Quoted 4 lines
If the stuff has to cooperate with the changes in other trees, pass it seprately to Andrew (or give me a hint) so that it's put to mm tree rightly at the next time.
That's a good idea. There is a work in progress in linux-omap to update low-level OMAP McBSP driver and to have support for newer OMAPs and I would like to update my driver as soon as that work is ready without waiting over one release cycle :-)
Yeah, this time is a very pity. I didn't know of (or totally forgot) about this change at the right time. If I knew of this at the time I asked on alsa-devel ML, it could be into the tree without a problem.
So, at the next time, if you have something you want to merge, please check the current ALSA tree status. If the patch isn't there, submit the patch soon. The merge to the subsystem tree is easy as long as no big API changes happens. Tossing to the upstream is another issue, though.
Takashi
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
Quoted 3 lines · Takashi Iwai
So, at the next time, if you have something you want to merge, please check the current ALSA tree status. If the patch isn't there, submit the patch soon. The merge to the subsystem tree is easy as long as no
He's actually done all that - the patch has been posted on alsa-devel a few times and has been sitting in ASoC for almost a month waiting for the ARM bits it needs to be merged.
Quoted 2 lines
big API changes happens. Tossing to the upstream is another issue, though.
For stuff that doesn't touch any core code (especially things like this which will only be selectable on one platform) it shouldn't be too much of an issue, I'd expect - there's not much risk of breaking anything else.
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
At Wed, 23 Apr 2008 10:20:23 +0100,
Quoted 10 lines · Mark Brown
Quoted 3 lines · Takashi Iwai
So, at the next time, if you have something you want to merge, please check the current ALSA tree status. If the patch isn't there, submit the patch soon. The merge to the subsystem tree is easy as long as no
He's actually done all that - the patch has been posted on alsa-devel a few times and has been sitting in ASoC for almost a month waiting for the ARM bits it needs to be merged.
Yeah, an unfortunate situation indeed.
Quoted 7 lines
Quoted 2 lines
big API changes happens. Tossing to the upstream is another issue, though.
For stuff that doesn't touch any core code (especially things like this which will only be selectable on one platform) it shouldn't be too much of an issue, I'd expect - there's not much risk of breaking anything else.
We could have merged this in prior. The driver codes are with ARCH_OMAP Kconfig, so it wouldn't cause build errors even if no omap is supported.
Takashi
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
Quoted 3 lines · Takashi Iwai
We could have merged this in prior. The driver codes are with
ARCH_OMAPKconfig, so it wouldn't cause build errors even if no omap is supported.
In that case the best approach is probably to just submit patches without worrying if it's buildable in mainline - for the embedded stuff it'll pretty much always be the case that there's some Kconfig setting protecting the new code.
Re: [PATCH 3/5] ASoC: Add drivers for the Texas Instruments OMAP processors
At Wed, 23 Apr 2008 10:36:00 +0100,
Quoted 11 lines · Mark Brown
Quoted 3 lines · Takashi Iwai
We could have merged this in prior. The driver codes are with
ARCH_OMAPKconfig, so it wouldn't cause build errors even if no omap is supported.In that case the best approach is probably to just submit patches without worrying if it's buildable in mainline - for the embedded stuff it'll pretty much always be the case that there's some
Kconfigsetting protecting the new code.
Just to avoid confusion - submit (merge) to the mainline is another story, of course. We shouldn't put a non-working stuff. What we are talking about is the merge into the subsystem tree for mm.
Takashi
Takashi Iwai
AppliedRe: [PATCH 2/5] pxa2xx-ac97: Support PXA3xx AC97
In reply to Mark BrownAt Tue, 22 Apr 2008 14:14:36 +0100,
Quoted 2 lines · Mark Brown
Signed-off-by Mark Brown <[email protected]>
Applied, too. Thanks.
Takashi
Quoted 56 lines
--- sound/arm/pxa2xx-ac97.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-)sound/arm/pxa2xx-ac97.c +24
-0@@ -106,6 +106,16 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsignestatic void pxa2xx_ac97_reset (struct snd_ac97 *ac97) {/* First, try cold reset */ +#ifdef CONFIG_PXA3xx +int timeout; + +/* Hold CLKBPB for 100us */ +GCR =0 ; +GCR =GCR_CLKBPB ; +udelay (100 ); +GCR =0 ; +#endif +GCR &=GCR_COLD_RST ;/* clear everything but nCRST */ GCR &= ~GCR_COLD_RST ;/* then assert nCRST */ @@ -117,6 +127,14 @@ static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)pxa_set_cken (CKEN_AC97CONF ,0 );GCR =GCR_COLD_RST ;udelay (50 ); +#elif defined(CONFIG_PXA3xx) + timeout =1000 ; +/* Can't use interrupts on PXA3xx */ +GCR &= ~(GCR_PRIRDY_IEN |GCR_SECRDY_IEN ); + +GCR =GCR_WARM_RST |GCR_COLD_RST ; +while (!(GSR & (GSR_PCR |GSR_SCR )) && timeout--) +mdelay (10 );#else GCR =GCR_COLD_RST ;GCR |=GCR_CDONE_IE |GCR_SDONE_IE ;@@ -137,6 +155,12 @@ static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)GCR |=GCR_WARM_RST ;pxa_gpio_mode (113 |GPIO_ALT_FN_2_OUT );udelay (500 ); +#elif defined(CONFIG_PXA3xx) + timeout =100 ; +/* Can't use interrupts */ +GCR |=GCR_WARM_RST ; +while (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR )) && timeout--) +mdelay (1 );#else GCR |=GCR_WARM_RST |GCR_PRIRDY_IEN |GCR_SECRDY_IEN ;wait_event_timeout (gsr_wq, gsr_bits & (GSR_PCR |GSR_SCR ),1 );Signature · 1 line
1.5.5
Takashi Iwai
AppliedAt Tue, 22 Apr 2008 14:14:35 +0100,
Quoted 5 lines · Mark Brown
The PXA3xx does not support the use of interrupts during reset and access to the GPIO status requires similar handling to that for PXA27x.
Signed-off-by Mark Brown <[email protected]>
Applied to HG tree now. Thanks.
Takashi
Quoted 82 lines
--- sound/soc/pxa/pxa2xx-ac97.c | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-)sound/soc/pxa/pxa2xx-ac97.c +27
-2@@ -55,7 +55,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97,mutex_lock (&car_mutex);/* set up primary or secondary codec/modem space */ -#ifdef CONFIG_PXA27x +#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE ;#else if (reg ==AC97_GPIO_STATUS )@@ -105,7 +105,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg,mutex_lock (&car_mutex);/* set up primary or secondary codec/modem space */ -#ifdef CONFIG_PXA27x +#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) reg_addr = ac97->num ? &SAC_REG_BASE : &PAC_REG_BASE ;#else if (reg ==AC97_GPIO_STATUS )@@ -128,6 +128,9 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg,static void pxa2xx_ac97_warm_reset (struct snd_ac97 *ac97) { +#ifdef CONFIG_PXA3xx +int timeout =100 ; +#endif gsr_bits =0 ;#ifdef CONFIG_PXA27x@@ -138,6 +141,11 @@ static void pxa2xx_ac97_warm_reset(struct snd_ac97 *ac97)GCR |=GCR_WARM_RST ;pxa_gpio_mode (113 |GPIO_ALT_FN_2_OUT );udelay (500 ); +#elif defined(CONFIG_PXA3xx) +/* Can't use interrupts */ +GCR |=GCR_WARM_RST ; +while (!((GSR | gsr_bits) & (GSR_PCR |GSR_SCR )) && timeout--) +mdelay (1 );#else GCR |=GCR_WARM_RST |GCR_PRIRDY_IEN |GCR_SECRDY_IEN ;wait_event_timeout (gsr_wq, gsr_bits & (GSR_PCR |GSR_SCR ),1 );@@ -153,6 +161,16 @@ static void pxa2xx_ac97_warm_reset(struct snd_ac97 *ac97)static void pxa2xx_ac97_cold_reset (struct snd_ac97 *ac97) { +#ifdef CONFIG_PXA3xx +int timeout =1000 ; + +/* Hold CLKBPB for 100us */ +GCR =0 ; +GCR =GCR_CLKBPB ; +udelay (100 ); +GCR =0 ; +#endif +GCR &=GCR_COLD_RST ;/* clear everything but nCRST */ GCR &= ~GCR_COLD_RST ;/* then assert nCRST */ @@ -164,6 +182,13 @@ static void pxa2xx_ac97_cold_reset(struct snd_ac97 *ac97)pxa_set_cken (CKEN_AC97CONF ,0 );GCR =GCR_COLD_RST ;udelay (50 ); +#elif defined(CONFIG_PXA3xx) +/* Can't use interrupts on PXA3xx */ +GCR &= ~(GCR_PRIRDY_IEN |GCR_SECRDY_IEN ); + +GCR =GCR_WARM_RST |GCR_COLD_RST ; +while (!(GSR & (GSR_PCR |GSR_SCR )) && timeout--) +mdelay (10 );#else GCR =GCR_COLD_RST ;GCR |=GCR_CDONE_IE |GCR_SDONE_IE ;Signature · 1 line
1.5.5