diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-04-21 01:42:49 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-04-21 01:42:49 -0400 |
commit | f22d806b6cc0c74dd0a1a21b3f311dba51d9df84 (patch) | |
tree | dcc11baa299cb60a8aa06e909ab1ef847ec2a85f /sound | |
parent | 9bc5df222b9cfc4be1176e566dfba2ab5c6b43f8 (diff) | |
parent | 516ef69f160fb2f092d71f2cb635a9394ff8a71a (diff) |
Merge branch 'fix/asoc' into for-linus
* fix/asoc:
ASoC: Fix warning in wm9705
ASoC: OMAP: Update contact addresses
ASoC: pxa-ssp: Don't use SSCR0_SerClkDiv and SSCR0_SCR
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/wm9705.c | 2 | ||||
-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 |
7 files changed, 41 insertions, 17 deletions
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index 6e23a81dba78..c2d1a7a18fa3 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c | |||
@@ -318,7 +318,7 @@ static int wm9705_reset(struct snd_soc_codec *codec) | |||
318 | } | 318 | } |
319 | 319 | ||
320 | #ifdef CONFIG_PM | 320 | #ifdef CONFIG_PM |
321 | static int wm9705_soc_suspend(struct platform_device *pdev) | 321 | static int wm9705_soc_suspend(struct platform_device *pdev, pm_message_t msg) |
322 | { | 322 | { |
323 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 323 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
324 | struct snd_soc_codec *codec = socdev->card->codec; | 324 | struct snd_soc_codec *codec = socdev->card->codec; |
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index a6d1178ce128..91ef17992de5 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 |
@@ -417,6 +417,6 @@ static void __exit n810_soc_exit(void) | |||
417 | module_init(n810_soc_init); | 417 | module_init(n810_soc_init); |
418 | module_exit(n810_soc_exit); | 418 | module_exit(n810_soc_exit); |
419 | 419 | ||
420 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>"); | 420 | MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>"); |
421 | MODULE_DESCRIPTION("ALSA SoC Nokia N810"); | 421 | MODULE_DESCRIPTION("ALSA SoC Nokia N810"); |
422 | MODULE_LICENSE("GPL"); | 422 | MODULE_LICENSE("GPL"); |
diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 90f4df7fd906..912614283848 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 |
@@ -532,6 +533,6 @@ static void __exit snd_omap_mcbsp_exit(void) | |||
532 | } | 533 | } |
533 | module_exit(snd_omap_mcbsp_exit); | 534 | module_exit(snd_omap_mcbsp_exit); |
534 | 535 | ||
535 | MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>"); | 536 | MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>"); |
536 | MODULE_DESCRIPTION("OMAP I2S SoC Interface"); | 537 | MODULE_DESCRIPTION("OMAP I2S SoC Interface"); |
537 | MODULE_LICENSE("GPL"); | 538 | 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 de2254475d52..286be31545df 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; |
@@ -674,8 +695,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream, | |||
674 | case SND_SOC_DAIFMT_I2S: | 695 | case SND_SOC_DAIFMT_I2S: |
675 | sspsp = ssp_read_reg(ssp, SSPSP); | 696 | sspsp = ssp_read_reg(ssp, SSPSP); |
676 | 697 | ||
677 | if (((sscr0 & SSCR0_SCR) == SSCR0_SerClkDiv(4)) && | 698 | if ((ssp_get_scr(ssp) == 4) && (width == 16)) { |
678 | (width == 16)) { | ||
679 | /* This is a special case where the bitclk is 64fs | 699 | /* This is a special case where the bitclk is 64fs |
680 | * and we're not dealing with 2*32 bits of audio | 700 | * and we're not dealing with 2*32 bits of audio |
681 | * samples. | 701 | * samples. |