aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/ua101.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb/ua101.c')
-rw-r--r--sound/usb/ua101.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/usb/ua101.c b/sound/usb/ua101.c
index 3d458d3b9962..d700e32dee24 100644
--- a/sound/usb/ua101.c
+++ b/sound/usb/ua101.c
@@ -41,7 +41,7 @@ MODULE_SUPPORTED_DEVICE("{{Edirol,UA-101},{Edirol,UA-1000}}");
41/* 41/*
42 * This magic value optimizes memory usage efficiency for the UA-101's packet 42 * This magic value optimizes memory usage efficiency for the UA-101's packet
43 * sizes at all sample rates, taking into account the stupid cache pool sizes 43 * sizes at all sample rates, taking into account the stupid cache pool sizes
44 * that usb_buffer_alloc() uses. 44 * that usb_alloc_coherent() uses.
45 */ 45 */
46#define DEFAULT_QUEUE_LENGTH 21 46#define DEFAULT_QUEUE_LENGTH 21
47 47
@@ -1056,7 +1056,7 @@ static int alloc_stream_buffers(struct ua101 *ua, struct ua101_stream *stream)
1056 (unsigned int)MAX_QUEUE_LENGTH); 1056 (unsigned int)MAX_QUEUE_LENGTH);
1057 1057
1058 /* 1058 /*
1059 * The cache pool sizes used by usb_buffer_alloc() (128, 512, 2048) are 1059 * The cache pool sizes used by usb_alloc_coherent() (128, 512, 2048) are
1060 * quite bad when used with the packet sizes of this device (e.g. 280, 1060 * quite bad when used with the packet sizes of this device (e.g. 280,
1061 * 520, 624). Therefore, we allocate and subdivide entire pages, using 1061 * 520, 624). Therefore, we allocate and subdivide entire pages, using
1062 * a smaller buffer only for the last chunk. 1062 * a smaller buffer only for the last chunk.
@@ -1067,8 +1067,8 @@ static int alloc_stream_buffers(struct ua101 *ua, struct ua101_stream *stream)
1067 packets = min(remaining_packets, packets_per_page); 1067 packets = min(remaining_packets, packets_per_page);
1068 size = packets * stream->max_packet_bytes; 1068 size = packets * stream->max_packet_bytes;
1069 stream->buffers[i].addr = 1069 stream->buffers[i].addr =
1070 usb_buffer_alloc(ua->dev, size, GFP_KERNEL, 1070 usb_alloc_coherent(ua->dev, size, GFP_KERNEL,
1071 &stream->buffers[i].dma); 1071 &stream->buffers[i].dma);
1072 if (!stream->buffers[i].addr) 1072 if (!stream->buffers[i].addr)
1073 return -ENOMEM; 1073 return -ENOMEM;
1074 stream->buffers[i].size = size; 1074 stream->buffers[i].size = size;
@@ -1088,10 +1088,10 @@ static void free_stream_buffers(struct ua101 *ua, struct ua101_stream *stream)
1088 unsigned int i; 1088 unsigned int i;
1089 1089
1090 for (i = 0; i < ARRAY_SIZE(stream->buffers); ++i) 1090 for (i = 0; i < ARRAY_SIZE(stream->buffers); ++i)
1091 usb_buffer_free(ua->dev, 1091 usb_free_coherent(ua->dev,
1092 stream->buffers[i].size, 1092 stream->buffers[i].size,
1093 stream->buffers[i].addr, 1093 stream->buffers[i].addr,
1094 stream->buffers[i].dma); 1094 stream->buffers[i].dma);
1095} 1095}
1096 1096
1097static int alloc_stream_urbs(struct ua101 *ua, struct ua101_stream *stream, 1097static int alloc_stream_urbs(struct ua101 *ua, struct ua101_stream *stream,