Skip to content

Commit

Permalink
Merge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kerne…
Browse files Browse the repository at this point in the history
…l/git/broonie/sound-2.6 into topic/asoc
  • Loading branch information
Takashi Iwai committed Oct 5, 2010
2 parents a09f73f + 6c20c80 commit 45605a8
Show file tree
Hide file tree
Showing 12 changed files with 265 additions and 41 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-mx3/clock-imx31.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,8 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("mxc_w1.0", NULL, owire_clk)
_REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk)
_REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk)
_REGISTER_CLOCK("imx-ssi-dai.0", NULL, ssi1_clk)
_REGISTER_CLOCK("imx-ssi-dai.1", NULL, ssi2_clk)
_REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
_REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
_REGISTER_CLOCK(NULL, "firi", firi_clk)
_REGISTER_CLOCK(NULL, "ata", ata_clk)
_REGISTER_CLOCK(NULL, "rtic", rtic_clk)
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-mx3/clock-imx35.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "sdma", sdma_clk)
_REGISTER_CLOCK(NULL, "spba", spba_clk)
_REGISTER_CLOCK(NULL, "spdif", spdif_clk)
_REGISTER_CLOCK("imx-ssi-dai.0", NULL, ssi1_clk)
_REGISTER_CLOCK("imx-ssi-dai.1", NULL, ssi2_clk)
_REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk)
_REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk)
_REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk)
_REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk)
_REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-mx3/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,14 @@ static struct resource imx_ssi_resources1[] = {
};

struct platform_device imx_ssi_device0 = {
.name = "imx-ssi-dai",
.name = "imx-ssi",
.id = 0,
.num_resources = ARRAY_SIZE(imx_ssi_resources0),
.resource = imx_ssi_resources0,
};

struct platform_device imx_ssi_device1 = {
.name = "imx-ssi-dai",
.name = "imx-ssi",
.id = 1,
.num_resources = ARRAY_SIZE(imx_ssi_resources1),
.resource = imx_ssi_resources1,
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/plat-mxc/audmux-v2.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ static const char *audmux_port_string(int port)
{
switch (port) {
case MX31_AUDMUX_PORT1_SSI0:
return "imx-ssi-dai.0";
return "imx-ssi.0";
case MX31_AUDMUX_PORT2_SSI1:
return "imx-ssi-dai.1";
return "imx-ssi.1";
case MX31_AUDMUX_PORT3_SSI_PINS_3:
return "SSI3";
case MX31_AUDMUX_PORT4_SSI_PINS_4:
Expand Down
1 change: 1 addition & 0 deletions include/sound/wm8962.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define WM8962_GPIO_SET 0x10000

struct wm8962_pdata {
int gpio_base;
u32 gpio_init[WM8962_MAX_GPIO];

/* Setup for microphone detection, raw value to be written to
Expand Down
49 changes: 27 additions & 22 deletions sound/soc/codecs/wm8804.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,36 +390,41 @@ static int wm8804_set_pll(struct snd_soc_dai *dai, int pll_id,
int source, unsigned int freq_in,
unsigned int freq_out)
{
int ret;
struct snd_soc_codec *codec;
struct pll_div pll_div = { 0 };

codec = dai->codec;
if (freq_in && freq_out) {
if (!freq_in || !freq_out) {
/* disable the PLL */
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0x1);
return 0;
} else {
int ret;
struct pll_div pll_div;

ret = pll_factors(&pll_div, freq_out, freq_in);
if (ret)
return ret;
}

/* power down the PLL before reprogramming it */
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0);
/* power down the PLL before reprogramming it */
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0x1);

if (!freq_in || !freq_out)
return 0;

/* set PLLN and PRESCALE */
snd_soc_update_bits(codec, WM8804_PLL4, 0xf | 0x10,
pll_div.n | (pll_div.prescale << 4));
/* set mclkdiv and freqmode */
snd_soc_update_bits(codec, WM8804_PLL5, 0x3 | 0x8,
pll_div.freqmode | (pll_div.mclkdiv << 3));
/* set PLLK */
snd_soc_write(codec, WM8804_PLL1, pll_div.k & 0xff);
snd_soc_write(codec, WM8804_PLL2, (pll_div.k >> 8) & 0xff);
snd_soc_write(codec, WM8804_PLL3, pll_div.k >> 16);
if (!freq_in || !freq_out)
return 0;

/* power up the PLL */
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0x1);
/* set PLLN and PRESCALE */
snd_soc_update_bits(codec, WM8804_PLL4, 0xf | 0x10,
pll_div.n | (pll_div.prescale << 4));
/* set mclkdiv and freqmode */
snd_soc_update_bits(codec, WM8804_PLL5, 0x3 | 0x8,
pll_div.freqmode | (pll_div.mclkdiv << 3));
/* set PLLK */
snd_soc_write(codec, WM8804_PLL1, pll_div.k & 0xff);
snd_soc_write(codec, WM8804_PLL2, (pll_div.k >> 8) & 0xff);
snd_soc_write(codec, WM8804_PLL3, pll_div.k >> 16);

/* power up the PLL */
snd_soc_update_bits(codec, WM8804_PWRDN, 0x1, 0);
}

return 0;
}
Expand Down Expand Up @@ -669,7 +674,7 @@ static struct snd_soc_dai_ops wm8804_dai_ops = {
SNDRV_PCM_FMTBIT_S24_LE)

static struct snd_soc_dai_driver wm8804_dai = {
.name = "wm8804-s/pdif",
.name = "wm8804-spdif",
.playback = {
.stream_name = "Playback",
.channels_min = 2,
Expand Down
Loading

0 comments on commit 45605a8

Please sign in to comment.