Skip to content

Commit

Permalink
Merge branch 'fix/asoc' into for-linus
Browse files Browse the repository at this point in the history
* fix/asoc:
  ASoC: Fix warning in wm9705
  ASoC: OMAP: Update contact addresses
  ASoC: pxa-ssp: Don't use SSCR0_SerClkDiv and SSCR0_SCR
  • Loading branch information
Takashi Iwai committed Apr 21, 2009
2 parents 9bc5df2 + 516ef69 commit f22d806
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 17 deletions.
2 changes: 1 addition & 1 deletion sound/soc/codecs/wm9705.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static int wm9705_reset(struct snd_soc_codec *codec)
}

#ifdef CONFIG_PM
static int wm9705_soc_suspend(struct platform_device *pdev)
static int wm9705_soc_suspend(struct platform_device *pdev, pm_message_t msg)
{
struct snd_soc_device *socdev = platform_get_drvdata(pdev);
struct snd_soc_codec *codec = socdev->card->codec;
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/omap/n810.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright (C) 2008 Nokia Corporation
*
* Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
* Contact: Jarkko Nikula <jhnikula@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -417,6 +417,6 @@ static void __exit n810_soc_exit(void)
module_init(n810_soc_init);
module_exit(n810_soc_exit);

MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>");
MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>");
MODULE_DESCRIPTION("ALSA SoC Nokia N810");
MODULE_LICENSE("GPL");
5 changes: 3 additions & 2 deletions sound/soc/omap/omap-mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
*
* Copyright (C) 2008 Nokia Corporation
*
* Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
* Contact: Jarkko Nikula <jhnikula@gmail.com>
* Peter Ujfalusi <peter.ujfalusi@nokia.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -532,6 +533,6 @@ static void __exit snd_omap_mcbsp_exit(void)
}
module_exit(snd_omap_mcbsp_exit);

MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>");
MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>");
MODULE_DESCRIPTION("OMAP I2S SoC Interface");
MODULE_LICENSE("GPL");
3 changes: 2 additions & 1 deletion sound/soc/omap/omap-mcbsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
*
* Copyright (C) 2008 Nokia Corporation
*
* Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
* Contact: Jarkko Nikula <jhnikula@gmail.com>
* Peter Ujfalusi <peter.ujfalusi@nokia.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand Down
5 changes: 3 additions & 2 deletions sound/soc/omap/omap-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
*
* Copyright (C) 2008 Nokia Corporation
*
* Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
* Contact: Jarkko Nikula <jhnikula@gmail.com>
* Peter Ujfalusi <peter.ujfalusi@nokia.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -367,6 +368,6 @@ static void __exit omap_soc_platform_exit(void)
}
module_exit(omap_soc_platform_exit);

MODULE_AUTHOR("Jarkko Nikula <jarkko.nikula@nokia.com>");
MODULE_AUTHOR("Jarkko Nikula <jhnikula@gmail.com>");
MODULE_DESCRIPTION("OMAP PCM DMA module");
MODULE_LICENSE("GPL");
3 changes: 2 additions & 1 deletion sound/soc/omap/omap-pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
*
* Copyright (C) 2008 Nokia Corporation
*
* Contact: Jarkko Nikula <jarkko.nikula@nokia.com>
* Contact: Jarkko Nikula <jhnikula@gmail.com>
* Peter Ujfalusi <peter.ujfalusi@nokia.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand Down
36 changes: 28 additions & 8 deletions sound/soc/pxa/pxa-ssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,33 @@ static int pxa_ssp_resume(struct snd_soc_dai *cpu_dai)
* ssp_set_clkdiv - set SSP clock divider
* @div: serial clock rate divider
*/
static void ssp_set_scr(struct ssp_dev *dev, u32 div)
static void ssp_set_scr(struct ssp_device *ssp, u32 div)
{
struct ssp_device *ssp = dev->ssp;
u32 sscr0 = ssp_read_reg(dev->ssp, SSCR0) & ~SSCR0_SCR;
u32 sscr0 = ssp_read_reg(ssp, SSCR0);

if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP) {
sscr0 &= ~0x0000ff00;
sscr0 |= ((div - 2)/2) << 8; /* 2..512 */
} else {
sscr0 &= ~0x000fff00;
sscr0 |= (div - 1) << 8; /* 1..4096 */
}
ssp_write_reg(ssp, SSCR0, sscr0);
}

/**
* ssp_get_clkdiv - get SSP clock divider
*/
static u32 ssp_get_scr(struct ssp_device *ssp)
{
u32 sscr0 = ssp_read_reg(ssp, SSCR0);
u32 div;

ssp_write_reg(ssp, SSCR0, (sscr0 | SSCR0_SerClkDiv(div)));
if (cpu_is_pxa25x() && ssp->type == PXA25x_SSP)
div = ((sscr0 >> 8) & 0xff) * 2 + 2;
else
div = ((sscr0 >> 8) & 0xfff) + 1;
return div;
}

/*
Expand Down Expand Up @@ -326,7 +347,7 @@ static int pxa_ssp_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
break;
case PXA_SSP_CLK_AUDIO:
priv->sysclk = 0;
ssp_set_scr(&priv->dev, 1);
ssp_set_scr(ssp, 1);
sscr0 |= SSCR0_ACS;
break;
default:
Expand Down Expand Up @@ -387,7 +408,7 @@ static int pxa_ssp_set_dai_clkdiv(struct snd_soc_dai *cpu_dai,
ssp_write_reg(ssp, SSACD, val);
break;
case PXA_SSP_DIV_SCR:
ssp_set_scr(&priv->dev, div);
ssp_set_scr(ssp, div);
break;
default:
return -ENODEV;
Expand Down Expand Up @@ -674,8 +695,7 @@ static int pxa_ssp_hw_params(struct snd_pcm_substream *substream,
case SND_SOC_DAIFMT_I2S:
sspsp = ssp_read_reg(ssp, SSPSP);

if (((sscr0 & SSCR0_SCR) == SSCR0_SerClkDiv(4)) &&
(width == 16)) {
if ((ssp_get_scr(ssp) == 4) && (width == 16)) {
/* This is a special case where the bitclk is 64fs
* and we're not dealing with 2*32 bits of audio
* samples.
Expand Down

0 comments on commit f22d806

Please sign in to comment.