Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270719
b: refs/heads/master
c: 4dd0417
h: refs/heads/master
i:
  270717: 3b003c9
  270715: 5d42f39
  270711: ce725a0
  270703: 271ea35
  270687: d3732e8
  270655: 0da7848
  270591: 70662e0
v: v3
  • Loading branch information
Jarkko Nikula authored and Mark Brown committed Oct 2, 2011
1 parent 4c0c344 commit fbdfbbb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 177fdd89f9c3f3f157c0b5e0f9c25a3a7c37ecf7
refs/heads/master: 4dd0417253be35bfbe368c40ec5a10732b24fd65
9 changes: 9 additions & 0 deletions trunk/sound/soc/omap/omap-mcbsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,10 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
return 0;
}

regs->rcr2 &= ~(RPHASE | RFRLEN2(0x7f) | RWDLEN2(7));
regs->xcr2 &= ~(RPHASE | XFRLEN2(0x7f) | XWDLEN2(7));
regs->rcr1 &= ~(RFRLEN1(0x7f) | RWDLEN1(7));
regs->xcr1 &= ~(XFRLEN1(0x7f) | XWDLEN1(7));
format = mcbsp_data->fmt & SND_SOC_DAIFMT_FORMAT_MASK;
wpf = channels = params_channels(params);
if (channels == 2 && (format == SND_SOC_DAIFMT_I2S ||
Expand Down Expand Up @@ -369,6 +373,8 @@ static int omap_mcbsp_dai_hw_params(struct snd_pcm_substream *substream,
framesize = wlen * channels;

/* Set FS period and length in terms of bit clock periods */
regs->srgr2 &= ~FPER(0xfff);
regs->srgr1 &= ~FWID(0xff);
switch (format) {
case SND_SOC_DAIFMT_I2S:
case SND_SOC_DAIFMT_LEFT_J:
Expand Down Expand Up @@ -505,6 +511,7 @@ static int omap_mcbsp_dai_set_clkdiv(struct snd_soc_dai *cpu_dai,
return -ENODEV;

mcbsp_data->clk_div = div;
regs->srgr1 &= ~CLKGDV(0xff);
regs->srgr1 |= CLKGDV(div - 1);

return 0;
Expand Down Expand Up @@ -534,6 +541,8 @@ static int omap_mcbsp_dai_set_dai_sysclk(struct snd_soc_dai *cpu_dai,
return -EINVAL;

mcbsp_data->in_freq = freq;
regs->srgr2 &= ~CLKSM;
regs->pcr0 &= ~SCLKME;

switch (clk_id) {
case OMAP_MCBSP_SYSCLK_CLK:
Expand Down

0 comments on commit fbdfbbb

Please sign in to comment.