diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-04-20 07:45:40 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-04-20 07:45:40 -0400 |
commit | 9b5b0c01598f9782690b09ce6c49f4ba116dde44 (patch) | |
tree | dc8f4f66ed75f0b4843619362e088618e160847c | |
parent | 7154b3e80203ee91f9ba7d0a43d3daa05c49d9e9 (diff) | |
parent | b08f7a62cafd7998862072a1c353219e3d84bbef (diff) |
Merge branch 'for-2.6.30' into for-2.6.31
-rw-r--r-- | sound/soc/omap/n810.c | 4 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcbsp.c | 5 | ||||
-rw-r--r-- | sound/soc/omap/omap-mcbsp.h | 3 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 5 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.h | 3 | ||||
-rw-r--r-- | sound/soc/pxa/pxa-ssp.c | 36 |
6 files changed, 40 insertions, 16 deletions
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index e54e1c2f5e63..b60b1dfbc435 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Jarkko Nikula <jarkko.nikula@nokia.com> | 6 | * Contact: Jarkko Nikula <jhnikula@gmail.com> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or | 8 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 9 | * modify it under the terms of the GNU General Public License |
@@ -416,6 +416,6 @@ static void __exit n810_soc_exit(void) | |||
416 | module_init(n810_soc_init); | 416 | module_init(n810_soc_init); |
417 | module_exit(n810_soc_exit); | 417 | module_exit(n810_soc_exit); |
418 | 418 | ||
419 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>"); | 419 | MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>"); |
420 | MODULE_DESCRIPTION("ALSA SoC Nokia N810"); | 420 | MODULE_DESCRIPTION("ALSA SoC Nokia N810"); |
421 | MODULE_LICENSE("GPL"); | 421 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 4d6ef0bf71dd..495192af8c2e 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Jarkko Nikula <jarkko.nikula@nokia.com> | 6 | * Contact: Jarkko Nikula <jhnikula@gmail.com> |
7 | * Peter Ujfalusi <peter.ujfalusi@nokia.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
@@ -546,6 +547,6 @@ static void __exit snd_omap_mcbsp_exit(void) | |||
546 | } | 547 | } |
547 | module_exit(snd_omap_mcbsp_exit); | 548 | module_exit(snd_omap_mcbsp_exit); |
548 | 549 | ||
549 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>"); | 550 | MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>"); |
550 | MODULE_DESCRIPTION("OMAP I2S SoC Interface"); | 551 | MODULE_DESCRIPTION("OMAP I2S SoC Interface"); |
551 | MODULE_LICENSE("GPL"); | 552 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/omap/omap-mcbsp.h b/sound/soc/omap/omap-mcbsp.h index df7ad13ba73d..c8147aace813 100644 --- a/sound/soc/omap/omap-mcbsp.h +++ b/sound/soc/omap/omap-mcbsp.h | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Jarkko Nikula <jarkko.nikula@nokia.com> | 6 | * Contact: Jarkko Nikula <jhnikula@gmail.com> |
7 | * Peter Ujfalusi <peter.ujfalusi@nokia.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 1bdbb0427183..07cf7f46b584 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Jarkko Nikula <jarkko.nikula@nokia.com> | 6 | * Contact: Jarkko Nikula <jhnikula@gmail.com> |
7 | * Peter Ujfalusi <peter.ujfalusi@nokia.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
@@ -367,6 +368,6 @@ static void __exit omap_soc_platform_exit(void) | |||
367 | } | 368 | } |
368 | module_exit(omap_soc_platform_exit); | 369 | module_exit(omap_soc_platform_exit); |
369 | 370 | ||
370 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>"); | 371 | MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>"); |
371 | MODULE_DESCRIPTION("OMAP PCM DMA module"); | 372 | MODULE_DESCRIPTION("OMAP PCM DMA module"); |
372 | MODULE_LICENSE("GPL"); | 373 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/omap/omap-pcm.h b/sound/soc/omap/omap-pcm.h index e4369bdfd77d..8d9d26916b05 100644 --- a/sound/soc/omap/omap-pcm.h +++ b/sound/soc/omap/omap-pcm.h | |||
@@ -3,7 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2008 Nokia Corporation | 4 | * Copyright (C) 2008 Nokia Corporation |
5 | * | 5 | * |
6 | * Contact: Jarkko Nikula <jarkko.nikula@nokia.com> | 6 | * Contact: Jarkko Nikula <jhnikula@gmail.com> |
7 | * Peter Ujfalusi <peter.ujfalusi@nokia.com> | ||
7 | * | 8 | * |
8 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License | 10 | * modify it under the terms of the GNU General Public License |
diff --git a/sound/soc/pxa/pxa-ssp.c b/sound/soc/pxa/pxa-ssp.c index 487079550e71..b9b61ddca6ba 100644 --- a/sound/soc/pxa/pxa-ssp.c +++ b/sound/soc/pxa/pxa-ssp.c | |||
@@ -280,12 +280,33 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai) | |||
280 | * ssp_set_clkdiv - set SSP clock divider | 280 | * ssp_set_clkdiv - set SSP clock divider |
281 | * @div: serial clock rate divider | 281 | * @div: serial clock rate divider |
282 | */ | 282 | */ |
283 | static void ssp_set_scr(struct ssp_dev *dev, u32 div) | 283 | static void ssp_set_scr(struct ssp_device *ssp, u32 div) |
284 | { | 284 | { |
285 | struct ssp_device *ssp = dev->ssp; | 285 | u32 sscr0 = ssp_read_reg(ssp, SSCR0); |
286 | u32 sscr0 = ssp_read_reg(dev->ssp, SSCR0) & ~SSCR0_SCR; | 286 | |
287 | if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) { | ||
288 | sscr0 &= ~0x0000ff00; | ||
289 | sscr0 |= ((div - 2)/2) << 8; /* 2..512 */ | ||
290 | } else { | ||
291 | sscr0 &= ~0x000fff00; | ||
292 | sscr0 |= (div - 1) << 8; /* 1..4096 */ | ||
293 | } | ||
294 | ssp_write_reg(ssp, SSCR0, sscr0); | ||
295 | } | ||
296 | |||
297 | /** | ||
298 | * ssp_get_clkdiv - get SSP clock divider | ||
299 | */ | ||
300 | static u32 ssp_get_scr(struct ssp_device *ssp) | ||
301 | { | ||
302 | u32 sscr0 = ssp_read_reg(ssp, SSCR0); | ||
303 | u32 div; | ||
287 | 304 | ||
288 | ssp_write_reg(ssp, SSCR0, (sscr0 | SSCR0_SerClkDiv(div))); | 305 | if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) |
306 | div = ((sscr0 >> 8) & 0xff) * 2 + 2; | ||
307 | else | ||
308 | div = ((sscr0 >> 8) & 0xfff) + 1; | ||
309 | return div; | ||
289 | } | 310 | } |
290 | 311 | ||
291 | /* | 312 | /* |
@@ -326,7 +347,7 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai, | |||
326 | break; | 347 | break; |
327 | case PXA_SSP_CLK_AUDIO: | 348 | case PXA_SSP_CLK_AUDIO: |
328 | priv->sysclk = 0; | 349 | priv->sysclk = 0; |
329 | ssp_set_scr(&priv->dev, 1); | 350 | ssp_set_scr(ssp, 1); |
330 | sscr0 |= SSCR0_ACS; | 351 | sscr0 |= SSCR0_ACS; |
331 | break; | 352 | break; |
332 | default: | 353 | default: |
@@ -387,7 +408,7 @@ static int pxa_ssp_set_dai_clkdiv(struct snd_soc_dai *cpu_dai, | |||
387 | ssp_write_reg(ssp, SSACD, val); | 408 | ssp_write_reg(ssp, SSACD, val); |
388 | break; | 409 | break; |
389 | case PXA_SSP_DIV_SCR: | 410 | case PXA_SSP_DIV_SCR: |
390 | ssp_set_scr(&priv->dev, div); | 411 | ssp_set_scr(ssp, div); |
391 | break; | 412 | break; |
392 | default: | 413 | default: |
393 | return -ENODEV; | 414 | return -ENODEV; |
@@ -683,8 +704,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
683 | case SND_SOC_DAIFMT_I2S: | 704 | case SND_SOC_DAIFMT_I2S: |
684 | sspsp = ssp_read_reg(ssp, SSPSP); | 705 | sspsp = ssp_read_reg(ssp, SSPSP); |
685 | 706 | ||
686 | if (((sscr0 & SSCR0_SCR) == SSCR0_SerClkDiv(4)) && | 707 | if ((ssp_get_scr(ssp) == 4) && (width == 16)) { |
687 | (width == 16)) { | ||
688 | /* This is a special case where the bitclk is 64fs | 708 | /* This is a special case where the bitclk is 64fs |
689 | * and we're not dealing with 2*32 bits of audio | 709 | * and we're not dealing with 2*32 bits of audio |
690 | * samples. | 710 | * samples. |