Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270580
b: refs/heads/master
c: d1dc698
h: refs/heads/master
v: v3
  • Loading branch information
Timur Tabi authored and Mark Brown committed Sep 16, 2011
1 parent e1054fc commit e883b76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc2115cbfc63da72890160da01608b3189dd1b74
refs/heads/master: d1dc698a54259cb454284456483b45f67c865cf8
25 changes: 13 additions & 12 deletions trunk/sound/soc/codecs/wm8776.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,6 @@ static int wm8776_hw_params(struct snd_pcm_substream *substream,
int ratio_shift, master;
int i;

iface = 0;

switch (dai->driver->id) {
case WM8776_DAI_DAC:
iface_reg = WM8776_DACIFCTRL;
Expand All @@ -233,20 +231,23 @@ static int wm8776_hw_params(struct snd_pcm_substream *substream,
return -EINVAL;
}


/* Set word length */
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S16_LE:
switch (snd_pcm_format_width(params_format(params))) {
case 16:
iface = 0;
case 20:
iface = 0x10;
break;
case SNDRV_PCM_FORMAT_S20_3LE:
iface |= 0x10;
case 24:
iface = 0x20;
break;
case SNDRV_PCM_FORMAT_S24_LE:
iface |= 0x20;
break;
case SNDRV_PCM_FORMAT_S32_LE:
iface |= 0x30;
case 32:
iface = 0x30;
break;
default:
dev_err(codec->dev, "Unsupported sample size: %i\n",
snd_pcm_format_width(params_format(params)));
return -EINVAL;
}

/* Only need to set MCLK/LRCLK ratio if we're master */
Expand Down

0 comments on commit e883b76

Please sign in to comment.