aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/blackfin/bf5xx-tdm-pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-12-21 11:21:15 +0100
committerTakashi Iwai <tiwai@suse.de>2009-12-21 11:21:15 +0100
commitde8853bc38ceab1fa7e7f723b21430d4aad60fea (patch)
tree5084ef51866fd1767324f8dc8eb36e97c55350f5 /sound/soc/blackfin/bf5xx-tdm-pcm.c
parentf5de24b06aa46427500d0fdbe8616b73a71d8c28 (diff)
parent440b004cf953bec2bc8cd91c64ae707fd7e25327 (diff)
Merge remote branch 'alsa/fixes' into fix/hda
Diffstat (limited to 'sound/soc/blackfin/bf5xx-tdm-pcm.c')
-rw-r--r--sound/soc/blackfin/bf5xx-tdm-pcm.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/blackfin/bf5xx-tdm-pcm.c b/sound/soc/blackfin/bf5xx-tdm-pcm.c
index ccb5e823bd1..a8c73cbbd68 100644
--- a/sound/soc/blackfin/bf5xx-tdm-pcm.c
+++ b/sound/soc/blackfin/bf5xx-tdm-pcm.c
@@ -43,7 +43,7 @@
#include "bf5xx-tdm.h"
#include "bf5xx-sport.h"
-#define PCM_BUFFER_MAX 0x10000
+#define PCM_BUFFER_MAX 0x8000
#define FRAGMENT_SIZE_MIN (4*1024)
#define FRAGMENTS_MIN 2
#define FRAGMENTS_MAX 32
@@ -177,6 +177,9 @@ out:
static int bf5xx_pcm_copy(struct snd_pcm_substream *substream, int channel,
snd_pcm_uframes_t pos, void *buf, snd_pcm_uframes_t count)
{
+ struct snd_pcm_runtime *runtime = substream->runtime;
+ struct sport_device *sport = runtime->private_data;
+ struct bf5xx_tdm_port *tdm_port = sport->private_data;
unsigned int *src;
unsigned int *dst;
int i;
@@ -188,7 +191,7 @@ static int bf5xx_pcm_copy(struct snd_pcm_substream *substream, int channel,
dst += pos * 8;
while (count--) {
for (i = 0; i < substream->runtime->channels; i++)
- *(dst + i) = *src++;
+ *(dst + tdm_port->tx_map[i]) = *src++;
dst += 8;
}
} else {
@@ -198,7 +201,7 @@ static int bf5xx_pcm_copy(struct snd_pcm_substream *substream, int channel,
src += pos * 8;
while (count--) {
for (i = 0; i < substream->runtime->channels; i++)
- *dst++ = *(src+i);
+ *dst++ = *(src + tdm_port->rx_map[i]);
src += 8;
}
}