From b1618922db92f9bc65b0841f66eb71742bc1b553 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 21 Aug 2007 21:32:09 +0000 Subject: Add swap member to sbc struct and fix pcm plugin to not swap the buffer. --- audio/pcm_bluetooth.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'audio/pcm_bluetooth.c') diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c index 80afd562..495f1521 100644 --- a/audio/pcm_bluetooth.c +++ b/audio/pcm_bluetooth.c @@ -109,16 +109,6 @@ struct bluetooth_data { struct bluetooth_a2dp a2dp; /* A2DP data */ }; -static void memcpy_changeendian(void *dst, const void *src, int size) -{ - int i; - const uint16_t *ptrsrc = src; - uint16_t *ptrdst = dst; - - for (i = 0; i < size / 2; i++) - *ptrdst++ = htons(*ptrsrc++); -} - static int bluetooth_start(snd_pcm_ioplug_t *io) { DBG("bluetooth_start %p", io); @@ -622,8 +612,7 @@ static snd_pcm_sframes_t bluetooth_a2dp_write(snd_pcm_ioplug_t *io, /* Ready for more data */ buff = (uint8_t *) areas->addr + (areas->first + areas->step * offset) / 8; - memcpy_changeendian(data->buffer + data->count, buff, - frame_size * frames_to_read); + memcpy(data->buffer + data->count, buff, frame_size * frames_to_read); /* Remember we have some frames in the pipe now */ data->count += frames_to_read * frame_size; -- cgit