aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-14 19:06:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-14 19:06:58 -0400
commit85082fd7cbe3173198aac0eb5e85ab1edcc6352c (patch)
treeedbc09b7945994f78668d218fa02e991c3b3b365 /sound
parent666484f0250db2e016948d63b3ef33e202e3b8d0 (diff)
parent53ffe3b440aa85af6fc4eda09b2d44bcdd312d4d (diff)
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (241 commits) [ARM] 5171/1: ep93xx: fix compilation of modules using clocks [ARM] 5133/2: at91sam9g20 defconfig file [ARM] 5130/4: Support for the at91sam9g20 [ARM] 5160/1: IOP3XX: gpio/gpiolib support [ARM] at91: Fix NAND FLASH timings for at91sam9x evaluation kits. [ARM] 5084/1: zylonite: Register AC97 device [ARM] 5085/2: PXA: Move AC97 over to the new central device declaration model [ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27x UDC drivers [ARM] 5147/1: pxaficp_ir: drop pxa_gpio_mode calls, as pin setting [ARM] 5145/1: PXA2xx: provide api to control IrDA pins state [ARM] 5144/1: pxaficp_ir: cleanup includes [ARM] pxa: remove pxa_set_cken() [ARM] pxa: allow clk aliases [ARM] Feroceon: don't disable BPU on boot [ARM] Orion: LED support for HP mv2120 [ARM] Orion: add RD88F5181L-FXO support [ARM] Orion: add RD88F5181L-GE support [ARM] Orion: add Netgear WNR854T support [ARM] s3c2410_defconfig: update for current build [ARM] Acer n30: Minor style and indentation fixes. ...
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/at91/at91-ssc.c2
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c12
2 files changed, 11 insertions, 3 deletions
diff --git a/sound/soc/at91/at91-ssc.c b/sound/soc/at91/at91-ssc.c
index c3625b665c5a..090e607f8692 100644
--- a/sound/soc/at91/at91-ssc.c
+++ b/sound/soc/at91/at91-ssc.c
@@ -41,7 +41,7 @@
41#define DBG(x...) 41#define DBG(x...)
42#endif 42#endif
43 43
44#if defined(CONFIG_ARCH_AT91SAM9260) 44#if defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)
45#define NUM_SSC_DEVICES 1 45#define NUM_SSC_DEVICES 1
46#else 46#else
47#define NUM_SSC_DEVICES 3 47#define NUM_SSC_DEVICES 3
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 9c06553b9267..8f96d87f7b4b 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -15,6 +15,7 @@
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/device.h> 16#include <linux/device.h>
17#include <linux/delay.h> 17#include <linux/delay.h>
18#include <linux/clk.h>
18#include <sound/core.h> 19#include <sound/core.h>
19#include <sound/pcm.h> 20#include <sound/pcm.h>
20#include <sound/initval.h> 21#include <sound/initval.h>
@@ -37,6 +38,7 @@ struct pxa_i2s_port {
37 u32 fmt; 38 u32 fmt;
38}; 39};
39static struct pxa_i2s_port pxa_i2s; 40static struct pxa_i2s_port pxa_i2s;
41static struct clk *clk_i2s;
40 42
41static struct pxa2xx_pcm_dma_params pxa2xx_i2s_pcm_stereo_out = { 43static struct pxa2xx_pcm_dma_params pxa2xx_i2s_pcm_stereo_out = {
42 .name = "I2S PCM Stereo out", 44 .name = "I2S PCM Stereo out",
@@ -79,6 +81,10 @@ static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream)
79 struct snd_soc_pcm_runtime *rtd = substream->private_data; 81 struct snd_soc_pcm_runtime *rtd = substream->private_data;
80 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 82 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
81 83
84 clk_i2s = clk_get(NULL, "I2SCLK");
85 if (IS_ERR(clk_i2s))
86 return PTR_ERR(clk_i2s);
87
82 if (!cpu_dai->active) { 88 if (!cpu_dai->active) {
83 SACR0 |= SACR0_RST; 89 SACR0 |= SACR0_RST;
84 SACR0 = 0; 90 SACR0 = 0;
@@ -146,7 +152,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
146 pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx); 152 pxa_gpio_mode(gpio_bus[pxa_i2s.master].tx);
147 pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm); 153 pxa_gpio_mode(gpio_bus[pxa_i2s.master].frm);
148 pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk); 154 pxa_gpio_mode(gpio_bus[pxa_i2s.master].clk);
149 pxa_set_cken(CKEN_I2S, 1); 155 clk_enable(clk_i2s);
150 pxa_i2s_wait(); 156 pxa_i2s_wait();
151 157
152 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) 158 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
@@ -231,8 +237,10 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream)
231 if (SACR1 & (SACR1_DREC | SACR1_DRPL)) { 237 if (SACR1 & (SACR1_DREC | SACR1_DRPL)) {
232 SACR0 &= ~SACR0_ENB; 238 SACR0 &= ~SACR0_ENB;
233 pxa_i2s_wait(); 239 pxa_i2s_wait();
234 pxa_set_cken(CKEN_I2S, 0); 240 clk_disable(clk_i2s);
235 } 241 }
242
243 clk_put(clk_i2s);
236} 244}
237 245
238#ifdef CONFIG_PM 246#ifdef CONFIG_PM