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