Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371891
b: refs/heads/master
c: ecf327c
h: refs/heads/master
i:
  371889: 57c638a
  371887: aaf5678
v: v3
  • Loading branch information
Daniel Mack authored and Mark Brown committed Mar 12, 2013
1 parent 3ebbf15 commit 365aff4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 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: 2952b27e2e463b28d5c0f04000f96b968137ca42
refs/heads/master: ecf327c7ca5ddcbe611a33c88c19b8be3d0d2322
34 changes: 11 additions & 23 deletions trunk/sound/soc/davinci/davinci-mcasp.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,6 @@
#define RXSTATE BIT(5)
#define SRMOD_MASK 3
#define SRMOD_INACTIVE 0
#define SRMOD_TX 1
#define SRMOD_RX 2

/*
* DAVINCI_MCASP_LBCTL_REG - Loop Back Control Register Bits
Expand Down Expand Up @@ -686,27 +684,6 @@ static int davinci_hw_common_param(struct davinci_audio_dev *dev, int stream,
RXDATADMADIS);
}

for (i = 0; i < dev->num_serializer; i++) {
if (dev->serial_dir[i] == TX_MODE)
tx_ser++;
if (dev->serial_dir[i] == RX_MODE)
rx_ser++;
}

if (stream == SNDRV_PCM_STREAM_PLAYBACK)
ser = tx_ser;
else
ser = rx_ser;

if (ser < max_active_serializers) {
dev_warn(dev->dev, "stream has more channels (%d) than are "
"enabled in mcasp (%d)\n", channels, ser * slots);
return -EINVAL;
}

tx_ser = 0;
rx_ser = 0;

for (i = 0; i < dev->num_serializer; i++) {
mcasp_set_bits(dev->base + DAVINCI_MCASP_XRSRCTL_REG(i),
dev->serial_dir[i]);
Expand All @@ -726,6 +703,17 @@ static int davinci_hw_common_param(struct davinci_audio_dev *dev, int stream,
}
}

if (stream == SNDRV_PCM_STREAM_PLAYBACK)
ser = tx_ser;
else
ser = rx_ser;

if (ser < max_active_serializers) {
dev_warn(dev->dev, "stream has more channels (%d) than are "
"enabled in mcasp (%d)\n", channels, ser * slots);
return -EINVAL;
}

if (dev->txnumevt && stream == SNDRV_PCM_STREAM_PLAYBACK) {
if (dev->txnumevt * tx_ser > 64)
dev->txnumevt = 1;
Expand Down

0 comments on commit 365aff4

Please sign in to comment.