Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148319
b: refs/heads/master
c: eaf1ac8
h: refs/heads/master
i:
  148317: eaa23f1
  148315: f03c270
  148311: 64d3065
  148303: 7362dd2
  148287: 08a258e
v: v3
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Jun 1, 2009
1 parent fe2d685 commit fc7dfc9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 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: 16a30fbb0d3aa4ee829a2dd3d0e314e2b5ae96a9
refs/heads/master: eaf1ac8bb58888e0773c0b81dfedb9d7c0123a1d
12 changes: 9 additions & 3 deletions trunk/sound/soc/codecs/twl4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -1608,9 +1608,15 @@ static int twl4030_hw_params(struct snd_pcm_substream *substream,

/* If the substream has 4 channel, do the necessary setup */
if (params_channels(params) == 4) {
/* Safety check: are we in the correct operating mode? */
if ((twl4030_read_reg_cache(codec, TWL4030_REG_CODEC_MODE) &
TWL4030_OPTION_1))
u8 format, mode;

format = twl4030_read_reg_cache(codec, TWL4030_REG_AUDIO_IF);
mode = twl4030_read_reg_cache(codec, TWL4030_REG_CODEC_MODE);

/* Safety check: are we in the correct operating mode and
* the interface is in TDM mode? */
if ((mode & TWL4030_OPTION_1) &&
((format & TWL4030_AIF_FORMAT) == TWL4030_AIF_FORMAT_TDM))
twl4030_tdm_enable(codec, substream->stream, 1);
else
return -EINVAL;
Expand Down

0 comments on commit fc7dfc9

Please sign in to comment.