Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332107
b: refs/heads/master
c: 4c2474c
h: refs/heads/master
i:
  332105: c5cb99d
  332103: 629ff5b
v: v3
  • Loading branch information
Timur Tabi authored and Mark Brown committed Sep 19, 2012
1 parent 60cfeff commit 1196e47
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: d55438beb2329493cb54df5175d83be65a8d5100
refs/heads/master: 4c2474c007867c102c96482f3bacb1fdf209958c
9 changes: 8 additions & 1 deletion trunk/sound/soc/codecs/wm8960.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,18 +557,25 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_codec *codec = dai->codec;
struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);
u16 iface = snd_soc_read(codec, WM8960_IFACE1) & 0xfff3;
snd_pcm_format_t format = params_format(params);
int i;

/* bit size */
switch (params_format(params)) {
switch (format) {
case SNDRV_PCM_FORMAT_S16_LE:
case SNDRV_PCM_FORMAT_S16_BE:
break;
case SNDRV_PCM_FORMAT_S20_3LE:
case SNDRV_PCM_FORMAT_S20_3BE:
iface |= 0x0004;
break;
case SNDRV_PCM_FORMAT_S24_LE:
case SNDRV_PCM_FORMAT_S24_BE:
iface |= 0x0008;
break;
default:
dev_err(codec->dev, "unsupported format %i\n", format);
return -EINVAL;
}

/* Update filters for the new rate */
Expand Down

0 comments on commit 1196e47

Please sign in to comment.